Skip to content

Conversation

@stevenhua0320
Copy link
Contributor

@stevenhua0320 stevenhua0320 commented Nov 19, 2025

@sbillinge I used package update but now both my local pytest and here raises ModuleNotFoundError. I have done pip install -e ., but still does not work. The traceback is shown below.

==================================== ERRORS ====================================
__________________ ERROR collecting tests/test_exceptions.py ___________________
ImportError while importing test module '/home/runner/work/diffpy.pdffit2/diffpy.pdffit2/tests/test_exceptions.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/share/miniconda/envs/test/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_exceptions.py:21: in <module>
    from diffpy.pdffit2 import PdfFit, pdffit2
E   ImportError: cannot import name 'PdfFit' from 'diffpy.pdffit2' (/usr/share/miniconda/envs/test/lib/python3.13/site-packages/diffpy/pdffit2/__init__.py). Did you mean: 'pdffit2'?
____________________ ERROR collecting tests/test_pdffit.py _____________________
ImportError while importing test module '/home/runner/work/diffpy.pdffit2/diffpy.pdffit2/tests/test_pdffit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/share/miniconda/envs/test/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_pdffit.py:9: in <module>
    from diffpy.pdffit2 import PdfFit, pdffit2
E   ImportError: cannot import name 'PdfFit' from 'diffpy.pdffit2' (/usr/share/miniconda/envs/test/lib/python3.13/site-packages/diffpy/pdffit2/__init__.py). Did you mean: 'pdffit2'?
________________ ERROR collecting tests/test_phase_fractions.py ________________
ImportError while importing test module '/home/runner/work/diffpy.pdffit2/diffpy.pdffit2/tests/test_phase_fractions.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/share/miniconda/envs/test/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_phase_fractions.py:9: in <module>
    from diffpy.pdffit2 import PdfFit
E   ImportError: cannot import name 'PdfFit' from 'diffpy.pdffit2' (/usr/share/miniconda/envs/test/lib/python3.13/site-packages/diffpy/pdffit2/__init__.py). Did you mean: 'pdffit2'?
_________________ ERROR collecting tests/test_shape_factors.py _________________
ImportError while importing test module '/home/runner/work/diffpy.pdffit2/diffpy.pdffit2/tests/test_shape_factors.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/share/miniconda/envs/test/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_shape_factors.py:11: in <module>
    from diffpy.pdffit2 import PdfFit, pdffit2
E   ImportError: cannot import name 'PdfFit' from 'diffpy.pdffit2' (/usr/share/miniconda/envs/test/lib/python3.13/site-packages/diffpy/pdffit2/__init__.py). Did you mean: 'pdffit2'?
=========================== short test summary info ============================
ERROR tests/test_exceptions.py
ERROR tests/test_pdffit.py
ERROR tests/test_phase_fractions.py
ERROR tests/test_shape_factors.py
!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 4 errors in 0.41s ===============================

@sbillinge
Copy link
Contributor

Lots of issues here. Please start over and let's go more slowly. Please do the no-edit updates, pre-commit updatess and so on. It will fail tests, but we can start merging things more easily. To be on the safe side I will make a migration branch and lets use that as base and merge to main at the end.

@sbillinge
Copy link
Contributor

migration branch is created. Please use that as base. First PRs ideally would have no manual edits, just pre-commit and adding files that have not been modified. If you make mods for some reason, please let me know to make it easier to merge.

@stevenhua0320
Copy link
Contributor Author

Closed as we do from migration branch.

@stevenhua0320 stevenhua0320 deleted the scikit-update branch November 19, 2025 16:32
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