8000 Adds ruff for linting + autoformatting by domna · Pull Request #200 · FAIRmat-NFDI/pynxtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adds ruff for linting + autoformatting #200

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 4 commits into from
Dec 19, 2023
Merged

Adds ruff for linting + autoformatting #200

merged 4 commits into from
Dec 19, 2023

Conversation

domna
Copy link
Collaborator
@domna domna commented Dec 7, 2023

Fixes #192

Tried to align with nomad. I think it would also make sense to autoformat the code with ruff (but maybe in a separate PR?). Otherwise we will get large diffs as soon as we edit.

@domna domna requested a review from sherjeelshabih December 7, 2023 21:15
@coveralls
Copy link
coveralls commented Dec 7, 2023

Pull Request Test Coverage Report for Build 7264403879

  • 692 of 1341 (51.6%) changed or added relevant lines in 83 files are covered.
  • 101 unchanged lines in 30 files lost coverage.
  • Overall coverage decreased (-0.05%) to 44.508%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pynxtools/dataconverter/hdfdict.py 0 1 0.0%
pynxtools/dataconverter/readers/em_nion/utils/swift_uuid_to_file_name.py 0 1 0.0%
pynxtools/dataconverter/readers/em_om/reader.py 8 9 88.89%
pynxtools/dataconverter/readers/xps/file_parser.py 0 1 0.0%
pynxtools/dataconverter/readers/xps/xml/xml_specs.py 1 2 50.0%
pynxtools/dataconverter/readers/apm/reader.py 8 10 80.0%
pynxtools/dataconverter/readers/apm/utils/apm_define_io_cases.py 0 2 0.0%
pynxtools/dataconverter/readers/apm/utils/apm_load_deployment_specifics.py 2 4 50.0%
pynxtools/dataconverter/readers/em_nion/utils/swift_define_io_cases.py 0 2 0.0%
pynxtools/dataconverter/readers/em_nion/utils/swift_generate_dimscale_axes.py 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
pynxtools/dataconverter/convert.py 1 79.55%
pynxtools/dataconverter/hdfdict.py 1 22.11%
pynxtools/dataconverter/readers/apm/utils/apm_create_nx_default_plots.py 1 4.88%
pynxtools/dataconverter/readers/apm/utils/apm_define_io_cases.py 1 12.0%
pynxtools/dataconverter/readers/apm/utils/apm_load_ranging.py 1 15.45%
pynxtools/dataconverter/readers/apm/utils/apm_parse_composition_table.py 1 11.11%
pynxtools/dataconverter/readers/em_nion/utils/swift_generate_dimscale_axes.py 1 23.81%
pynxtools/dataconverter/readers/em_om/reader.py 1 26.42%
pynxtools/dataconverter/readers/em_spctrscpy/reader.py 1 25.45%
pynxtools/dataconverter/readers/shared/map_concepts/mapping_functors.py 1 12.07%
Totals Coverage Status
Change from base Build 7128029026: -0.05%
Covered Lines: 4862
Relevant Lines: 10924

💛 - Coveralls

@sherjeelshabih
Copy link
Collaborator

Before we merge the actual formatted code to this branch, can you add something in the Readme/contribution about pre-commit install. Without this done locally for every dev, it won't run the hook right?

@domna
Copy link
Collaborator Author
domna commented Dec 8, 2023

Before we merge the actual formatted code to this branch, can you add something in the Readme/contribution about pre-commit install. Without this done locally for every dev, it won't run the hook right?

Correct. I'll add it

Added it in #201

@lukaspie lukaspie self-requested a review December 19, 2023 16:00
Copy link
Collaborator
@lukaspie lukaspie left a comment

Choose a reason for hiding this comment

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

LGTM (after #201 is merged).

* Reformatted files + pre-commit hook

* Update requirements

* Adds install instructions for the pre-commit hook
@domna domna merged commit 8bd900e into master Dec 19, 2023
@domna domna deleted the ruff branch December 19, 2023 16:09
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.

Linting with Ruff
4 participants
0