Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #65 from dpriskorn/prepare_for_0.3.1
Browse files Browse the repository at this point in the history
Prepare for 0.3.1
  • Loading branch information
dpriskorn authored Oct 1, 2022
2 parents a6845d8 + 0c0f875 commit 244b06b
Show file tree
Hide file tree
Showing 21 changed files with 937 additions and 79 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: lint_python
on: [pull_request, push]
jobs:
lint_python:
runs-on: ubuntu-latest
env:
ia_sandbox: ${{ secrets.ia_sandbox }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: 3.x
cache: 'poetry'
- run: pip install --upgrade pip wheel
- run: poetry install --with=dev
- run: poetry run bandit --recursive --skip B301,B105,B403,B311,B101,B324 src # B101 is assert statements
- run: poetry run black --check .
- run: poetry run codespell # --ignore-words-list="" --skip="*.css,*.js,*.lock"
- run: poetry run flake8 --ignore=C408,C416,E203,F401,F541,R501,R502,R503,R504,W503
--max-complexity=21 --max-line-length=162 --show-source --statistics .
- run: poetry run isort --check-only --profile black .
- run: mkdir --parents --verbose .mypy_cache
- run: poetry run mypy --ignore-missing-imports --install-types --non-interactive .
- run: cp config/__init__example.py config/__init__.py
- run: poetry run pytest --exitfirst .
- run: shopt -s globstar && poetry run pyupgrade --keep-runtime-typing --py37-plus **/*.py
- run: poetry run safety check
63 changes: 63 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
repos:
- repo: local
hooks:
- id: black
name: black
language: system
entry: black .
pass_filenames: false
#types: [python]

- id: codespell
name: codespell
language: system
entry: codespell
types: [python]

- id: bandit
name: bandit
language: system
entry: bandit --recursive --skip B301,B105,B403,B311,B101,B324 src # B101 is assert statements
# types: [python]
pass_filenames: false


- id: isort
name: isort
language: system
entry: isort
args: ["--profile", "black", "--filter-files"]
types: [python]

- id: pyupgrade
name: pyupgrade
language: system
entry: pyupgrade
args: ["--keep-runtime-typing", "--py37-plus"]
types: [python]

# https://flake8.pycqa.org/en/latest/user/using-hooks.html
- id: flake8
name: flake8
language: system
entry: flake8
args: ["--ignore=C408,C416,E203,F401,F541,R501,R502,R503,R504,W503",
"--max-complexity=21", "--max-line-length=162", "--show-source",
"--statistics"]
types: [ python ]

- id: safety
name: safety
language: system
entry: safety
args: ["check"]
pass_filenames: false

- id: pytest
name: pytest
language: system
entry: pytest
args: ["--durations=10", "--exitfirst"]
# see https://stackoverflow.com/questions/64011304/running-pytest-as-a-pre-commit-hook-no-such-file-or-directory-issue
pass_filenames: false

17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ As of september 2021 there were 37M scientific articles in Wikidata, but 27M of
subject statement. That makes them very hard to find for scientists which is bad for science,
because building on the work of others is essential in the global scientific community.

To my knowledge none of the scientific search engines that are currenly used in the scientific community rely on an
To my knowledge none of the scientific search engines that are currently used in the scientific community rely on an
open graph editable by anyone and maintained by the community itself for the purpose of helping fellow
scientists find each others work. Wikipedia and Scholia can fill that gap but we need good tooling to curate the
millions of items.
Expand All @@ -39,15 +39,20 @@ Download the release tarball or clone the tool using Git.
## Clone the repository
`git clone https://github.com/dpriskorn/ItemSubjector.git && cd ItemSubjector`

and run
Then checkout the latest release.

`pip install -r requirements.txt`
`git checkout v0.x` where x is the latest number on the release page.

to install all requirements.
## Setup the environment

Then checkout the latest release.
Make a virtual environment and set it up using poetry. If you don't have poetry installed run:
`$ pip install poetry`

`git checkout v0.x` where x is the latest number on the release page.
and then setup everying with

`$ poetry install`

to install all requirements in a virtual environment.

## PAWS
*Note: PAWS is not ideal for batch jobs unless you
Expand Down
File renamed without changes.
Loading

0 comments on commit 244b06b

Please sign in to comment.