Skip to content

Ruff fixes (various message classes per commit) - #63

Merged
dylanjmcconnell merged 19 commits into
Open-ISP:mainfrom
bje-:new-ruff-fixes
Sep 11, 2026
Merged

dylanjmcconnell merged 19 commits into
Open-ISP:mainfrom
bje-:new-ruff-fixes

Conversation

@bje-

@bje- bje- commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.76923% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/isp_trace_parser/get_data.py 50.00% 1 Missing and 1 partial ⚠️
...trace_parser/trace_restructure_helper_functions.py 77.77% 2 Missing ⚠️
src/isp_trace_parser/optimise_parquet.py 75.00% 0 Missing and 1 partial ⚠️
src/isp_trace_parser/remote/download.py 92.85% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/isp_trace_parser/__init__.py 100.00% <ø> (ø)
...p_trace_parser/construct_reference_year_mapping.py 85.71% <100.00%> (ø)
src/isp_trace_parser/demand_trace_metadata.py 100.00% <100.00%> (ø)
src/isp_trace_parser/demand_traces.py 97.50% <100.00%> (ø)
src/isp_trace_parser/input_validation.py 100.00% <100.00%> (ø)
src/isp_trace_parser/resource_trace_metadata.py 100.00% <100.00%> (ø)
src/isp_trace_parser/solar_traces.py 100.00% <100.00%> (ø)
src/isp_trace_parser/trace_formatter.py 100.00% <100.00%> (ø)
src/isp_trace_parser/wind_traces.py 100.00% <100.00%> (ø)
src/isp_trace_parser/optimise_parquet.py 82.35% <75.00%> (-2.50%) ⬇️
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bje- bje- changed the title Ruff fixes (class C messages) Ruff fixes (various message classes per commit) Sep 8, 2026
@dylanjmcconnell

Copy link
Copy Markdown
Member

Hey Ben - thanks for this! I think mostly fine. One small bug in the error msg generation in the download.py (see suggested fix above).

The introduction of the logging seems slightly more than just linting / style changes (at least imho?). I do agree that the print statements aren't great (and were supposed to be temporary) - and using proper logging is a good, but I do wonder if it maybe should be more deliberately introduced - (probably set it up differently across the library?)

Not a strongly held view - but perhaps could be a separate PR / issues.

@bje-

bje- commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

The introduction of the logging seems slightly more than just linting / style changes (at least imho?). I do agree that the print statements aren't great (and were supposed to be temporary) - and using proper logging is a good, but I do wonder if it maybe should be more deliberately introduced - (probably set it up differently across the library?)

Not a strongly held view - but perhaps could be a separate PR / issues.

Yep, OK, fair enough. I'll make that a separate change.

Comment thread src/isp_trace_parser/remote/download.py Outdated
Comment on lines +140 to +142
msg = f"Cannot strip {strip_levels} levels from path with only "
f"{len(path_parts)} parts: {url_path}"
raise ValueError(msg)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Second half of this error msg lost (just need to add a parenthesis I think)

Suggested change
msg = f"Cannot strip {strip_levels} levels from path with only "
f"{len(path_parts)} parts: {url_path}"
raise ValueError(msg)
msg = (f"Cannot strip {strip_levels} levels from path with only "
f"{len(path_parts)} parts: {url_path}")
raise ValueError(msg)

Fix multi-line construction of 'msg'.

@dylanjmcconnell dylanjmcconnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

@dylanjmcconnell
dylanjmcconnell merged commit 6a3d169 into Open-ISP:main Sep 11, 2026
17 of 18 checks passed
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