Skip to content

Commit 94076d6

Browse files
committed
Add details about how to run the new static checks
Should probably create a github action to automate this, but for the moment, the text is enough.
1 parent 75049c4 commit 94076d6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Once installed or cloned, the data is available as a single dataframe indexed on
4747
>>> from nuclearmasses.mass_table import MassTable
4848
>>> df = MassTable().full_data
4949
```
50-
You can then interrogate, or extract, what ever information you want.
50+
You can then interrogate, or extract, whatever information you want.
5151
For example, how has the mass excess and it's accuracy changed overtime for 190Re according to the AME
5252
```python
5353
>>> df[(df['A'] == 190) & (df['Symbol'] == 'Re')][['AMEMassExcess', 'AMEMassExcessError']]
@@ -61,7 +61,7 @@ TableYear
6161
2016 -35635.830 70.852
6262
2020 -35583.015 4.870
6363
```
64-
Or how do the mass excess of gold vary across the isotropic chain according to NUBASE in the most recent table for both experimentally measured and theoretical values
64+
Or how does the mass excess of gold vary across the isotopic chain according to NUBASE in the most recent table for both experimentally measured and theoretical values
6565
```python
6666
>>> df.query("TableYear == 2020 and Symbol == 'Au'")[['A', 'NUBASEMassExcess', 'NUBASEMassExcessError', 'Experimental']]
6767
A NUBASEMassExcess NUBASEMassExcessError Experimental
@@ -115,7 +115,15 @@ TableYear
115115

116116
If you have ideas for additional functionality or find bugs please create an [issue](https://github.com/php1ic/nuclearmasses/issues) or better yet a [pull request](https://github.com/php1ic/nuclearmasses/pulls).
117117

118+
We use a combination of [isort](https://pycqa.github.io/isort/), [ruff](https://docs.astral.sh/ruff/) and [mypy](https://www.mypy-lang.org/) to keep things tidy and hopefully catch errors and bugs before they happen.
119+
The command below returns no errors or issues so should be run after any code changes.
120+
We might add a CI pipeline in the future, but for the moment, it's a manual process.
121+
```bash
122+
isort . && ruff format && ruff check && mypy nuclearmasses
123+
```
124+
118125
## Known issues
126+
119127
- [#5](https://github.com/php1ic/nuclearmasses/issues/5) The half life from the NUBASE data is stored as the individual elements, a column with the value in seconds would be useful
120128
```python
121129
>>> df[(df['A'] == 14) & (df['Symbol'] == 'C')][['HalfLifeValue', 'HalfLifeUnit', 'HalfLifeError']]

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ omit = [
7676
[tool.isort]
7777
known_first_party = ["nuclearmasses"]
7878

79-
8079
[tool.ruff]
8180
line-length = 120
8281

0 commit comments

Comments
 (0)