Skip to content

Commit

Permalink
sample_projects: Add Pixi project using pyproject.toml
Browse files Browse the repository at this point in the history
This was created with the following commands:

  - pixi init --format pyproject pixi_pyproject_example
  - cd pixi_pyproject_example/
  - pixi add python
  - pixi add requests
  - pixi add --pypi fawltydeps
  - echo "import requests" > pixi_pyproject_example/__init__.py

followed by removing/truncating files that I do not currently consider
to be important for FawltyDeps to make sense of this project.

The result is a simple Pixi project with two declared Conda
dependencies (Python itself + requests) and one PyPI dependency
(fawltydeps), along with a single source file that imports requests.

The expected result of running FawltyDeps here is success (requests is
both declared and imported, fawltydeps is part of the default tool
exception, and Python itself is auto-ignored as a dependency).
  • Loading branch information
jherland committed Sep 11, 2024
1 parent e032a4c commit e623cf7
Show file tree
Hide file tree
Showing 72 changed files with 16,025 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/sample_projects/pixi_pyproject_example/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
3 changes: 3 additions & 0 deletions tests/sample_projects/pixi_pyproject_example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# pixi environments
.pixi
*.egg-info
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// not relevant for pixi but for `conda run -p`
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"manifest_path": "/home/jherland/code/fawltydeps/tests/sample_projects/pixi_pyproject_example/pyproject.toml",
"environment_name": "default",
"pixi_version": "0.27.1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/jherland/code/fawltydeps/tests/sample_projects/pixi_pyproject_example/.pixi/envs/default/conda-meta

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
{
"build": "pyhd8ed1ab_0",
"build_number": 0,
"constrains": [
"chardet >=3.0.2,<6"
],
"depends": [
"certifi >=2017.4.17",
"charset-normalizer >=2,<4",
"idna >=2.5,<4",
"python >=3.8",
"urllib3 >=1.21.1,<3"
],
"license": "Apache-2.0",
"license_family": "APACHE",
"md5": "5ede4753180c7a550a443c430dc8ab52",
"name": "requests",
"noarch": "python",
"purls": [
"pkg:pypi/requests?source=hash-mapping"
],
"sha256": "5845ffe82a6fa4d437a2eae1e32a1ad308d7ad349f61e337c0a890fe04c513cc",
"size": 58810,
"subdir": "noarch",
"timestamp": 1717057174842,
"version": "2.32.3",
"fn": "requests-2.32.3-pyhd8ed1ab_0.conda",
"url": "https://conda.anaconda.org/conda-forge/noarch/requests-2.32.3-pyhd8ed1ab_0.conda",
"channel": "https://conda.anaconda.org/conda-forge/",
"extracted_package_dir": "/home/jherland/.cache/rattler/cache/pkgs/requests-2.32.3-pyhd8ed1ab_0",
"files": [
"lib/python3.12/site-packages/requests-2.32.3.dist-info/INSTALLER",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/LICENSE",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/METADATA",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/RECORD",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/REQUESTED",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/WHEEL",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/direct_url.json",
"lib/python3.12/site-packages/requests-2.32.3.dist-info/top_level.txt",
"lib/python3.12/site-packages/requests/__init__.py",
"lib/python3.12/site-packages/requests/__version__.py",
"lib/python3.12/site-packages/requests/_internal_utils.py",
"lib/python3.12/site-packages/requests/adapters.py",
"lib/python3.12/site-packages/requests/api.py",
"lib/python3.12/site-packages/requests/auth.py",
"lib/python3.12/site-packages/requests/certs.py",
"lib/python3.12/site-packages/requests/compat.py",
"lib/python3.12/site-packages/requests/cookies.py",
"lib/python3.12/site-packages/requests/exceptions.py",
"lib/python3.12/site-packages/requests/help.py",
"lib/python3.12/site-packages/requests/hooks.py",
"lib/python3.12/site-packages/requests/models.py",
"lib/python3.12/site-packages/requests/packages.py",
"lib/python3.12/site-packages/requests/sessions.py",
"lib/python3.12/site-packages/requests/status_codes.py",
"lib/python3.12/site-packages/requests/structures.py",
"lib/python3.12/site-packages/requests/utils.py"
],
"paths_data": {
"paths_version": 1,
"paths": [
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/INSTALLER",
"path_type": "hardlink",
"sha256": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8",
"sha256_in_prefix": "d0edee15f91b406f3f99726e44eb990be6e34fd0345b52b910c568e0eef6a2a8",
"size_in_bytes": 5
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/LICENSE",
"path_type": "hardlink",
"sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b",
"sha256_in_prefix": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b",
"size_in_bytes": 10142
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/METADATA",
"path_type": "hardlink",
"sha256": "658ee8454c1e2e76fb8c2127116f61156b3b22941b3559c00389dca70038581a",
"sha256_in_prefix": "658ee8454c1e2e76fb8c2127116f61156b3b22941b3559c00389dca70038581a",
"size_in_bytes": 4610
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/RECORD",
"path_type": "hardlink",
"sha256": "00a2fc99faa9e02e4110bc199d925fe51d53d3f043b132b68fded2c4d9b2d030",
"sha256_in_prefix": "00a2fc99faa9e02e4110bc199d925fe51d53d3f043b132b68fded2c4d9b2d030",
"size_in_bytes": 2949
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/REQUESTED",
"path_type": "hardlink",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha256_in_prefix": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"size_in_bytes": 0
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/WHEEL",
"path_type": "hardlink",
"sha256": "189eedfe4581172c1b6a02b97a8f48a14c0b5baa3239e4ca990fbd8871553714",
"sha256_in_prefix": "189eedfe4581172c1b6a02b97a8f48a14c0b5baa3239e4ca990fbd8871553714",
"size_in_bytes": 92
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/direct_url.json",
"path_type": "hardlink",
"sha256": "aadb976c995e430a979389c626643b986c7e0070d893b3dc65e86c3af92f3e38",
"sha256_in_prefix": "aadb976c995e430a979389c626643b986c7e0070d893b3dc65e86c3af92f3e38",
"size_in_bytes": 104
},
{
"_path": "lib/python3.12/site-packages/requests-2.32.3.dist-info/top_level.txt",
"path_type": "hardlink",
"sha256": "7cc4959877dbe6b6c63a8eb1bfe3bfb545fa8fe5b28b1b2c13e4a7c1c0d1c4d4",
"sha256_in_prefix": "7cc4959877dbe6b6c63a8eb1bfe3bfb545fa8fe5b28b1b2c13e4a7c1c0d1c4d4",
"size_in_bytes": 9
},
{
"_path": "lib/python3.12/site-packages/requests/__init__.py",
"path_type": "hardlink",
"sha256": "e3168011198f0c804fb1ad8fb23a54f6bd3aca8a0afb69992874d90215915adb",
"sha256_in_prefix": "e3168011198f0c804fb1ad8fb23a54f6bd3aca8a0afb69992874d90215915adb",
"size_in_bytes": 5072
},
{
"_path": "lib/python3.12/site-packages/requests/__version__.py",
"path_type": "hardlink",
"sha256": "1557e09606663509e660f5e93a8843539f05e4451bffe5674936807ac4b5f3b8",
"sha256_in_prefix": "1557e09606663509e660f5e93a8843539f05e4451bffe5674936807ac4b5f3b8",
"size_in_bytes": 435
},
{
"_path": "lib/python3.12/site-packages/requests/_internal_utils.py",
"path_type": "hardlink",
"sha256": "9cc4329abe21b37d93a95a3901b0ab99c24486f3d487bc57965bb2ab0b252e24",
"sha256_in_prefix": "9cc4329abe21b37d93a95a3901b0ab99c24486f3d487bc57965bb2ab0b252e24",
"size_in_bytes": 1495
},
{
"_path": "lib/python3.12/site-packages/requests/adapters.py",
"path_type": "hardlink",
"sha256": "28871e72c72a6a6eab78e097465e03c0fe235fc25c97cb1de7b7edd7b291d9c4",
"sha256_in_prefix": "28871e72c72a6a6eab78e097465e03c0fe235fc25c97cb1de7b7edd7b291d9c4",
"size_in_bytes": 27451
},
{
"_path": "lib/python3.12/site-packages/requests/api.py",
"path_type": "hardlink",
"sha256": "fd96fd39aeedcd5222cd32b016b3e30c463d7a3b66fce9d2444467003c46b10b",
"sha256_in_prefix": "fd96fd39aeedcd5222cd32b016b3e30c463d7a3b66fce9d2444467003c46b10b",
"size_in_bytes": 6449
},
{
"_path": "lib/python3.12/site-packages/requests/auth.py",
"path_type": "hardlink",
"sha256": "905ef9b6a9cb72d67d31ffe19bd4d9223e1c4169cde6ec51cfca16b31e70991d",
"sha256_in_prefix": "905ef9b6a9cb72d67d31ffe19bd4d9223e1c4169cde6ec51cfca16b31e70991d",
"size_in_bytes": 10186
},
{
"_path": "lib/python3.12/site-packages/requests/certs.py",
"path_type": "hardlink",
"sha256": "67d49be35d009efea35054f2b2cd23145854eb1b2df1cb442ea7f2f04bf6de0c",
"sha256_in_prefix": "67d49be35d009efea35054f2b2cd23145854eb1b2df1cb442ea7f2f04bf6de0c",
"size_in_bytes": 429
},
{
"_path": "lib/python3.12/site-packages/requests/compat.py",
"path_type": "hardlink",
"sha256": "0b9c3f0cf2d2bab5cf81c75653bf1fa2b6b400f99b6245f61bcf50bc7e71ccf0",
"sha256_in_prefix": "0b9c3f0cf2d2bab5cf81c75653bf1fa2b6b400f99b6245f61bcf50bc7e71ccf0",
"size_in_bytes": 1817
},
{
"_path": "lib/python3.12/site-packages/requests/cookies.py",
"path_type": "hardlink",
"sha256": "6cd8be8aa123e0d3d9d34fa86feac7bf392f39bccdde5129830de0ea9692dd7c",
"sha256_in_prefix": "6cd8be8aa123e0d3d9d34fa86feac7bf392f39bccdde5129830de0ea9692dd7c",
"size_in_bytes": 18590
},
{
"_path": "lib/python3.12/site-packages/requests/exceptions.py",
"path_type": "hardlink",
"sha256": "8c93d2d545804ecf3a4a155468ba2b4e225bd52686ba83445a020225ea7e5646",
"sha256_in_prefix": "8c93d2d545804ecf3a4a155468ba2b4e225bd52686ba83445a020225ea7e5646",
"size_in_bytes": 4260
},
{
"_path": "lib/python3.12/site-packages/requests/help.py",
"path_type": "hardlink",
"sha256": "80f5f977f1fb5ddf3c6830017a386a1a097d075545453b79066898bcbdcfcc84",
"sha256_in_prefix": "80f5f977f1fb5ddf3c6830017a386a1a097d075545453b79066898bcbdcfcc84",
"size_in_bytes": 3875
},
{
"_path": "lib/python3.12/site-packages/requests/hooks.py",
"path_type": "hardlink",
"sha256": "0a2bb2b221c0dfd57951f702057148c7cdc8ac3a6ec1f37d45c4d482fdbc7ed4",
"sha256_in_prefix": "0a2bb2b221c0dfd57951f702057148c7cdc8ac3a6ec1f37d45c4d482fdbc7ed4",
"size_in_bytes": 733
},
{
"_path": "lib/python3.12/site-packages/requests/models.py",
"path_type": "hardlink",
"sha256": "938daba17cc2f2efce6a000f422f54e0c91f3bb8b8af615d6aabccaacb4f7a17",
"sha256_in_prefix": "938daba17cc2f2efce6a000f422f54e0c91f3bb8b8af615d6aabccaacb4f7a17",
"size_in_bytes": 35418
},
{
"_path": "lib/python3.12/site-packages/requests/packages.py",
"path_type": "hardlink",
"sha256": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287",
"sha256_in_prefix": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287",
"size_in_bytes": 904
},
{
"_path": "lib/python3.12/site-packages/requests/sessions.py",
"path_type": "hardlink",
"sha256": "ca44c8f145864a5b4e7c7d3b1caa25947ee44c11b0e168620556901a67244f0e",
"sha256_in_prefix": "ca44c8f145864a5b4e7c7d3b1caa25947ee44c11b0e168620556901a67244f0e",
"size_in_bytes": 30495
},
{
"_path": "lib/python3.12/site-packages/requests/status_codes.py",
"path_type": "hardlink",
"sha256": "889500780db96da4ddc3ee8f7c3d1e178aa1a48343251248fb268cab1b382c42",
"sha256_in_prefix": "889500780db96da4ddc3ee8f7c3d1e178aa1a48343251248fb268cab1b382c42",
"size_in_bytes": 4322
},
{
"_path": "lib/python3.12/site-packages/requests/structures.py",
"path_type": "hardlink",
"sha256": "f886e6855cf4e92fb968f499b94b6167afba0fd5ce8d1b935c739a6d8d38d573",
"sha256_in_prefix": "f886e6855cf4e92fb968f499b94b6167afba0fd5ce8d1b935c739a6d8d38d573",
"size_in_bytes": 2912
},
{
"_path": "lib/python3.12/site-packages/requests/utils.py",
"path_type": "hardlink",
"sha256": "1e2402e8dabf0dade4b5a32217342487e7429378901c7284b184b990373ef02c",
"sha256_in_prefix": "1e2402e8dabf0dade4b5a32217342487e7429378901c7284b184b990373ef02c",
"size_in_bytes": 33619
}
]
},
"link": {
"source": "/home/jherland/.cache/rattler/cache/pkgs/requests-2.32.3-pyhd8ed1ab_0",
"type": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory exists so that 3rd party packages can be installed
here. Read the source for site.py for more details.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/jherland/code/fawltydeps/tests/sample_projects/pixi_pyproject_example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uv-pixi
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Metadata-Version: 2.1
Name: fawltydeps
Version: 0.17.0
Summary: Find undeclared and unused 3rd-party dependencies in your Python project.
Home-page: https://github.com/tweag/FawltyDeps
License: MIT
Author: Maria Knorps
Author-email: [email protected]
Requires-Python: >=3.7.2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Provides-Extra: uv
Requires-Dist: importlib_metadata (>=6.6.0) ; python_version >= "3.8"
Requires-Dist: importlib_metadata (>=6.6.0,<6.8.0) ; python_version < "3.8"
Requires-Dist: isort (>=5.10,<5.12.0) ; python_version < "3.8"
Requires-Dist: isort (>=5.10,<6.0) ; python_version >= "3.8"
Requires-Dist: packaging (>=24.0)
Requires-Dist: pip-requirements-parser (>=32.0.1)
Requires-Dist: pydantic (>=1.10.4,<3.0.0)
Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
Requires-Dist: typing-extensions (>=4.4.0) ; python_version < "3.8"
Requires-Dist: uv (>=0.1.6) ; (python_version >= "3.8") and (extra == "uv")
Project-URL: Repository, https://github.com/tweag/FawltyDeps
Description-Content-Type: text/markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
../../../bin/fawltydeps,sha256=XCpBijtKGFizAZsBLSJyX0LDywommRfj2RbKY-OijU8,307
fawltydeps-0.17.0.dist-info/INSTALLER,sha256=LO0H8daPWMHZiOKJDg6F-RtEXo3Rkxvwh5Y9P0mQuRU,7
fawltydeps-0.17.0.dist-info/LICENSE,sha256=ooaiZ_PzdJgQ5jhDOz6rFUstD3csI7aYPQlqeq97NMU,1153
fawltydeps-0.17.0.dist-info/METADATA,sha256=ayJwgBfahmjS_oA5XeNp3obua5roIt4EZlEmTDsS9IA,31955
fawltydeps-0.17.0.dist-info/RECORD,,
fawltydeps-0.17.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
fawltydeps-0.17.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
fawltydeps-0.17.0.dist-info/entry_points.txt,sha256=rDzthBu6zRJrGu1Craxcq6TIFZC40jkdvfkvUBNm6pY,51
fawltydeps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
fawltydeps/__main__.py,sha256=kdtB-2IhyZM_NnortGPhEt-mbAiTdIHNu_nLS1s8apI,154
fawltydeps/check.py,sha256=P6RQnr8RzbsZLdIvwb5uzXzXPro2MLh8nJgysS5bAzo,2237
fawltydeps/cli_parser.py,sha256=4B--w_o4zsGK4CQe2j3bxjwYco6h-gAXxWVss1WvWtw,11397
fawltydeps/dir_traversal.py,sha256=4HPsf_NgU0Zcom5aEOi3DT63dNG0CHOUAUJ3aHLFCVI,11824
fawltydeps/extract_declared_dependencies.py,sha256=WP6MMZcnaVxf0hmF-0jL9DdzQj0vo4CbnmY71wvLHC0,17997
fawltydeps/extract_imports.py,sha256=AfFXt1CI-e411AnkodRwWD-BfDoaNV6M9IJNrCal5JI,8657
fawltydeps/gitignore_parser.py,sha256=5Y2ciOvEH39yW8NRgxRMaNsalnll81fioXUav7HPj-Y,10074
fawltydeps/limited_eval.py,sha256=Q0tS_u3vPbzv1caUfzt1ky7P5osk5eBw4c2uUxeV25w,4002
fawltydeps/main.py,sha256=Pb87ltSmE0MzQz-C89OhJQAEBLBMEoXj8OA7kBA_6HU,15933
fawltydeps/packages.py,sha256=Sere572bqcUli36Q7oYfiD3bCd3jttH-kbB7AwsiNFg,25647
fawltydeps/settings.py,sha256=cprhvdENeSpVB2f9qUqh03RtXUw4TpNRPGgAuJ3iH7c,12457
fawltydeps/traverse_project.py,sha256=aPk-FDuBfmol9IzGFx-68KunOE4j300N3XlCk4b9o74,8599
fawltydeps/types.py,sha256=poFz0hW6_2ukTr5ypjVe_mw7Z0YM1-6ly_RiDmHyM0U,11561
fawltydeps/utils.py,sha256=SikjuV9vhrU-GdCXxTkCNidMhabzji_Ob5_6Z2L5pZ4,3030
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: poetry-core 1.9.0
Root-Is-Purelib: true
Tag: py3-none-any
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[console_scripts]
fawltydeps=fawltydeps.main:main

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uv-pixi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Metadata-Version: 2.3
Name: pixi_pyproject_example
Version: 0.1.0
Summary: Add a short description here
Author-email: Johan Herland <[email protected]>
Requires-Python: >=3.11
Requires-Dist: fawltydeps<0.18,>=0.17.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_pixi_pyproject_example.pth,sha256=bLlxNz_Pa0P2g8uJ4g73nqiFl-XHfkBewamw9FPCDJo,75
pixi_pyproject_example-0.1.0.dist-info/INSTALLER,sha256=LO0H8daPWMHZiOKJDg6F-RtEXo3Rkxvwh5Y9P0mQuRU,7
pixi_pyproject_example-0.1.0.dist-info/METADATA,sha256=WHSreME_v_vYT7sEQSy98QMBHliAEtzqAZo_N3UiDCY,221
pixi_pyproject_example-0.1.0.dist-info/RECORD,,
pixi_pyproject_example-0.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
pixi_pyproject_example-0.1.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
pixi_pyproject_example-0.1.0.dist-info/direct_url.json,sha256=m_PVGFedroOVp2EayoZODUubER1qib3ndiEy4uL_nIk,121
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: hatchling 1.25.0
Root-Is-Purelib: true
Tag: py3-none-any
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"url":"file:///home/jherland/code/fawltydeps/tests/sample_projects/pixi_pyproject_example","dir_info":{"editable":true}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conda
Loading

0 comments on commit e623cf7

Please sign in to comment.