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

Fix typos #258

Merged
Merged

Conversation

nathanjmcdougall
Copy link
Contributor

@nathanjmcdougall nathanjmcdougall commented Feb 7, 2025

Some more typos. This time, I used codespell to detect these automatically.

If you like, I can configure this codespell tool as a pre-commit hook, so you can automatically detect any typos in the future.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.06%. Comparing base (8fca057) to head (37d8693).
Report is 6 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #258   +/-   ##
=======================================
  Coverage   75.06%   75.06%           
=======================================
  Files          27       27           
  Lines       11892    11892           
=======================================
  Hits         8927     8927           
  Misses       2965     2965           

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

@raphaelquast
Copy link
Owner

Hey, thanks again for hunting down spelling mistakes !

Indeed adding "codespell" to the pre-commit hooks would be nice... (and from your PR it also seems highly necessary... 😅 )!

To get this done properly, the following things are required:

  • rebase this PR to the dev branch
  • add codespell as pre-commit hook
  • update the section on pre-commit hooks in the contribution-guide accordingly:
    Style Checking
    ~~~~~~~~~~~~~~
    To ensure uniform code style, EOmaps uses `pre-commit hooks <https://pre-commit.com/>`_ to automatically check (and fix) code-style issues such as:
    - Removal of trailing whitespaces in `.py` files
    - Making sure that files end with a newline
    - Compliance to the used `black <https://github.com/psf/black>`_ code formatting standards
    To initialize pre-commit hooks in your current environment, first install `pre-commit hooks <https://pre-commit.com/>`_ with
    .. code-block:: console
    mamba install -c conda-forge pre-commit
    Then navigate to the directory where you cloned the EOmaps repository and run the following command: (e.g. the directory that contains the ``.pre-commit-config.yaml`` file)
    .. code-block:: console
    pre-commit install
    This will install the required pre-commit hooks in your current environment so that they are run **automatically prior to each commit**.
    (The first time pre-commit is run, the necessary packages will have to be installed which might take a short moment)
    .. code-block:: console
    git commit -m "added my cool feature"
    check python ast.........................................................Passed
    check for merge conflicts................................................Passed
    fix end of files.........................................................Passed
    trim trailing whitespace.................................................Passed
    mixed line ending........................................................Passed
    black....................................................................Passed
    .. note::
    This means that all files will be **auto-formatted** prior to each commit to comply with the used code-formatting standards and only commits that comply with all pre-commit hooks can be pushed to GitHub.
    ⚠ After running the pre-commit hooks, some files might have new changes that must be staged for commit again!
    .. tip::
    - To run the pre-commit hooks manually on selected files, simply **add the files you want to commit** with ``git add < filename >`` and then run ``pre-commit``
    - If you want to run the hooks on all files, use ``pre-commit run --all-files``
    .. tip::
    If you have issues related to ``setuptools`` when installing ``pre-commit``, see
    `pre-commit Issue #2178 comment <https://github.com/pre-commit/pre-commit/issues/2178#issuecomment-1002163763>`_
    for a potential resolution.

@nathanjmcdougall nathanjmcdougall force-pushed the typo-fixes-with-codespell branch from cfc9e95 to e56785e Compare February 7, 2025 19:43
@nathanjmcdougall
Copy link
Contributor Author

Cool, I have added the pre-commit hook and docs, and rebased to dev.

@nathanjmcdougall nathanjmcdougall force-pushed the typo-fixes-with-codespell branch from 963acdf to d3a8267 Compare February 7, 2025 20:09
@nathanjmcdougall nathanjmcdougall changed the base branch from master to dev February 7, 2025 20:09
@nathanjmcdougall nathanjmcdougall force-pushed the typo-fixes-with-codespell branch from d3a8267 to 963acdf Compare February 7, 2025 20:11
@raphaelquast
Copy link
Owner

Hey, thank you very much for implementing this!
I just added a comment to remember that tomli is only a required additional dependency as long as python < 3.11 is supported.

Co-authored-by: Raphael Quast <[email protected]>
@raphaelquast raphaelquast merged commit 7e83b18 into raphaelquast:dev Feb 10, 2025
9 checks passed
@raphaelquast
Copy link
Owner

Thanks again for your efforts! I've merged the PR into the dev-branch so it will be included in the next release!

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