Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Poetry for dependency management #605

Merged
merged 36 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
446df11
Add initial pyproject.toml
juhoinkinen Aug 9, 2022
11a4a1a
Move pytest configuration to pyproject.toml
juhoinkinen Aug 9, 2022
d82f2ba
Add forgotten dependencies for tests
juhoinkinen Aug 10, 2022
aba68e7
Delete unnecessary setup.py and MANIFEST.in files
juhoinkinen Aug 10, 2022
3602cbc
Make bumpversion update version string in pyproject.toml
juhoinkinen Aug 10, 2022
a6d41ad
Update README.md for Poetry usage in development installations
juhoinkinen Aug 10, 2022
54e058f
Ignore poetry.lock in git
juhoinkinen Aug 10, 2022
2793cf2
Update GH Actions to use Poetry
juhoinkinen Aug 11, 2022
09f5b00
Use cache feature of setup-python action for Poetry; install Poetry b…
juhoinkinen Aug 11, 2022
7a706a5
Upgrade setup-python action
juhoinkinen Aug 11, 2022
2f9ef42
Try to speed up by using --no-root flag in extras installations; drop…
juhoinkinen Aug 12, 2022
3604e22
Cache Poetry installation
juhoinkinen Aug 12, 2022
f2f2664
Install the annif package itself
juhoinkinen Aug 12, 2022
ffadea3
Do not install the annif package itself when installing extras
juhoinkinen Aug 12, 2022
a959729
Use only one "poetry install" command to speed up runs
juhoinkinen Aug 12, 2022
a1acd39
Update authors and maintainers metadata
juhoinkinen Aug 15, 2022
477bd64
Pin flake8 version to 4.*
juhoinkinen Aug 16, 2022
99348be
More verbose poetry install for getting info about slow steps
juhoinkinen Aug 17, 2022
0067a15
Try to speed dependency resolution by pinning versions to minor level…
juhoinkinen Aug 17, 2022
c352262
Fix pytest-cov version
juhoinkinen Aug 17, 2022
1328a62
Load Poetry's repositories cache; separate caches on Python version
juhoinkinen Aug 17, 2022
2404e26
Revert unsuccessful and unnecessary commits trying to speed up CI runs
juhoinkinen Aug 17, 2022
84acab6
Install Poetry with pipx instead of with install-poetry action
juhoinkinen Sep 1, 2022
935c16a
Upgrade to Poetry 1.2.0
juhoinkinen Sep 1, 2022
d95de44
Install fastText from prebuilt wheels
juhoinkinen Sep 1, 2022
e496485
Cache Poetry installation
juhoinkinen Sep 1, 2022
bc8af86
Cache Poetry installation and repo info also in publish release job
juhoinkinen Sep 2, 2022
2adef96
Switch push trigger back to master branch
juhoinkinen Sep 2, 2022
2d3e635
Remove unnecessary builder stage
juhoinkinen Sep 2, 2022
c66b0bd
Use Poetry in installations in Dockerfile
juhoinkinen Sep 2, 2022
7cd1e6e
Merge branch 'master' into issue601-poetry
juhoinkinen Sep 2, 2022
2cd6836
Move downloading nltk data back to earlier layer
juhoinkinen Sep 5, 2022
12991b4
Allow non-root user run unit tests
juhoinkinen Sep 5, 2022
5646692
Instruct to install poetry with pipx instead of curl|bash
juhoinkinen Sep 6, 2022
1287575
Allow existing /Annif/tests/data dir which is typical in local builds
juhoinkinen Sep 13, 2022
4a6e2b5
More detailed development installation instructions
juhoinkinen Sep 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert unsuccessful and unnecessary commits trying to speed up CI runs
Revert "Fix pytest-cov version"
This reverts commit c352262.

Revert "Try to speed dependency resolution by pinning versions to minor level of all deps"
This reverts commit 0067a15.

