diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..10944da --- /dev/null +++ b/LICENSE.txt @@ -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. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f0b8a72 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +include setup.py +include MANIFEST.in +include LICENSE +include README.md + +graft tests +graft examples +graft docs +graft src \ No newline at end of file diff --git a/search_pe_papers.ipynb b/examples/search_pe_papers.ipynb similarity index 100% rename from search_pe_papers.ipynb rename to examples/search_pe_papers.ipynb diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f6687e1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +numpy +pandas +requests +matplotlib +-e . \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..27c3bd9 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,35 @@ +# FILEPATH: setup.cfg + +[metadata] +name = prompt_systematic_review +version = 0.1.0 +author = trigaten +author_email = sanderschulhoff@gmail.com +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 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..fc1f76c --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup + +setup() \ No newline at end of file diff --git a/src/prompt_systematic_review/__init__.py b/src/prompt_systematic_review/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/keywords.py b/src/prompt_systematic_review/keywords.py similarity index 100% rename from keywords.py rename to src/prompt_systematic_review/keywords.py diff --git a/utils.py b/src/prompt_systematic_review/utils.py similarity index 78% rename from utils.py rename to src/prompt_systematic_review/utils.py index c077422..3057002 100644 --- a/utils.py +++ b/src/prompt_systematic_review/utils.py @@ -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 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 0000000..5195fd3 --- /dev/null +++ b/tests/test_utils.py @@ -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 \ No newline at end of file