Skip to content

Commit

Permalink
Merge pull request #3 from trigaten/michael_test_branch
Browse files Browse the repository at this point in the history
add CI/Testing support
  • Loading branch information
trigaten authored Oct 26, 2023
2 parents 368112b + 57ba017 commit 6207f3a
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 2 deletions.
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Sander Schulhoff

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include setup.py
include MANIFEST.in
include LICENSE
include README.md

graft tests
graft examples
graft docs
graft src
File renamed without changes.
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy
pandas
requests
matplotlib
-e .
35 changes: 35 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# FILEPATH: setup.cfg

[metadata]
name = prompt_systematic_review
version = 0.1.0
author = trigaten
author_email = [email protected]
description = a systematic review of prompting
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/trigaten/Prompt_Systematic_Review/
license = MIT
classifiers=
Development Status :: 1 - Planning
Environment :: Console
Intended Audience :: Science/Research
Natural Language :: English
Programming Language :: Python :: 3
Topic :: Scientific/Engineering :: Artificial Intelligence
Topic :: Scientific/Engineering :: Information Analysis


[options]
packages = find:
package_dir =
=src
include_package_data = True
install_requires =
numpy
pandas
requests
matplotlib

[options.packages.find]
where=src
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from setuptools import setup

setup()
Empty file.
File renamed without changes.
4 changes: 2 additions & 2 deletions utils.py → src/prompt_systematic_review/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import requests
from xml.etree import ElementTree as ET

def search_arxiv(keyword):
url = f"http://export.arxiv.org/api/query?search_query=all:{keyword}&start=0&max_results=10000"
def search_arxiv(keyword,max_results=10000):
url = f"http://export.arxiv.org/api/query?search_query=all:{keyword}&start=0&max_results={max_results}"
data = requests.get(url).content
return data

Expand Down
Empty file added tests/__init__.py
Empty file.
11 changes: 11 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# test_utils.py
import pytest
from prompt_systematic_review.utils import search_arxiv, count_articles

def test_search_arxiv():
data = search_arxiv("covid",max_results=10)
assert len(data) > 0

def test_count_articles():
data = search_arxiv("covid",max_results=10)
assert count_articles(data) == 10

0 comments on commit 6207f3a

Please sign in to comment.