这是indexloc提供的服务,不要输入任何密码
Skip to content

Docs/use nbqa on notebooks #1041

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

Merged
merged 24 commits into from
Feb 7, 2024

Conversation

carlocagnetta
Copy link
Contributor

@carlocagnetta carlocagnetta commented Feb 2, 2024

  • I have added the correct label(s) to this Pull Request or linked the relevant issue(s)
  • I have provided a description of the changes in this Pull Request
  • I have added documentation for my changes
  • If applicable, I have added tests to cover my changes.
  • I have reformatted the code using poe format
  • I have checked style and types with poe lint and poe type-check
  • (Optional) I ran tests locally with poe test
    (or a subset of them with poe test-reduced) ,and they pass
  • (Optional) I have tested that documentation builds correctly with poe doc-build

PR Description

  • Added nbqa to poetry env
  • Resolved mypy issues on notebooks and related files
  • Conducting ruff checks on notebooks
  • Add DataclassPPrintMixin for better stats representation
  • Improved Notebooks wording and explanations

Resolve: #1004, #974

@carlocagnetta
Copy link
Contributor Author

@MischaPanch I would like to add nbqa ruff check and nbqa mypy to the pre-commit-config

@codecov-commenter
Copy link

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (6e1ffe5) 88.24% compared to head (a83437b) 88.17%.
Report is 6 commits behind head on master.

Files Patch % Lines
tianshou/utils/print.py 46.15% 7 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1041      +/-   ##
==========================================
- Coverage   88.24%   88.17%   -0.08%     
==========================================
  Files          98       99       +1     
  Lines        8083     8099      +16     
==========================================
+ Hits         7133     7141       +8     
- Misses        950      958       +8     
Flag Coverage Δ
unittests 88.17% <78.78%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MischaPanch
Copy link
Collaborator

@MischaPanch I would like to add nbqa ruff check and nbqa mypy to the pre-commit-config

Sure, go ahead :)

Copy link
Collaborator

@MischaPanch MischaPanch left a comment

Choose a reason for hiding this comment

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

Only the minor change in pyproject.toml is needed. You can also add the nbqa stuff to pre-commit. Then this is ready for merging, thanks @carlocagnetta !

add nbqa pre-commit

add nbqa pre-commit

add nbqa pre-commit
@MischaPanch MischaPanch enabled auto-merge (squash) February 7, 2024 16:27
@MischaPanch MischaPanch disabled auto-merge February 7, 2024 16:27
@MischaPanch MischaPanch merged commit 5fc314b into thu-ml:master Feb 7, 2024
@MischaPanch MischaPanch deleted the docs/Use_nbqa_on_Notebooks branch February 7, 2024 16:28
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.

Use nbqa on notebooks
3 participants