Skip to content

Commit

Permalink
Talk about Pixi in our docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jherland committed Sep 9, 2024
1 parent bdb3c76 commit 2a66337
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The `--deps` option tells FawltyDeps where to look for your project's declared
dependencies. A number of file formats are supported:

- `*requirements*.txt` and `*requirements*.in`
- `pyproject.toml` (following PEP 621 or Poetry conventions)
- `pyproject.toml` (following PEP 621, Poetry, or Pixi conventions)
- `setup.py` (only limited support for simple files with a single `setup()`
call and no computation involved for setting the `install_requires` and
`extras_require` arguments)
Expand Down
13 changes: 12 additions & 1 deletion fawltydeps/extract_declared_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,18 @@ def parse_extra(contents: TomlData, src: Location) -> NamedLocations:
def parse_pixi_pyproject_dependencies(
pixi_config: TomlData, source: Location
) -> Iterator[DeclaredDependency]:
"""Extract dependencies from `tool.pixi` fields in a pyproject.toml."""
"""Extract dependencies from `tool.pixi` fields in a pyproject.toml.
- [tool.pixi.dependencies] contains mandatory Conda deps
- [tool.pixi.feature.<NAME>.dependencies] contains optional Conda deps
- [tool.pixi.pypi-dependencies] contains mandatory PyPI deps
NOTE: We do not currently differentiate between Conda dependencies and PyPI
dependencies, meaning that we assume that a Conda dependency named FOO will
map one-to-one to a Python package named FOO. This is certainly not true for
Conda dependencies that are not Python packages, and it probably isn't even
true for all Conda dependencies that do indeed include Python packages.
"""

def parse_main(contents: TomlData, src: Location) -> NamedLocations:
return (
Expand Down
8 changes: 4 additions & 4 deletions fawltydeps/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
notebooks (*.ipynb).
Supports finding dependency declarations in *requirements*.txt (and .in) files,
pyproject.toml (following PEP 621 or Poetry conventions), setup.cfg, as well as
limited support for setup.py files with a single, simple setup() call and
minimal computation involved in setting the install_requires and extras_require
arguments.
pyproject.toml (following PEP 621, Poetry, or Pixi conventions), setup.cfg, as
well as limited support for setup.py files with a single, simple setup() call
and minimal computation involved in setting the install_requires and
extras_require arguments.
"""

from __future__ import annotations
Expand Down

0 comments on commit 2a66337

Please sign in to comment.