Skip to content

Commit

Permalink
FEAT: remove Pixi configuration if not listed in --package-managers (
Browse files Browse the repository at this point in the history
…#377)

* ENH: automatically remove `pixi` settings in VSCode
* MAINT: expose `append_safe()` and `contains_line()` functions
  • Loading branch information
redeboer authored Aug 13, 2024
1 parent e5c74f3 commit 69c61c1
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 73 deletions.
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"P.args": ("attr", "typing.ParamSpec.args"),
"P.kwargs": ("attr", "typing.ParamSpec.kwargs"),
"P": "typing.ParamSpec",
"PackageManagerChoice": (
"obj",
"compwa_policy.check_dev_files.conda.PackageManagerChoice",
),
"Path": "pathlib.Path",
"ProjectURLs": "list",
"PyprojectTOML": "dict",
Expand Down
8 changes: 7 additions & 1 deletion src/compwa_policy/check_dev_files/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ def main(argv: Sequence[str] | None = None) -> int:
if has_notebooks:
do(jupyter.main, args.no_ruff)
do(nbstripout.main, precommit_config, _to_list(args.allowed_cell_metadata))
do(pixi.main, is_python_repo, dev_python_version, args.outsource_pixi_to_tox)
do(
pixi.main,
package_managers,
is_python_repo,
dev_python_version,
args.outsource_pixi_to_tox,
)
do(direnv.main)
do(toml.main, precommit_config) # has to run before pre-commit
do(prettier.main, precommit_config, args.no_prettierrc)
Expand Down
1 change: 1 addition & 0 deletions src/compwa_policy/check_dev_files/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from typing_extensions import Literal

PackageManagerChoice = Literal["conda", "pixi", "uv", "venv"]
"""Package managers you want to develop the project with."""


def main(
Expand Down
Loading

0 comments on commit 69c61c1

Please sign in to comment.