Skip to content

Commit

Permalink
Merge branch 'main' into arxiv_datascraper
Browse files Browse the repository at this point in the history
  • Loading branch information
Mcilie authored Nov 1, 2023
2 parents 8975a63 + 76ebab7 commit 960b63b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pre-commit
on:
pull_request:
push:
branches: main
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- run: pip install pre-commit -r requirements.txt
- run: pre-commit run --all-files
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from setuptools import setup

setup()
setup()
3 changes: 3 additions & 0 deletions tests/test_paper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from prompt_systematic_review.utils import process_paper_title



def test_paper():
paper1 = Paper(
"How to write a paper",
Expand Down Expand Up @@ -31,6 +32,7 @@ def test_paper():
assert paper1 != paper2 and paper2 != alsoPaper1



def test_arxiv_source():
# test that arXiv source returns papers properly
arxiv_source = ArXivSource()
Expand Down Expand Up @@ -58,3 +60,4 @@ def test_arxiv_source():
assert paper.keywords == [
"foundational models in medical imaging: a comprehensive survey and future vision"
]

1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
from prompt_systematic_review.utils import process_paper_title



def test_process_paper_title():
assert process_paper_title("Laws of the\n Wildabeest") == "laws of the wildabeest"

0 comments on commit 960b63b

Please sign in to comment.