Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example files #42

Merged
merged 5 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 6 additions & 71 deletions .github/workflows/continuous-integration.yml
dbhart marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -25,56 +25,8 @@ jobs:
strategy:
matrix:
version: ["3.9", "3.10", "3.11", "3.12"]
steps:

- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.codecov.io:443
api.github.com:443
cli.codecov.io:443
codecov.io:443
files.pythonhosted.org:443
github.com:443
pypi.org:443
storage.googleapis.com:443
uploader.codecov.io:443

- name: Check out the commit
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ~${{ matrix.version }}

- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install tomli

- name: Test install
run: python3 -m pip install .[tests]

- name: Test with pytest
run: python3 -m pytest --cov=sansmic --cov=tests examples/ tests/

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ubuntu-latest

OSes:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.12"]
os: [windows-latest, macOS-13, macOS-latest, ubuntu-latest]

steps:

- name: Harden Runner
Expand All @@ -92,7 +44,7 @@ jobs:
pypi.org:443
storage.googleapis.com:443
uploader.codecov.io:443

- name: Check out the commit
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand All @@ -102,16 +54,13 @@ jobs:
python-version: ~${{ matrix.version }}

- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install tomli
run: python3 -m pip install --upgrade pip

- name: Test install
run: python3 -m pip install .[tests]
run: python3 -m pip install .[tests,formats]

- name: Test with pytest
run: python3 -m pytest --cov=sansmic --cov=tests examples/ tests/
run: python3 -m pytest --nbmake --cov=sansmic --cov=tests examples/ tests/

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
Expand All @@ -120,18 +69,4 @@ jobs:
flags: ${{ matrix.os }}

- name: Test uninstall
run: python3 -m pip uninstall -y my-repository-name

# commits:
# runs-on: ubuntu-latest
# steps:
# - name: Harden Runner
# uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
# with:
# egress-policy: audit

# - name: Conventional Commits
# uses: taskmedia/action-conventional-commits@9148865058f63a6cb560ff4bfd7d534505f43646 # v1.1.3
# with:
# types: >
# build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test
run: python3 -m pip uninstall -y sansmic
7 changes: 4 additions & 3 deletions .github/workflows/continuous-testing.yml
dbhart marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
pypi.org:443
storage.googleapis.com:443
uploader.codecov.io:443

- name: Check out the commit
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

Expand All @@ -47,15 +47,16 @@ jobs:
- name: Install development dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt

- name: Test install
run: python3 -m pip install .[tests,formats]

- name: Test with pytest
run: |
echo '### Run tests' >> $GITHUB_STEP_SUMMARY
python3 -m pytest --no-cov-on-fail --disable-warnings -q --cov=sansmic --cov=tests --cov-report= --no-header --color=auto examples/ tests/ >> $GITHUB_STEP_SUMMARY
echo '```bash' >> $GITHUB_STEP_SUMMARY
python3 -m pytest --nbmake --no-cov-on-fail --disable-warnings --cov=sansmic --cov=tests --cov-report= --no-header --color=auto examples/ tests/ >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY

- name: Generate coverage report
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
dbhart marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
tags:
- '**'

permissions:
contents: read

jobs:
build_wheels:
name: Build distribution 📦 on ${{ matrix.os }}
Expand Down Expand Up @@ -112,7 +115,7 @@ jobs:
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@897895f1e160c830e369f9779632ebc134688e1b # release/v1
with:
with:
attestations: true
print-hash: true

Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
dbhart marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ repos:
- id: conventional-pre-commit
stages: [commit-msg]
args: []

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
1 change: 1 addition & 0 deletions examples/baseline.json
dbhart marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

785 changes: 128 additions & 657 deletions examples/basic.ipynb
dbhart marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

Loading