-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da249bf
commit 147173e
Showing
6 changed files
with
185 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Publish to Test PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: # environment variables (available in any part of the action) | ||
PYTHON_VERSION: 3.11 | ||
|
||
jobs: | ||
pre-publish: | ||
name: Publish to Test PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: "poetry" | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction --no-root | ||
|
||
- name: Config Repository | ||
run: poetry config repositories.testpypi https://test.pypi.org/legacy/ | ||
|
||
- name: Login to PyPI Test | ||
run: poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_KEY }} | ||
|
||
- name: Publish package | ||
run: poetry publish --build -r testpypi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: # environment variables (available in any part of the action) | ||
PYTHON_VERSION: 3.11 | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: "poetry" | ||
|
||
# Install dependencies. `--no-root` means "install all dependencies but not the project | ||
# itself", which is what you want to avoid caching _your_ code. | ||
- name: Install dependencies | ||
run: poetry install --no-interaction --no-root --with dev | ||
|
||
- name: Test with pytest | ||
run: poetry run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Test | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: # environment variables (available in any part of the action) | ||
PYTHON_VERSION: 3.11 | ||
|
||
jobs: | ||
lint-test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
cache: "poetry" | ||
|
||
- name: Check Poetry File | ||
run: poetry check | ||
|
||
- name: Check lock file | ||
run: poetry lock --check | ||
|
||
# Install dependencies. `--no-root` means "install all dependencies but not the project | ||
# itself", which is what you want to avoid caching _your_ code. | ||
- name: Install dependencies | ||
run: poetry install --no-interaction --no-root --with dev --with stubs | ||
|
||
- name: Test with pytest | ||
run: poetry run pytest | ||
|
||
- name: Run black | ||
run: poetry run black --check --config ./pyproject.toml . | ||
|
||
- name: Run mypy | ||
run: poetry run mypy | ||
|
||
- name: Run ruff | ||
run: poetry run ruff check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ version = "0.2.0" | |
description = "Chemical Properties Relation Extraction" | ||
authors = ["Jonas Renault <[email protected]>", "Lucie Chasseur <[email protected]>"] | ||
readme = "README.md" | ||
license = "MIT" | ||
homepage = "https://github.com/jonasrenault/cprex#readme" | ||
repository = "https://github.com/jonasrenault/cprex" | ||
keywords = ["pubchem", "crawler", "chemistry", "machine-learning", "relation-extraction", "named-entity-extraction", "deep-learning", "transformers", "spacy", "scientific-articles"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
|
@@ -32,6 +34,7 @@ black = "^24.2.0" | |
mypy = "^1.8.0" | ||
bandit = "^1.7.7" | ||
jupyterlab = "^4.1.3" | ||
pytest = "^8.0.2" | ||
|
||
|
||
[tool.poetry.group.stubs] | ||
|