-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enhancements and refactoring: Ruff checks resolved #443
Open
MilagrosMarin
wants to merge
79
commits into
SainsburyWellcomeCentre:datajoint_pipeline
Choose a base branch
from
MilagrosMarin:datajoint_pipeline
base: datajoint_pipeline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enhancements and refactoring: Ruff checks resolved #443
MilagrosMarin
wants to merge
79
commits into
SainsburyWellcomeCentre:datajoint_pipeline
from
MilagrosMarin:datajoint_pipeline
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…dd `dj.logger` in `dj_pipeline` files
…aise` in compliance with ruff guidelines
removed dynamic references and kept the docstring static while ensuring it remains informative
add docstrings for public functions
add strict=False to zip
MilagrosMarin
changed the title
Enhancements and refactoring for security, docs, and code quality: Ruff and Pylint checks
Enhancements and refactoring for docs and code quality: Ruff and Pylint checks
Oct 29, 2024
…d add rule in `pyproject`
@ttngu207 I’ve incorporated all the changes we discussed during the PR review. |
MilagrosMarin
changed the title
Enhancements and refactoring for docs and code quality: Ruff and Pylint checks
Enhancements and refactoring for docs and code quality: Ruff checks resolved
Oct 31, 2024
MilagrosMarin
changed the title
Enhancements and refactoring for docs and code quality: Ruff checks resolved
Enhancements and refactoring: Ruff checks resolved
Oct 31, 2024
ttngu207
reviewed
Oct 31, 2024
aeon/dj_pipeline/streams.py
Outdated
Comment on lines
8
to
9
import datajoint as dj | ||
import pandas as pd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MilagrosMarin would you revert this change as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
ttngu207
approved these changes
Oct 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses issue #441 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.