Skip to content

Refactor CLI utils module#481

Open
ajjackson wants to merge 14 commits intorelease-2.0.0from
mccabe
Open

Refactor CLI utils module#481
ajjackson wants to merge 14 commits intorelease-2.0.0from
mccabe

Conversation

@ajjackson
Copy link
Copy Markdown
Member

In support of work on mccabe complexity.

It is very difficult to review code that moves and changes simultaneously, so here we separately implement the code movement of this rather large utility module into private submodules.

@ajjackson ajjackson changed the base branch from master to release-2.0.0 April 14, 2026 11:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Test Results

   22 files   -     25     22 suites   - 25   20m 3s ⏱️ - 34m 9s
1 117 tests ±     0  1 111 ✅ ±     0   6 💤 ± 0  0 ❌ ±0 
9 966 runs   - 16 594  9 909 ✅  - 16 504  57 💤  - 90  0 ❌ ±0 

Results for commit b45cbe7. ± Comparison against base commit 4c6046f.

♻️ This comment has been updated with latest results.

This file is way too large and hard to navigate
At this point we may as well finish the job and make this file a
namespace only.
This is theoretically a breaking change, but going into 2.0 so no big
deal. Still it doesn't seem worth advertising?
Copy link
Copy Markdown
Collaborator

@oerc0122 oerc0122 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good overall but failing. Many of these may not want to go in this PR, since I think we want this to mostly be a transcription, but can get away with some more modern Python features for potentially better expression.

Comment thread euphonic/cli/utils/__init__.py
Comment thread euphonic/cli/utils/_band_structure.py Outdated
Comment thread euphonic/cli/utils/_band_structure.py Outdated
Comment thread euphonic/cli/utils/_band_structure.py Outdated
Comment thread euphonic/cli/utils/_band_structure.py
Comment thread euphonic/cli/utils/_loaders.py
Comment thread euphonic/cli/utils/_loaders.py Outdated
Comment thread euphonic/cli/utils/_kwargs.py Outdated
Comment thread euphonic/cli/utils/_grids.py Outdated
Comment thread euphonic/cli/utils/_dw.py
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
ajjackson and others added 4 commits April 21, 2026 16:25
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
General principle is to make parameter types permissive, but we _know_
this is coming from argparse and users aren't supposed to play with it.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4406 4325 98% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: b45cbe7 by action🐍

@ajjackson ajjackson requested a review from oerc0122 April 21, 2026 16:25
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