Skip to content

Commit

Permalink
fix: make experimental dependencies optional
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Jun 7, 2024
1 parent 0895050 commit 3a3cc82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion calcipy/tasks/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from .. import can_skip # Required for mocking can_skip.can_skip
from ..cli import task
from ..experiments import bump_programmatically
from ..invoke_helpers import run
from .executable_utils import python_dir

Expand Down Expand Up @@ -71,6 +70,8 @@ def bump_tag(ctx: Context, *, tag: str, tag_prefix: str = '', pkg_name: str = ''
```
"""
from ..experiments import bump_programmatically # noqa: PLC0415

if not tag:
raise ValueError('tag must not be empty')
if not pkg_name:
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ beartype = ">=0.18.2"
bidict = {optional = true, version = ">=0.22.1"} # stale
commitizen = {optional = true, version = ">=3.22.0"} # doc
corallium = ">=1.0.2"
griffe = ">=0.32.3" # experimental
griffe = {optional = true, version = ">=0.45.2"} # experimental
httpx = {optional = true, version = ">=0.24.1"} # stale
invoke = ">=2.2.0"
mkdocs = {optional = true, version = ">=1.5.3"} # doc
Expand All @@ -81,7 +81,7 @@ pytest-watcher = {optional = true, version = ">=0.4.2"} # test
python-box = {optional = true, version = ">=6.0.2"} # ddict
pyyaml = {optional = true, version = ">=5.2"} # doc,tags
ruff = {optional = true, version = ">=0.3.7"} # lint
semver = ">=3.0.1" # experimental
semver = {optional = true, version = ">=3.0.2"} # experimental
tabulate = {optional = true, version = ">=0.9.0"} # tags: Required for pandas to markdown
transitions = {optional = true, version = ">=0.9.0"} # tags: docs
virtualenv = {optional = true, version = ">=20.24.0"} # tags: nox. Prevents 'scripts' KeyError with Python 3.12
Expand All @@ -105,6 +105,10 @@ doc = [
"pyyaml",
"transitions",
]
experimental = [
"griffe",
"semver",
]
lint = [
"ruff",
]
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/test_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
('task', 'kwargs', 'commands'),
[
(install_extras, {}, [call(
'poetry install --sync --extras=ddict --extras=doc --extras=lint'
'poetry install --sync --extras=ddict --extras=doc --extras=experimental --extras=lint'
' --extras=nox --extras=pylint --extras=stale --extras=tags --extras=test --extras=types',
)]),
(lock, {}, [call('poetry lock --no-update')]),
Expand Down

0 comments on commit 3a3cc82

Please sign in to comment.