Skip to content

Comments

chore: document attrs and setuptools dependencies in requirements.txt#8

Open
dlaehnemann wants to merge 2 commits intoaertslab:mainfrom
dlaehnemann:patch-1
Open

chore: document attrs and setuptools dependencies in requirements.txt#8
dlaehnemann wants to merge 2 commits intoaertslab:mainfrom
dlaehnemann:patch-1

Conversation

@dlaehnemann
Copy link

The code uses import attr:
https://github.com/search?q=repo%3Aaertslab%2Fctxcore+attr&type=code

And from the syntax (for example attr.s and attr.ib()), I conclude that this must be using the attrs python package, see for example: https://www.attrs.org/en/stable/api-attr.html#attr.ib

This came up, because this dependency is also missing from the bioconda package and caused a ModuleNotFoundError: No module named 'attr' error in a downstream package. I'll also go and fix this there.

If I'm wrong with the package dependency, please correct me!

The code uses `import attr`:
https://github.com/search?q=repo%3Aaertslab%2Fctxcore+attr&type=code

And from the syntax (for example `attr.s` and `attr.ib()`), I conclude that this must be using the `attrs` python package, see for example:
https://www.attrs.org/en/stable/api-attr.html#attr.ib

This came up, because this dependency is also missing from the bioconda package and [caused a `ModuleNotFoundError: No module named 'attr'` error in a downstream package](https://github.com/bioconda/bioconda-recipes/actions/runs/19262708208/job/55181204294?pr=60625#step:10:904). I'll also go and fix this there.
dlaehnemann added a commit to bioconda/bioconda-recipes that referenced this pull request Nov 12, 2025
This was previously undocumented upstream, but there's now a pull request to fix this:
aertslab/ctxcore#8

It came up in a downstream project, `pyscenic`, with [a `ModuleNotFoundError: No module named 'attr'` error in a downstream package](https://github.com/bioconda/bioconda-recipes/actions/runs/19262708208/job/55181204294?pr=60625#step:10:904).
`pkg_resources` are needed upon `import ctxcore`:
https://github.com/aertslab/ctxcore/blob/190be03a339a3db370c7d171ff709bf3d7442ecc/src/ctxcore/__init__.py#L5

This [came up in the bioconda recipe testing during the CI run](https://github.com/bioconda/bioconda-recipes/actions/runs/19305192354/job/55210829674?pr=60658#step:10:627) there:
```
 17:03:45 BIOCONDA INFO (OUT) import: 'ctxcore'
17:03:45 BIOCONDA INFO (OUT) Traceback (most recent call last):
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/test_tmp/run_test.py", line 2, in <module>
17:03:45 BIOCONDA INFO (OUT)     import ctxcore
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.13/site-packages/ctxcore/__init__.py", line 5, in <module>
17:03:45 BIOCONDA INFO (OUT)     from pkg_resources import DistributionNotFound, get_distribution
17:03:45 BIOCONDA INFO (OUT) ModuleNotFoundError: No module named 'pkg_resources'
```
@dlaehnemann dlaehnemann changed the title chore: document attrs dependency in requirements.txt chore: document attrs and setuptools dependencies in requirements.txt Nov 12, 2025
@dlaehnemann
Copy link
Author

This now also documents the runtime dependency on setuptools.

pkg_resources are needed upon import ctxcore:

from pkg_resources import DistributionNotFound, get_distribution

This came up in the bioconda recipe testing during the CI run there:

 17:03:45 BIOCONDA INFO (OUT) import: 'ctxcore'
17:03:45 BIOCONDA INFO (OUT) Traceback (most recent call last):
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/test_tmp/run_test.py", line 2, in <module>
17:03:45 BIOCONDA INFO (OUT)     import ctxcore
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.13/site-packages/ctxcore/__init__.py", line 5, in <module>
17:03:45 BIOCONDA INFO (OUT)     from pkg_resources import DistributionNotFound, get_distribution
17:03:45 BIOCONDA INFO (OUT) ModuleNotFoundError: No module named 'pkg_resources'

@dlaehnemann
Copy link
Author

Just for the cross-referencing to go both ways, here's the fix in the bioconda recipe:
bioconda/bioconda-recipes#60658

@dlaehnemann
Copy link
Author

As the most recent contributor, would you care to have a look, @ghuls ?

dlaehnemann added a commit to bioconda/bioconda-recipes that referenced this pull request Nov 13, 2025
…ools` runtime dependencies (#60658)

* fix: `ctxcore` recipe add previously undocumented `attrs` dependency

This was previously undocumented upstream, but there's now a pull request to fix this:
aertslab/ctxcore#8

It came up in a downstream project, `pyscenic`, with [a `ModuleNotFoundError: No module named 'attr'` error in a downstream package](https://github.com/bioconda/bioconda-recipes/actions/runs/19262708208/job/55181204294?pr=60625#step:10:904).

* fix: also add setuptools as runtime dependency

`pkg_resources` are needed upon `import ctxcore`:
https://github.com/aertslab/ctxcore/blob/190be03a339a3db370c7d171ff709bf3d7442ecc/src/ctxcore/__init__.py#L5

This [came up in the bioconda recipe testing during the CI run](https://github.com/bioconda/bioconda-recipes/actions/runs/19305192354/job/55210829674?pr=60658#step:10:627) there:
```
 17:03:45 BIOCONDA INFO (OUT) import: 'ctxcore'
17:03:45 BIOCONDA INFO (OUT) Traceback (most recent call last):
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/test_tmp/run_test.py", line 2, in <module>
17:03:45 BIOCONDA INFO (OUT)     import ctxcore
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.13/site-packages/ctxcore/__init__.py", line 5, in <module>
17:03:45 BIOCONDA INFO (OUT)     from pkg_resources import DistributionNotFound, get_distribution
17:03:45 BIOCONDA INFO (OUT) ModuleNotFoundError: No module named 'pkg_resources'
```
ljwharbers pushed a commit to ljwharbers/bioconda-recipes that referenced this pull request Dec 5, 2025
…ools` runtime dependencies (bioconda#60658)

* fix: `ctxcore` recipe add previously undocumented `attrs` dependency

This was previously undocumented upstream, but there's now a pull request to fix this:
aertslab/ctxcore#8

It came up in a downstream project, `pyscenic`, with [a `ModuleNotFoundError: No module named 'attr'` error in a downstream package](https://github.com/bioconda/bioconda-recipes/actions/runs/19262708208/job/55181204294?pr=60625#step:10:904).

* fix: also add setuptools as runtime dependency

`pkg_resources` are needed upon `import ctxcore`:
https://github.com/aertslab/ctxcore/blob/190be03a339a3db370c7d171ff709bf3d7442ecc/src/ctxcore/__init__.py#L5

This [came up in the bioconda recipe testing during the CI run](https://github.com/bioconda/bioconda-recipes/actions/runs/19305192354/job/55210829674?pr=60658#step:10:627) there:
```
 17:03:45 BIOCONDA INFO (OUT) import: 'ctxcore'
17:03:45 BIOCONDA INFO (OUT) Traceback (most recent call last):
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/test_tmp/run_test.py", line 2, in <module>
17:03:45 BIOCONDA INFO (OUT)     import ctxcore
17:03:45 BIOCONDA INFO (OUT)   File "/opt/conda/conda-bld/ctxcore_1762966867340/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/lib/python3.13/site-packages/ctxcore/__init__.py", line 5, in <module>
17:03:45 BIOCONDA INFO (OUT)     from pkg_resources import DistributionNotFound, get_distribution
17:03:45 BIOCONDA INFO (OUT) ModuleNotFoundError: No module named 'pkg_resources'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants