Skip to content
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

chore: introduce ruff as a linter #167

Merged
merged 4 commits into from
May 3, 2023
Merged

chore: introduce ruff as a linter #167

merged 4 commits into from
May 3, 2023

Conversation

ab93
Copy link
Member

@ab93 ab93 commented May 3, 2023

  • Add ruff for linting which is a very quick Rust based Python linter
  • Remove flake8 since it is covered by ruff
  • Add various checks for ruff including Pyflakes, PyCodestyle, Pylint, Numpy-specific etc.
  • Update github hook for ruff
  • Add precommit-config to automatically run checks before any commit

Note: Almost all of the python file and doc based changes have come from either adhering to the linting rules, or the linters auto-fixing them.

@ab93 ab93 added the chore Improvements in developments, code cleaning etc. label May 3, 2023
@ab93 ab93 self-assigned this May 3, 2023
@ab93 ab93 added this to the v0.4 milestone May 3, 2023
@ab93 ab93 linked an issue May 3, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #167 (db8a1b8) into main (03514d6) will increase coverage by 0.15%.
The diff coverage is 96.96%.

@@            Coverage Diff             @@
##             main     #167      +/-   ##
==========================================
+ Coverage   97.53%   97.68%   +0.15%     
==========================================
  Files          33       33              
  Lines        1298     1298              
  Branches       96       96              
==========================================
+ Hits         1266     1268       +2     
+ Misses         24       23       -1     
+ Partials        8        7       -1     
Impacted Files Coverage Δ
numalogic/registry/__init__.py 62.50% <0.00%> (-8.93%) ⬇️
numalogic/config/_config.py 100.00% <100.00%> (ø)
numalogic/config/factory.py 100.00% <100.00%> (ø)
numalogic/models/autoencoder/base.py 98.33% <100.00%> (ø)
numalogic/models/autoencoder/variants/conv.py 100.00% <100.00%> (ø)
numalogic/models/autoencoder/variants/lstm.py 100.00% <100.00%> (ø)
...malogic/models/autoencoder/variants/transformer.py 100.00% <100.00%> (ø)
numalogic/models/autoencoder/variants/vanilla.py 100.00% <100.00%> (ø)
numalogic/models/forecast/variants/naive.py 97.40% <100.00%> (-0.04%) ⬇️
numalogic/registry/artifact.py 86.95% <100.00%> (+0.59%) ⬆️
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

ab93 added 3 commits May 2, 2023 23:09
Signed-off-by: Avik Basu <[email protected]>
Signed-off-by: Avik Basu <[email protected]>
Signed-off-by: Avik Basu <[email protected]>
@ab93 ab93 marked this pull request as ready for review May 3, 2023 03:24
@ab93 ab93 requested review from vigith and mboussarov May 3, 2023 03:24
Copy link

@qhuai qhuai left a comment

Choose a reason for hiding this comment

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

LGTM. Added some minor comments / questions.

tests/preprocess/test_transformer.py Show resolved Hide resolved
numalogic/models/autoencoder/variants/conv.py Show resolved Hide resolved
numalogic/models/autoencoder/variants/conv.py Show resolved Hide resolved
@ab93 ab93 merged commit 59a5e32 into main May 3, 2023
9 checks passed
@ab93 ab93 deleted the code-quality branch May 3, 2023 16:53
s0nicboOm pushed a commit to s0nicboOm/numalogic that referenced this pull request May 3, 2023
ab93 added a commit that referenced this pull request May 5, 2023
@ab93 ab93 mentioned this pull request May 5, 2023
ab93 added a commit that referenced this pull request May 8, 2023
* docs: updated CHANGELOG.md (#158)
* chore!: use torch and lightning 2.0 (#159)
* feat: support weight decay in optimizers (#161)
* feat: first benchmarking using KPI anomaly data (#163)
* chore!: drop support for python 3.8 (#164)
* chore: introduce ruff as a linter (#167)
* feat: local memory artifact cache (#165)
* feat: in-memory cache
* feat: redis registry (#170)
* chore: allow actions for release branches (#174)
* fix: accelerator
---------

Signed-off-by: GitHub <[email protected]>
Signed-off-by: Avik Basu <[email protected]>
Signed-off-by: s0nicboOm <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ab93 <[email protected]>
Co-authored-by: Kushal Batra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Improvements in developments, code cleaning etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add precommit config
3 participants