-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #511 from avcopan/dev
New: Formatting, linting, type-checking
- Loading branch information
Showing
23 changed files
with
94 additions
and
2,604 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
name: test | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Run tests | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
name: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download central config files | ||
- name: Download environment files | ||
run: | | ||
wget https://raw.githubusercontent.com/avcopan/amech-dev/main/pixi.toml | ||
wget https://raw.githubusercontent.com/avcopan/amech-dev/main/pixi.lock | ||
wget https://raw.githubusercontent.com/Auto-Mech/amech-dev/main/pixi.toml | ||
wget https://raw.githubusercontent.com/Auto-Mech/amech-dev/main/pixi.lock | ||
- name: Set up Pixi | ||
uses: prefix-dev/[email protected] | ||
|
@@ -26,13 +28,17 @@ jobs: | |
run: | | ||
pixi run pip install . --no-deps | ||
- name: Run linter | ||
- name: Lint (new) | ||
run: | | ||
pixi run ./lint.sh | ||
- name: Lint (old) | ||
run: | | ||
pixi run pylint --rcfile=.pylintrc automol | ||
pixi run pylint --rcfile=.pylintrc phydat | ||
pixi run pylint --rcfile=.pylintrc autoreact | ||
- name: Run pytests | ||
- name: Test | ||
run: | | ||
pixi run pytest -v automol -v automol --ignore=automol/tests/test_convert.py | ||
pixi run pytest -v autoreact |
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,20 @@ | ||
repos: | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
exclude: docs/ | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.291 | ||
hooks: | ||
- id: ruff | ||
args: ["--fix"] | ||
exclude: docs/ | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.5.1 | ||
hooks: | ||
- id: mypy | ||
exclude: docs/ |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
""" Library of automol errors. | ||
""" | ||
"""Library of automol errors.""" | ||
|
||
|
||
class FailedGeometryGenerationError(RuntimeError): | ||
""" exception for when we fail to generate a correct geometry """ | ||
"""exception for when we fail to generate a correct geometry.""" | ||
|
||
|
||
class FailedInchiGenerationError(RuntimeError): | ||
""" exception for when we fail to generate a correct inchi """ | ||
"""exception for when we fail to generate a correct inchi.""" |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.