Skip to content

Commit

Permalink
build: use poetry groups instead of extras (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Dec 9, 2021
1 parent a32391d commit 13f1ed5
Show file tree
Hide file tree
Showing 7 changed files with 497 additions and 519 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ author_username: kyleking
codecov_token: d414dacb-5b8d-4c0b-94e1-42fe8393187d
copyright_date: '2021'
doc_dir: docs
install_extras: -E dev -E lint -E test -E commitizen_legacy
install_extras: --with dev --with lint --with test --with commitizen_legacy
package_name_py: calcipy
project_description: Python package to simplify development. Includes functionality
for task running, testing, linting, documenting, and more
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ install:
- poetry config virtualenvs.in-project true
- poetry config --list
# Install project-specific dependencies and extras
- poetry install -E dev -E lint -E test -E commitizen_legacy
- poetry install --with dev --with lint --with test --with commitizen_legacy

test_script:
- echo "Testing..."
Expand Down
1 change: 1 addition & 0 deletions calcipy/doit_tasks/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def task_lock() -> DoitTask:
path_req = DG.meta.path_project / 'requirements.txt'
# Ensure that extras are exported as well
toml_data = toml.loads(DG.meta.path_toml.read_text())
# FYI: poetry 'groups' appear to be properly exported with "--dev"
extras = [*toml_data['tool']['poetry'].get('extras', {}).keys()]
extras_arg = ' -E '.join([''] + extras) if extras else ''
task = debug_task([
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
```sh
git clone https://github.com/kyleking/calcipy.git
cd calcipy
poetry install -E dev -E lint -E test -E commitizen_legacy
poetry install --with dev --with lint --with test --with commitizen_legacy
# Note that the new "poetry --sync" will remove optional groups

# See the available tasks
poetry run doit list
Expand Down
Loading

0 comments on commit 13f1ed5

Please sign in to comment.