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

Switch lint/isort/format to Ruff #105

Merged
merged 4 commits into from
Nov 22, 2023
Merged

Switch lint/isort/format to Ruff #105

merged 4 commits into from
Nov 22, 2023

Conversation

akx
Copy link
Contributor

@akx akx commented Nov 21, 2023

As discussed in YatingMusic/miditoolkit#35.

More lint rules could be enabled later, this uses the most barebones default.

@akx
Copy link
Contributor Author

akx commented Nov 22, 2023

Ah, tests didn't run because I (thankfully) don't have access to your GitHub build secrets.

I added a commit that changes the logic to read it from an environment variable if set, and skip hf_token -requiring tests otherwise.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

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

Comparison is base (535c1e8) 90.34% compared to head (6795d20) 90.34%.

Files Patch % Lines
tests/benchmark_fast_bpe.py 0.00% 4 Missing ⚠️
miditok/__init__.py 80.00% 1 Missing ⚠️
setup.py 0.00% 1 Missing ⚠️
tests/conftest.py 87.50% 1 Missing ⚠️
tests/test_methods.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
- Coverage   90.34%   90.34%   -0.01%     
==========================================
  Files          33       33              
  Lines        4587     4586       -1     
==========================================
- Hits         4144     4143       -1     
  Misses        443      443              

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

Copy link
Owner

@Natooz Natooz left a comment

Choose a reason for hiding this comment

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

Thanks a lot for these improvements.
Just found two fixes

.github/workflows/lint.yml Outdated Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
Co-authored-by: Nathan Fradet <56734983+Natooz@users.noreply.github.com>
@Natooz Natooz merged commit 062345a into Natooz:main Nov 22, 2023
14 of 15 checks passed
@Natooz
Copy link
Owner

Natooz commented Nov 22, 2023

Thanks again for this PR!

I will also follow the pytest formatting from miditoolkit here, along with hatch... Unless you want to take care of it, but I'm not asking anything here, you already did a lot! ❤️

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