Skip to content

Commit

Permalink
Updating CI and Docs to remove ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Feb 26, 2025
1 parent a73ea50 commit e9a2347
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 38 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/black.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
python-version: '3.13'
- name: Update package index
run: sudo apt-get update
- name: Run Linter
- name: Run Linter Checks
run: |
pip install -e .[test]
ruff format --check .
ruff check .
31 changes: 16 additions & 15 deletions doc/developer/standards_and_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,22 @@ Just try to be as clear as possible, while using as few words as possible.
consistency. Code reviewers should make sure to be familiar with the standards, so that their comments are
consistent with other reviewers.
Code formatting with Black
==========================
ARMI uses the Python code formatter `black <https://pypi.org/project/black/>`_. So while developing code in ARMI
it is important to remember to us the ``black`` formatter before pushing any code to the repo. All changes pushed
to ARMI on github.com will be automatically checked to see if they conform to the ``black`` code formatter standards.

The ``black`` formatter provides 100% consistency in ARMI for: whitespace, line length, trailing commas, and string
formatting. And it is easy to run on the command line::

black .

Address the ruff warnings
=========================
ARMI also uses the amazing Python linter `ruff <https://docs.astral.sh/ruff/>`_. Again, any new code you add must have
zero ``ruff`` warnings or errors.
Format code with ruff
=====================
ARMI uses the Python code formatter `ruff <https://docs.astral.sh/ruff/>`_. So while developing code
in ARMI it is important to remember to us the ``ruff`` formatter before pushing any code to the
repo. All changes pushed to ARMI on github.com will be automatically checked to see if they conform
to the ``ruff`` code formatter standards.

The ``ruff`` formatter provides 100% consistency in ARMI for: whitespace, line length, trailing
commas, and string formatting. And it is easy to run on the command line::

ruff format .

Lint code with ruff
===================
ARMI also uses the amazing Python linter `ruff <https://docs.astral.sh/ruff/>`_. Again, any new code
you add must have zero ``ruff`` warnings or errors.

This is very easy to run on the command line::

Expand Down

0 comments on commit e9a2347

Please sign in to comment.