Hi all, Quick update.
I tinkered with two different methods of: - checking if a package installs on Fedora with pip - checking if it can be imported - checking if the provided command line tools work One was using tmt, the other using pytest. - tmt: https://pagure.io/neuro-sig/NeuroFedora/pull-request/582 - pytest: https://pagure.io/neuro-sig/NeuroFedora/pull-request/581 I think the pytest system works better because: - I couldn't figure out if tmt can do things in parallel - tmt doesn't seem to have the same configurability in terms of parameterized tests and so on (or again, I haven't been able to figure out how to do it properly) For the pytest workflow, one simply needs to add a json file for the package with some information: - name of the pypi package - extra packages - imports to check - clis to check The tests will pick up this info and run the tests. We've started to orphan packages and add them to the pytest testing framework. You can see this in the PR. So far we've not run into a package that is not installable/usable via pip on py3.12. I need to run checks with other supported python versions. I'm trying to figure out if that's something that can be passed as a parameter to the pytests too: > $ pytest -n auto -v > ==================================================================================== > test session starts > ===================================================================================== > platform linux -- Python 3.12.11, pytest-8.4.1, pluggy-1.6.0 -- > /home/asinha/.local/share/virtualenvs/neurofedora-check/bin/python > cachedir: .pytest_cache > rootdir: > /home/asinha/Documents/02_Code/00_mine/NeuroFedora/pagure/python-package-usage-check > plugins: xdist-3.8.0, shutil-1.8.1, virtualenv-1.8.1 > 16 workers [14 items] > scheduling tests via LoadScheduling > > test_package.py::TestFedoraPythonPackage::test_installing[packages/mne] > test_package.py::TestFedoraPythonPackage::test_installing[packages/neat] > test_package.py::TestFedoraPythonPackage::test_installing[packages/netpyne] > test_package.py::TestFedoraPythonPackage::test_installing[packages/neurotune] > test_package.py::TestFedoraPythonPackage::test_installing[packages/pybv] > test_package.py::TestFedoraPythonPackage::test_installing[packages/nilearn] > test_package.py::TestFedoraPythonPackage::test_installing[packages/mne-bids] > test_package.py::TestFedoraPythonPackage::test_installing[packages/bluepyopt] > test_package.py::TestFedoraPythonPackage::test_installing[packages/pynn] > test_package.py::TestFedoraPythonPackage::test_installing[packages/pyneuroml] > test_package.py::TestFedoraPythonPackage::test_installing[packages/neuron] > test_package.py::TestFedoraPythonPackage::test_installing[packages/nipype] > test_package.py::TestFedoraPythonPackage::test_installing[packages/libneuroml] > test_package.py::TestFedoraPythonPackage::test_installing[packages/lfpy] > [gw11] [ 7%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/pybv] > [gw7] [ 14%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/neuron] > [gw13] [ 21%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/pynn] > [gw2] [ 28%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/libneuroml] > [gw8] [ 35%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/neurotune] > [gw4] [ 42%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/mne] > [gw1] [ 50%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/lfpy] > [gw9] [ 57%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/nilearn] > [gw6] [ 64%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/netpyne] > [gw0] [ 71%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/bluepyopt] > [gw3] [ 78%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/mne-bids] > [gw5] [ 85%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/neat] > [gw10] [ 92%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/nipype] > [gw12] [100%] PASSED > test_package.py::TestFedoraPythonPackage::test_installing[packages/pyneuroml] > > ==================================================================================== > 14 passed in 46.60s > ===================================================================================== I'm running these locally in a virtual env for the moment. This works fine. I don't know if there's the possibility of running this on Fedora infra somewhere. We'll look into that later. -- Thanks, Regards, Ankur Sinha "FranciscoD" (He / Him / His) | https://fedoraproject.org/wiki/User:Ankursinha Time zone: Europe/London
signature.asc
Description: PGP signature
-- _______________________________________________ python-devel mailing list -- python-devel@lists.fedoraproject.org To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue