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

🎨 formatting + linting in CI-CD #143

Merged
merged 5 commits into from
Dec 15, 2022
Merged

🎨 formatting + linting in CI-CD #143

merged 5 commits into from
Dec 15, 2022

Conversation

jvdd
Copy link
Member

@jvdd jvdd commented Dec 10, 2022

This PR adds the following CI-CD checks:

  • linting with ruff
  • formatting with black (line-length = 88)
  • sorting imports with isort

🤖 added a Makefile to, uhm, make it more convenient to call the lint & formatting commands

  • Formatting the code: make lint
  • Linting the code: make lint

@jvdd jvdd requested a review from jonasvdd December 10, 2022 08:56
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2022

Codecov Report

Merging #143 (1452741) into main (17913ed) will decrease coverage by 0.40%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
- Coverage   97.49%   97.08%   -0.41%     
==========================================
  Files          11       12       +1     
  Lines         878      892      +14     
==========================================
+ Hits          856      866      +10     
- Misses         22       26       +4     
Impacted Files Coverage Δ
...tly_resampler/aggregation/aggregation_interface.py 98.46% <ø> (ø)
plotly_resampler/aggregation/algorithms/lttb_c.py 100.00% <ø> (ø)
plotly_resampler/figure_resampler/__init__.py 100.00% <ø> (ø)
...sampler/figure_resampler/figurewidget_resampler.py 99.03% <ø> (ø)
plotly_resampler/aggregation/aggregators.py 91.66% <100.00%> (ø)
...tly_resampler/figure_resampler/figure_resampler.py 90.35% <100.00%> (ø)
...ler/figure_resampler/figure_resampler_interface.py 99.73% <100.00%> (ø)
plotly_resampler/figure_resampler/utils.py 96.29% <100.00%> (ø)
plotly_resampler/registering.py 100.00% <100.00%> (ø)
plotly_resampler/__init__.py 71.42% <0.00%> (ø)

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

@jvdd jvdd requested review from jonasvdd and removed request for jonasvdd December 10, 2022 09:24
@jonasvdd
Copy link
Member

Seems good!

Some questions:

  • which commands should somebody use to run this locally?
  • maybe add some information about this in the contirbuting.md

When I get these answers, I will continue my review.

@jvdd
Copy link
Member Author

jvdd commented Dec 10, 2022

To run locally, just perform poetry install in the plotly_resampler cloned repo - this will install the dev dependencies from the poetry.lock file.

Once all (new) dev dependencies are installed, you can use the Makefile to

  • format the code: make format
  • lint the code: make lint
  • and test the code (with coverage): make test

-> I updated the CONTRIBUTING.md with how you should run the formatting & linting (& testing) locally

Hope this answers your questions @jonasvdd

@jvdd
Copy link
Member Author

jvdd commented Dec 14, 2022

Does the CONTRIBUTING.md solve / answer your comments @jonasvdd ?

@jonasvdd jonasvdd merged commit 306bd38 into main Dec 15, 2022
@jvdd jvdd deleted the linting branch January 29, 2023 10:50
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.

None yet

3 participants