Closed MilagrosMarin closed 3 days ago
@ttngu207 I’ve incorporated all the changes we discussed during the PR review.
Can we re- remove ignoring ruff d104 and d100 errors in the pyproject.toml in this PR as well?
Can we re- remove ignoring ruff d104 and d100 errors in the pyproject.toml in this PR as well?
wdym? I thought this was already the case? These are all that's left 🎉 https://github.com/SainsburyWellcomeCentre/aeon_mecha/blob/48493cbc0de8b6e2a5e20bcebc0f30f3f7e6719b/pyproject.toml#L99-L106
@lochhh and @ttngu207 , thank you both so much for your reviews! I’ve completed the third round of review for this PR. Since there were many new suggestions in different forms, could you please @lochhh give it a final review? Thank you!
Thanks @MilagrosMarin for addressing all comments. I made another PR here with some final suggestions. And just one last comment about noqa B023 here:
If it's too much trouble to test this we can also keep the current change.
I have tested this, good to go here
All comments/suggestions have been addressed/resolved PR merged
This PR closes #441 and #417 by removing the exclusion of ruff checks for
dj_pipeline
frompyproject.toml
.streams.py
tests
This is a summary of the relevant changes that have been implemented, with all checks passing:
Resolved issues for
aeon/dj_pipeline
:plotting.py
.DeviceDataStream.key_source
, ensuring it remains informative.strict=False
to the zip function to prevent the function from raising aValueError
if the iterables passed to it do not have the same length.hashlib.md5
withhashlib.sha256
due to known vulnerabilities in the MD5 hashing algorithm -> Reverted: Change was reverted, and an ignore rule was added due to potential breakage introduced by the update.as err
and raising exceptions withraise ... from err
to differentiate errors.X | Y
syntax forisinstance
calls, as introduced in Python 3.10.visit_analysis
to use the ternary operator.pyproject.toml
list: No issues found for B006, B021, S110, UP038, E999, E722, F821, S324, S605, S607, E999, PLR2004.read
method in theJsonList
class withinaeon/io/reader.py
.gen_hex_grad
inaeon/analysis/block_plotting.py
.aeon/analysis/block_plotting.py
.# noqa
comments for specific cases, e.g., inreader
for F821 and# noqa PLW0127
forvisit_analysis.py
.Additional fixes to the rest of the reporitory:
In addition to the above changes, I have also resolved most of the ruff lint issues from the ignored list in
pyproject.toml
, ensuring all checks passed:logger=dj.logger
where appropriate. -> Reverted assertions replacement intests
and added rule inpyproject
since it is acceptable to use for small, simple tests.pytest
intests
.pyproject.toml
updated accordinglyDeprecation Fix:
datetime.utcnow()
todatetime.now(timezone.utc)
to address deprecation issues.