-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt ruff and pre-commit for linting and formatting (#139)
* linting and formatting with ruff * configure pre-commit * ignore notebooks * pin jupyterlab * rename step * bump jupyter-bokeh * bump codeql
- Loading branch information
Showing
42 changed files
with
1,657 additions
and
4,546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,18 +31,13 @@ jobs: | |
- name: Install and configure Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.7.1 | ||
version: 1.8.2 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Install dependencies | ||
run: poetry install --with vis --no-interaction | ||
- name: Lint with flake8 | ||
run: | | ||
source $VENV | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 mendeleev --count --select=E9,F63,F7,F82 --max-line-length=127 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
black --check mendeleev | ||
run: poetry install --with vis --no-interaction -v | ||
- name: Lint and format with ruff | ||
uses: pre-commit/[email protected] | ||
- name: Test with pytest | ||
run: | | ||
source $VENV | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
exclude: "^(alembic|notebooks)/" | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.3.3 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
types_or: [python, pyi, jupyter] | ||
# Run the formatter. | ||
- id: ruff-format | ||
types_or: [python, pyi, jupyter] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
mendeleev.cli | ||
============= | ||
|
||
.. automodule:: mendeleev.cli | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
clielement | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
mendeleev.db | ||
============ | ||
|
||
.. automodule:: mendeleev.db | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
get_engine | ||
get_package_dbpath | ||
get_session | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
mendeleev.econf | ||
=============== | ||
|
||
.. automodule:: mendeleev.econf | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
get_l | ||
get_spin_strings | ||
print_spin_occupations | ||
shell_capactity | ||
subshell_capacity | ||
subshell_degeneracy | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
ElectronicConfiguration | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
mendeleev.electronegativity | ||
=========================== | ||
|
||
.. automodule:: mendeleev.electronegativity | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
allred_rochow | ||
cottrell_sutton | ||
generic | ||
gordy | ||
li_xue | ||
martynov_batsanov | ||
mulliken | ||
nagle | ||
sanderson | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
mendeleev.fetch | ||
=============== | ||
|
||
.. automodule:: mendeleev.fetch | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
add_plot_columns | ||
fetch_electronegativities | ||
fetch_ionic_radii | ||
fetch_ionization_energies | ||
fetch_neutral_data | ||
fetch_table | ||
get_app_data | ||
get_zeff | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
mendeleev.ion | ||
============= | ||
|
||
.. automodule:: mendeleev.ion | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
Ion | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
mendeleev.mendeleev | ||
=================== | ||
|
||
.. automodule:: mendeleev.mendeleev | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
deltaN | ||
element | ||
get_all_elements | ||
ids_to_attr | ||
isotope | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
mendeleev.models | ||
================ | ||
|
||
.. automodule:: mendeleev.models | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
estimate_from_group | ||
fetch_attrs_for_group | ||
with_uncertainty | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
Element | ||
Group | ||
IonicRadius | ||
IonizationEnergy | ||
Isotope | ||
IsotopeDecayMode | ||
OxidationState | ||
PhaseTransition | ||
ScreeningConstant | ||
Series | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
mendeleev.utils | ||
=============== | ||
|
||
.. automodule:: mendeleev.utils | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
coeffs | ||
n_effective | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.