Skip to content

Commit

Permalink
🧑‍💻 Properly handle poetry extras
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwoerpel committed Dec 23, 2024
1 parent 329bdd9 commit ddd7879
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ env.PY }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install dependencies
run: poetry install --with dev
run: poetry install --with dev --all-extras
- name: Run pre-commit hooks
run: poetry run pre-commit run
- name: Lint with flake8
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: clean install test

install:
poetry install --with dev
poetry install --with dev --all-extras

lint:
poetry run flake8 ftmq --count --select=E9,F63,F7,F82 --show-source --statistics
Expand Down
52 changes: 45 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 9 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ nomenklatura = "^3.14.0"
anystore = "^0.2.1"
structlog = "^24.4.0"
rigour = "^0.8.2"
redis = {version = "^5.2.1", optional = true}
plyvel = {version = "^1.5.1", optional = true}
sqlalchemy = {version = "^2.0.36", optional = true}
fakeredis = {version = "^2.26.2", optional = true}

[tool.poetry.extras]
sql = ["sqlalchemy"]
redis = ["redis", "fakeredis"]
level = ["plyvel"]

[tool.poetry.group.dev.dependencies]
pytest = ">=7.4.3,<9.0.0"
Expand All @@ -66,16 +75,6 @@ mkdocs-click = "^0.8.1"
# [tool.poetry.group.clickhouse.dependencies]
# ftm-columnstore = "^0.3.0"

[tool.poetry.group.level.dependencies]
plyvel = "^1.5.1"

[tool.poetry.group.redis.dependencies]
redis = "^5.0.1"


[tool.poetry.group.sql.dependencies]
sqlalchemy = "^2.0.36"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down

0 comments on commit ddd7879

Please sign in to comment.