py4dstem / py4dstem/py4DSTEM

Configure pre-commit and address flake8 issues

Open
#692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
279
Forks
177
PR merge metrics
No merged PRs in 30d

Description

I am learning more about the package. Thanks for the maintaining the package.

Following the instructions under CONTRIBUTORS.md, I tried running pre-commit using pre-commit run --all-files. I am seeing a bit of flake8 errors below:

py4DSTEM/visualize/overlay.py:1152:5: F841 local variable 'N' is assigned to but never used
py4DSTEM/visualize/overlay.py:1187:80: E501 line too long (92 > 79 characters)
py4DSTEM/visualize/overlay.py:1222:80: E501 line too long (80 > 79 characters)
...
py4DSTEM/visualize/show.py:107:80: E501 line too long (83 > 79 characters)
py4DSTEM/visualize/show.py:108:80: E501 line too long (97 > 79 characters)
py4DSTEM/visualize/show.py:109:80: E501 line too long (88 > 79 characters)
...

Other minor errors:

py4DSTEM/utils/configuration_checker.py:461: atributes ==> attributes
py4DSTEM/utils/configuration_checker.py:463: libaries ==> libraries
py4DSTEM/utils/configuration_checker.py:484: conditons ==> conditions
py4DSTEM/utils/configuration_checker.py:559: requriements ==> requirements
py4DSTEM/utils/configuration_checker.py:559: additonal ==> additional

Would you be planning on implementing pre-commit? It could be perhaps integrated at the PR level.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CONTRIBUTORS.md and run pre-commit run --all-files to reproduce the reported findings. Review py4DSTEM/visualize/overlay.py, py4DSTEM/visualize/show.py, and py4DSTEM/utils/configuration_checker.py; done means the reported flake8 errors and listed spelling errors are addressed and pre-commit can be integrated at the PR level.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.