Fix extras in pyproject.toml (#58)

Extras were not being installed by pip correctly. Our syntax in
pyproject.toml was incorrect:
https://python-poetry.org/docs/pyproject/#extras

Tested in a new conda environment and working.
This commit is contained in:
Nate Barbettini 2024-09-24 18:02:56 -07:00 committed by GitHub
parent 9ceb474372
commit 5cf451802d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 12 deletions

View file

@ -22,16 +22,17 @@ tomlkit = "^0.12.4"
openai = "^1.36.0" # TODO: relax to an earlier version that still has what we need
pyjwt = "^2.8.0"
loguru = "^0.7.0"
fastapi = {version = "^0.110.0", optional = true}
scipy = {version = "^1.14.0", optional = true}
numpy = {version = "^2.0.0", optional = true}
scikit-learn = {version = "^1.5.0", optional = true}
[tool.poetry.group.fastapi.dependencies]
fastapi = "^0.110.0"
[tool.poetry.group.flask.dependencies]
flask = "^3.0.3"
[tool.poetry.extras]
fastapi = ["fastapi"]
evals = ["scipy", "numpy", "scikit-learn"]
[tool.poetry.group.dev.dependencies]
pytest = "^8.1.1"
pytest = "^8.1.2"
pytest-cov = "^4.0.0"
mypy = "^1.5.1"
pre-commit = "^3.4.0"
@ -43,10 +44,6 @@ mkdocs = ">=1.5.2"
mkdocs-material = ">=9.3.0"
mkdocstrings = {extras = ["python"], version = ">=0.23.1"}
[tool.poetry.group.evals.dependencies]
scipy = "^1.14.0"
numpy = "^2.0.0"
scikit-learn = "^1.5.0"
[tool.poetry.scripts]
arcade = "arcade.cli.main:cli"

View file

@ -12,6 +12,6 @@ python =
passenv = PYTHON_VERSION
allowlist_externals = poetry
commands =
poetry install -v
poetry install -v --all-extras
pytest --doctest-modules tests --cov --cov-config=pyproject.toml --cov-report=xml
# mypy