Revert "More verbose poetry install for getting info about slow steps"
This reverts commit 99348be.
  • Loading branch information
juhoinkinen committed Aug 17, 2022
commit 2404e26eb43065f911d8f32e724e0879cf48e89f
6 changes: 3 additions & 3 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ jobs:
# Selectively install the optional dependencies for some Python versions
# For Python 3.8:
if [[ ${{ matrix.python-version }} == '3.8' ]]; then
poetry install -E "nn omikuji yake voikko pycld3" -vv;
poetry install -E "nn omikuji yake voikko pycld3";
fi
# For Python 3.9:
if [[ ${{ matrix.python-version }} == '3.9' ]]; then
poetry install -E "fasttext spacy" -vv;
poetry install -E "fasttext spacy";
# download the small English pretrained spaCy model needed by spacy analyzer
poetry run python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed
fi
# For Python 3.10:
if [[ ${{ matrix.python-version }} == '3.10' ]]; then
poetry install -E "nn omikuji yake" -vv;
poetry install -E "nn omikuji yake";
fi
poetry run python -m nltk.downloader punkt

Expand Down
66 changes: 33 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,48 +30,48 @@ classifiers=[
[tool.poetry.dependencies]
python = ">=3.8,<3.11"

connexion = {version = "2.14.0", extras = ["swagger-ui"]}
swagger_ui_bundle = "0.0.9"
flask = "2.2.2"
flask-cors = "3.0.10"
click = "8.0.4"
click-log = "0.4.0"
connexion = {version = "2.14.*", extras = ["swagger-ui"]}
swagger_ui_bundle = "*"
flask = ">=1.0.4,<3"
flask-cors = "*"
click = "8.0.*"
click-log = "*"
joblib = "1.1.0"
nltk = "3.7"
gensim = "4.2.0"
nltk = "*"
gensim = "4.2.*"
scikit-learn = "1.1.1"
scipy = "1.8.1"
rdflib = "6.2.0"
gunicorn = "20.1.0"
numpy = "1.23.2"
optuna = "2.10.1"
stwfsapy = "0.3.0"
python-dateutil = "2.8.2"
tomli = "2.0.1"
simplemma = "0.7.0"
scipy = "1.8.*"
rdflib = ">=4.2,<7.0"
gunicorn = "*"
numpy = "1.23.*"
optuna = "2.10.*"
stwfsapy = "0.3.*"
python-dateutil = "*"
tomli = "2.0.*"
simplemma = "0.7.*"

fasttext = {version = "0.9.2", optional = true}
voikko = {version = "0.5", optional = true}
voikko = {version = "*", optional = true}
tensorflow-cpu = {version = "2.9.1", optional = true}
lmdb = {version = "1.3.0", optional = true}
omikuji = {version = "0.5.0", optional = true}
omikuji = {version = "0.5.*", optional = true}
yake = {version = "0.4.5", optional = true}
pycld3 = {version = "0.22", optional = true}
spacy = {version = "3.3.1", optional = true}
pycld3 = {version = "*", optional = true}
spacy = {version = "3.3.*", optional = true}

[tool.poetry.dev-dependencies]
py = "1.11.0"
pytest = "7.1.2"
requests = "2.28.1"
codecov = "2.1.12"
coverage = "6.2"
pytest-cov = "3.0.0"
pytest-watch = "4.2.0"
pytest-flask = "1.2.0"
pytest-flake8 = "1.1.1"
flake8 = "4.0.1"
bumpversion = "0.6.0"
autopep8 = "1.6.0"
py = "*"
pytest = "*"
requests = "*"
codecov = "*"
coverage = "<=6.2"
pytest-cov = "*"
pytest-watch = "*"
pytest-flask = "*"
pytest-flake8 = "*"
flake8 = "4.*"
bumpversion = "*"
autopep8 = "*"

[tool.poetry.extras]
fasttext = ["fasttext"]
Expand Down