Skip to content

skpkg: line length fixes, GH workflow edits, and other small edits #136

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

Merged
merged 7 commits into from
Jun 12, 2025

Conversation

cadenmyers13
Copy link
Contributor

It looks like a lot of edits were made here but its mostly just autofixes made by pre-commit.

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (migration@d47b719). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff              @@
##             migration     #136   +/-   ##
============================================
  Coverage             ?   98.97%           
============================================
  Files                ?        6           
  Lines                ?     1267           
  Branches             ?        0           
============================================
  Hits                 ?     1254           
  Misses               ?       13           
  Partials             ?        0           
Files with missing lines Coverage Δ
tests/test_exceptions.py 99.80% <100.00%> (ø)
tests/test_pdffit.py 99.76% <100.00%> (ø)
tests/test_phase_fractions.py 98.70% <100.00%> (ø)
tests/test_shape_factors.py 99.53% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge
Copy link
Contributor

Thanks @cadenmyers13 . If it is all autofixes I can merge it. If it s "mostly" autofixes, please tell me the manual fixes and I will check them.

In general, we want the autofix PRs to be just autofixed.

@cadenmyers13
Copy link
Contributor Author

@sbillinge the only manual fixes were changing the copyright dates (going from 2024-2025) so basically it's all autofixed

@sbillinge sbillinge merged commit 8bab2cf into diffpy:migration Jun 12, 2025
4 checks passed
@sbillinge
Copy link
Contributor

I merged this, but please can you confirm that numpy is a requirement? It seems odd that we would be adding this if it wasn't there before @cadenmyers13.

@cadenmyers13
Copy link
Contributor Author

@sbillinge numpy is used in tests and its in doc/source/. The only use of it in src/ is in this function.

class EasyPDFPlotting(object):
.
.
.
    @staticmethod
    def _asarray(x, dtype=None):
        import numpy

        return numpy.asarray(x, dtype=dtype)

@sbillinge
Copy link
Contributor

@sbillinge numpy is used in tests and its in doc/source/. The only use of it in src/ is in this function.

class EasyPDFPlotting(object):
.
.
.
    @staticmethod
    def _asarray(x, dtype=None):
        import numpy

        return numpy.asarray(x, dtype=dtype)

interesting. Is that class used anywhere? I don't think we had any complaints from people when it wasn't in conda.txt. For the uses in tests and docs we don't need it in conda.txt.

@cadenmyers13
Copy link
Contributor Author

Is that class used anywhere?

@sbillinge when i cmd+F search for it its only found in the file it is located in which is src/diffpy/pdffit2/ipy_ext.py. So maybe its not needed as a dependency. There's a docstring at the top of the file saying what this module is for:

"""This module defines functions within IPython session to simulate the old
pdffit2 interactive session.

Usage: %load_ext diffpy.pdffit2.ipy_ext
"""

@sbillinge
Copy link
Contributor

I am guessing that that was a Pavol testing thing. Let's remove numpy from conda.txt etc.

@cadenmyers13
Copy link
Contributor Author

@sbillinge okay ill send a PR

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