-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python311Packages.ngs-tools, python312Packages.ngs-tools: init at 1.8.5 #344240
base: master
Are you sure you want to change the base?
Conversation
homepage = "https://github.com/Lioscro/ngs-tools"; | ||
description = "Reusable tools for working with next-generation sequencing (NGS) data"; | ||
license = lib.licenses.mit; | ||
maintainers = with lib.maintainers; [ youhaveme9 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have not yet added your name to maintainers/maintainer-list.nix
, please do so in another commit of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @natsukium
Already created a PR regarding this
#343954
buildPythonPackage rec { | ||
pname = "ngs-tools"; | ||
version = "1.8.5"; | ||
format = "setuptools"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format = "setuptools"; | |
pyproject = true; |
Please add pyproject = true;
and build-system = [ setuptools ];
to avoid the legacy setuptools build.
Note that the pyproject format falls back to using setuptools, so you can use pyproject = true even if the package only has a setup.py. When set to false, you can use the existing hooks or provide your own logic to build the package. This can be useful for packages that don't support the pyproject format. When unset, the legacy setuptools hooks are used for backwards compatibility.
|
||
src = fetchPypi { | ||
inherit pname version; | ||
sha256 = "OA4jahAcWxrDwPzbzJCKIQF5tu8qk/vqn06w7C7cHeA="; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sha256 = "OA4jahAcWxrDwPzbzJCKIQF5tu8qk/vqn06w7C7cHeA="; | |
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; |
Please use SRI hash instead.
sha256 = "OA4jahAcWxrDwPzbzJCKIQF5tu8qk/vqn06w7C7cHeA="; | ||
}; | ||
|
||
propagatedBuildInputs = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propagatedBuildInputs = [ | |
dependencies = [ |
typing-extensions | ||
]; | ||
|
||
nativeBuildInputs = [ setuptools-scm ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setuptools-scm
should go to build-system
.
|
||
nativeBuildInputs = [ setuptools-scm ]; | ||
pythonImportsCheck = [ "ngs_tools" ]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you enable tests with pytestCheckHook
or similar?
Make sure the tests are enabled using for example pytestCheckHook and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabled test using pytestCheckHook
But getting import errors
==================================== ERRORS ====================================
______________________ ERROR collecting tests/test_bam.py ______________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_bam.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_bam.py:7: in <module>
from tests.mixins import TestMixin, tqdm_mock
E ModuleNotFoundError: No module named 'tests'
____________________ ERROR collecting tests/test_binary.py _____________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_binary.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_binary.py:6: in <module>
from . import mixins
E ImportError: attempted relative import with no known parent package
___________________ ERROR collecting tests/test_chemistry.py ___________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_chemistry.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_chemistry.py:4: in <module>
from tests.mixins import TestMixin
E ModuleNotFoundError: No module named 'tests'
_____________________ ERROR collecting tests/test_fasta.py _____________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_fasta.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_fasta.py:6: in <module>
from . import mixins
E ImportError: attempted relative import with no known parent package
_____________________ ERROR collecting tests/test_fastq.py _____________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_fastq.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_fastq.py:8: in <module>
from . import mixins
E ImportError: attempted relative import with no known parent package
______________________ ERROR collecting tests/test_gtf.py ______________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_gtf.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_gtf.py:6: in <module>
from . import mixins
E ImportError: attempted relative import with no known parent package
___________________ ERROR collecting tests/test_sequence.py ____________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_sequence.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_sequence.py:8: in <module>
from . import mixins
E ImportError: attempted relative import with no known parent package
_____________________ ERROR collecting tests/test_utils.py _____________________
ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_utils.py:11: in <module>
from . import mixins
E ImportError: attempted relative import with no known parent package
=========================== short test summary info ============================
ERROR tests/test_bam.py
ERROR tests/test_binary.py
ERROR tests/test_chemistry.py
ERROR tests/test_fasta.py
ERROR tests/test_fastq.py
ERROR tests/test_gtf.py
ERROR tests/test_sequence.py
ERROR tests/test_utils.py
!!!!!!!!!!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 8 errors in 0.63s ===============================
error: builder for '/nix/store/ly95bm3jqb625s9qqczr8zc58qdwpvqi-python3.12-ngs-tools-1.8.5.drv' failed with exit code 2;
last 25 log lines:
> /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> tests/test_sequence.py:8: in <module>
> from . import mixins
> E ImportError: attempted relative import with no known parent package
> _____________________ ERROR collecting tests/test_utils.py _____________________
> ImportError while importing test module '/private/tmp/nix-build-python3.12-ngs-tools-1.8.5.drv-0/ngs-tools-1.8.5/tests/test_utils.py'.
> Hint: make sure your test modules/packages have valid Python names.
> Traceback:
> /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/importlib/__init__.py:90: in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> tests/test_utils.py:11: in <module>
> from . import mixins
> E ImportError: attempted relative import with no known parent package
> =========================== short test summary info ============================
> ERROR tests/test_bam.py
> ERROR tests/test_binary.py
> ERROR tests/test_chemistry.py
> ERROR tests/test_fasta.py
> ERROR tests/test_fastq.py
> ERROR tests/test_gtf.py
> ERROR tests/test_sequence.py
> ERROR tests/test_utils.py
> !!!!!!!!!!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!!!!!!!!!!!
> ============================== 8 errors in 0.63s ===============================
For full logs, run 'nix-store -l /nix/store/ly95bm3jqb625s9qqczr8zc58qdwpvqi-python3.12-ngs-tools-1.8.5.drv'.
While running pytest
in the ngs-tools, passes all the test
I tried using pytest manually
nativeCheckInputs = [ pytest ];
postInstall = ''
pytest
'';
But still getting the same error
Can you please tell me what am I missing here?
Description of changes
Reusable tools for working with next-generation sequencing (NGS) data
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.