Skip to content

Commit 3409215

Browse files
add notebook examples, configure precommit correctly
1 parent f48d51e commit 3409215

23 files changed

Lines changed: 768 additions & 35 deletions

.DS_Store

6 KB
Binary file not shown.

.github/workflows/testing.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
cache: "pip"
3434
- name: Install dependencies
3535
run: |
36-
python${{ matrix.python-version }} -m pip install --upgrade "pip<25.3" build pip-tools
36+
python${{ matrix.python-version }} -m pip install --upgrade "pip<25.3" build pip-tools pre-commit
3737
python${{ matrix.python-version }} -m piptools compile --extra dev -o requirements.txt mpcontribs-client/setup.py mpcontribs-api/setup.py
3838
python${{ matrix.python-version }} -m pip install -r requirements.txt
3939
cd mpcontribs-api && python${{ matrix.python-version }} -m pip install --no-deps .
@@ -47,6 +47,13 @@ jobs:
4747
run: |
4848
$env:SSL_CERT_FILE=$(python${{ matrix.python-version }} -m certifi)
4949
echo "SSL_CERT_FILE=$env:SSL_CERT_FILE" >> $GITHUB_ENV
50+
51+
- name: Run pre-commit
52+
run: |
53+
python${{ matrix.python-version }} -m pip install pre-commit
54+
pre-commit install
55+
pre-commit run --all-files
56+
5057
- name: Test Client and build
5158
env:
5259
MPCONTRIBS_API_KEY: ${{ secrets.MPCONTRIBS_API_KEY }}
@@ -58,22 +65,11 @@ jobs:
5865
python${{ matrix.python-version }} -m pycodestyle --max-line-length 100 .
5966
python${{ matrix.python-version }} -m pytest -v -s --cov=mpcontribs/client --cov-report=term-missing --cov-report=xml --ignore=bravado
6067
python${{ matrix.python-version }} -m build --outdir ../dist
61-
cd ..
62-
63-
- name: Install dependencies for lux
64-
run: |
65-
python${{ matrix.python-version }} -m pip install --upgrade pip
66-
pip install -r mpcontribs-lux/requirements/requirements-${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt
67-
68-
- name: Run pre-commit for lux
69-
run: |
70-
python${{ matrix.python-version }} -m pip install pre-commit
71-
pre-commit install
72-
pre-commit run --files mpcontribs-lux/mpcontribs/lux/*
7368
74-
- name: Test lux with pytest
69+
- name: Install lux and test with pytest
7570
run: |
7671
cd mpcontribs-lux
72+
python${{ matrix.python-version }} -m pip install -r requirements/requirements-${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt
7773
python${{ matrix.python-version }} -m pip install -e .
7874
python${{ matrix.python-version }} -m pytest -n auto -x --cov=mpcontribs/lux --cov-report=xml
7975

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ exclude: |
22
(?x)(
33
^mpcontribs-portal/mpcontribs/users/|
44
^binder/|
5+
^mpcontribs-api/|
56
^mpcontribs-ingester/|
6-
^mpcontribs-api/mpcontribs/api/redox_thermo_csp/
7+
^mpcontribs-io/|
8+
^mpcontribs-kernel-gateway/|
9+
^mpcontribs-portal/|
10+
^mpcontribs-serverless/
711
)
812
913
repos:
@@ -34,7 +38,7 @@ repos:
3438
rev: 25.9.0
3539
hooks:
3640
- id: black
37-
41+
3842
- repo: https://github.com/kynan/nbstripout
3943
rev: 0.8.1
4044
hooks:

mpcontribs-client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Set the environment variable `SSL_CERT_FILE` to `$(python -m certifi)`.
3333
OverflowError: timeout value is too large
3434
```
3535

36-
Install the bravado fork ([PR](https://github.com/Yelp/bravado/pull/472)) manually via
36+
Install the bravado fork ([PR](https://github.com/Yelp/bravado/pull/472)) manually via
3737
```
3838
pip install "bravado[fido] @ git+https://github.com/tschaume/bravado@9ce06f2df7118e16af4a3d3fdc21ccfeedc5cd50#egg=bravado-11.0.3"
3939
```

mpcontribs-client/requirements/deployment.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ json2html==1.3.0
7171
jsonpointer==3.0.0
7272
# via jsonschema
7373
jsonref==1.1.0
74-
# via bravado-core
75-
jsonschema[format-nongpl]==4.25.1
7674
# via
7775
# bravado-core
7876
# swagger-spec-validator
7977
jsonschema-specifications==2025.9.1
78+
# via bravado-core
79+
jsonschema[format-nongpl]==4.25.1
8080
# via jsonschema
8181
kiwisolver==1.4.9
8282
# via matplotlib

mpcontribs-client/requirements/ubuntu-latest_py3.11.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ json2html==1.3.0
7171
jsonpointer==3.0.0
7272
# via jsonschema
7373
jsonref==1.1.0
74-
# via bravado-core
75-
jsonschema[format-nongpl]==4.25.1
7674
# via
7775
# bravado-core
7876
# swagger-spec-validator
7977
jsonschema-specifications==2025.9.1
78+
# via bravado-core
79+
jsonschema[format-nongpl]==4.25.1
8080
# via jsonschema
8181
kiwisolver==1.4.9
8282
# via matplotlib

mpcontribs-client/requirements/ubuntu-latest_py3.11_extras.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ json2html==1.3.0
7979
jsonpointer==3.0.0
8080
# via jsonschema
8181
jsonref==1.1.0
82-
# via bravado-core
83-
jsonschema[format-nongpl]==4.25.1
8482
# via
8583
# bravado-core
8684
# swagger-spec-validator
8785
jsonschema-specifications==2025.9.1
86+
# via bravado-core
87+
jsonschema[format-nongpl]==4.25.1
8888
# via jsonschema
8989
kiwisolver==1.4.9
9090
# via matplotlib

mpcontribs-client/requirements/ubuntu-latest_py3.12.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ json2html==1.3.0
7171
jsonpointer==3.0.0
7272
# via jsonschema
7373
jsonref==1.1.0
74-
# via bravado-core
75-
jsonschema[format-nongpl]==4.25.1
7674
# via
7775
# bravado-core
7876
# swagger-spec-validator
7977
jsonschema-specifications==2025.9.1
78+
# via bravado-core
79+
jsonschema[format-nongpl]==4.25.1
8080
# via jsonschema
8181
kiwisolver==1.4.9
8282
# via matplotlib

mpcontribs-client/requirements/ubuntu-latest_py3.12_extras.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ json2html==1.3.0
7979
jsonpointer==3.0.0
8080
# via jsonschema
8181
jsonref==1.1.0
82-
# via bravado-core
83-
jsonschema[format-nongpl]==4.25.1
8482
# via
8583
# bravado-core
8684
# swagger-spec-validator
8785
jsonschema-specifications==2025.9.1
86+
# via bravado-core
87+
jsonschema[format-nongpl]==4.25.1
8888
# via jsonschema
8989
kiwisolver==1.4.9
9090
# via matplotlib

mpcontribs-client/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
except ImportError:
77
create_app = None
88

9-
os.environ['MPCONTRIBS_DB_NAME'] = 'mpcontribs-test'
9+
os.environ["MPCONTRIBS_DB_NAME"] = "mpcontribs-test"
1010

1111

1212
@pytest.fixture()

0 commit comments

Comments
 (0)