Skip to content

Commit b99484c

Browse files
authored
Silence git stderr noise from version stamping on non-git installs (#472)
* Silence git stderr noise from version stamping on non-git installs * Update setup.py * Adding ruff to readme
1 parent 2099a54 commit b99484c

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Build, unit tests, and docs](https://github.com/smdogroup/tacs/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/smdogroup/tacs/actions/workflows/unit_tests.yml)
2-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
2+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
33
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44

55
[![Anaconda-Server Badge](https://anaconda.org/smdogroup/tacs/badges/version.svg)](https://anaconda.org/smdogroup/tacs)
@@ -133,8 +133,14 @@ Testflo can be run by calling the following command from TACS' root directory:
133133
```
134134
clang-format --style=Google -i filename.cpp
135135
```
136-
5. Run formatting checks on any modified Python code using [Black](https://black.readthedocs.io/en/stable/). We use version 24.
136+
5. Run linting and formatting checks on any modified Python code using [Ruff](https://docs.astral.sh/ruff/). The configuration (selected rules, ignores, and formatter settings) lives in the `[tool.ruff]` section of `pyproject.toml`, and both checks are enforced in CI. Run the linter (with autofixes applied) and the formatter from TACS' root directory:
137137
```
138-
python -m black filename.py
138+
ruff check --fix
139+
ruff format
140+
```
141+
You can check without modifying files (as CI does) by adding `--check` to the format command and omitting `--fix` from the check command:
142+
```
143+
ruff check
144+
ruff format --check
139145
```
140146
6. If the change is a new feature, make sure that its expected use is described through a docstring and that it is added in a relevant section of the docs

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def get_mpi_flags():
132132
"mpi4py>=4.0.3,<5.0.0",
133133
"scipy>=1.2.1",
134134
# pin pynastran against last commit that supports python 3.10
135-
"pynastran @ git+https://github.com/smdogroup/pyNastran.git@ba6a3c460f65fd4083b08579e462de40c6b0cf84",
135+
"pynastran @ git+https://github.com/smdogroup/pyNastran.git@60b740fc5a79ff968afa48a6dfbc3f882187d820",
136136
"numba",
137137
"packaging",
138138
],

0 commit comments

Comments
 (0)