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 10, 2024
1 parent d24afc0 commit 322300e
Show file tree
Hide file tree
Showing 3 changed files with 18 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
14 changes: 13 additions & 1 deletion fawltydeps/extract_declared_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,19 @@ 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.pypi-dependencies] contains mandatory PyPI deps
- [tool.pixi.feature.<NAME>.dependencies] contains optional Conda deps
- [tool.pixi.feature.<NAME>.pypi-dependencies] contains optional 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 322300e

Please sign in to comment.