-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 351-lack-of-data-enforcement-in-syntax-no…
…de-is-showing-up-again
- Loading branch information
Showing
26 changed files
with
340 additions
and
290 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
If you are a first-time contributor to MontePy, | ||
refer the developing guidelines at: | ||
https://idaholab.github.io/MontePy/developing.html | ||
--> | ||
|
||
# Description | ||
|
||
Please include a summary of the change and which issue is fixed if applicable. Please also include relevant motivation and context. | ||
|
||
Fixes # (issue) | ||
|
||
# Checklist | ||
|
||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have made corresponding changes to the documentation (if applicable) | ||
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) | ||
<!-- | ||
While tests will automatically be checked by CI, it is good practice to | ||
ensure that they pass locally first. | ||
--> |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: [main] | ||
|
||
|
||
jobs: | ||
last-minute-test: | ||
runs-on: ubuntu-latest | ||
|
@@ -13,13 +14,12 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: pip install --user -r requirements/dev.txt | ||
- run: pip install . montepy[develop] | ||
- run: python -m pytest | ||
|
||
build-pages: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure git | ||
|
@@ -30,13 +30,67 @@ jobs: | |
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: pip install --user montepy[doc] | ||
- run: pip install --user . montepy[doc] | ||
- run: cd doc && make html | ||
- uses: actions/configure-pages@v4 | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
name: deploy-pages | ||
path: doc/build/html/ | ||
|
||
build-packages: | ||
name: Build, sign, and release packages on github | ||
runs-on: ubuntu-latest | ||
needs: [last-minute-test] | ||
permissions: | ||
contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
id-token: write # IMPORTANT: mandatory for sigstore | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- name: set up python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: pip install . montepy[build] | ||
- name: GitHub Actions Create Tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# ensure tags are up to date | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
- run: python -m build . | ||
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Create a GitHub release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
draft: true | ||
- run: >- | ||
gh release upload | ||
'${{ steps.tag_version.outputs.new_tag }}' dist/** | ||
--repo '${{ github.repository }}' | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: | | ||
dist/*.tar.gz | ||
dist/*.whl | ||
deploy-pages: | ||
permissions: | ||
|
@@ -65,18 +119,16 @@ jobs: | |
environment: | ||
name: test-pypi | ||
url: https://test.pypi.org/p/montepy # Replace <package-name> with your PyPI project name | ||
needs: [deploy-pages] | ||
needs: [deploy-pages, build-packages] | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: python -m pip install build | ||
- run: python -m build --sdist --wheel | ||
name: build | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
|
@@ -86,20 +138,19 @@ jobs: | |
environment: | ||
name: pypi | ||
url: https://pypi.org/p/montepy # Replace <package-name> with your PyPI project name | ||
needs: [deploy-pages, deploy-test-pypi] | ||
needs: [deploy-pages, deploy-test-pypi, build-packages] | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: python -m pip install build | ||
- run: python -m build --sdist --wheel | ||
name: build | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
|
||
|
||
|
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,6 +1,9 @@ | ||
name: Test package | ||
name: CI testing | ||
|
||
on: [push] | ||
on: | ||
pull_request: | ||
push: | ||
branches: [develop, main, alpha-test] | ||
|
||
jobs: | ||
build: | ||
|
@@ -16,7 +19,7 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install --upgrade pip build | ||
- run: pip install -r requirements/common.txt | ||
- run: pip install build | ||
- run: python -m build --sdist --wheel | ||
- run: pip install . | ||
- run: pip uninstall -y montepy | ||
|
@@ -25,8 +28,11 @@ jobs: | |
- run: change_to_ascii -h | ||
- run: pip uninstall -y montepy | ||
- run: pip install --user dist/*.tar.gz | ||
- run: pip install --user montepy[test] | ||
- run: pip install --user montepy[doc] | ||
- run: pip install --user . montepy[test] | ||
- run: pip install --user . montepy[doc] | ||
- run: pip install --user . montepy[format] | ||
- run: pip install --user . montepy[build] | ||
- run: pip install --user . montepy[develop] | ||
- run: pip freeze | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
|
@@ -36,6 +42,7 @@ jobs: | |
|
||
test: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
@@ -46,20 +53,35 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install --user -r requirements/dev.txt | ||
- run: pip install --user . montepy[test] | ||
- run: coverage run -m pytest --junitxml=test_report.xml | ||
- run: coverage report | ||
- run: coverage xml | ||
- name: Upload test report | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ matrix.python-version == '3.9' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test | ||
path: test_report.xml | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v3 | ||
if: ${{ matrix.python-version == '3.9' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: coverage.xml | ||
- name: Test Reporter | ||
if: ${{ matrix.python-version == '3.9' }} | ||
uses: dorny/[email protected] | ||
with: | ||
name: CI-test-report | ||
path: test_report.xml | ||
reporter: java-junit | ||
- name: Coveralls GitHub Action | ||
if: ${{ matrix.python-version == '3.9' }} | ||
uses: coverallsapp/[email protected] | ||
with: | ||
file: coverage.xml | ||
|
||
|
||
doc-test: | ||
runs-on: ubuntu-latest | ||
|
@@ -70,13 +92,17 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: pip install montepy[doc] | ||
- run: pip install . montepy[doc] | ||
- run: sphinx-build doc/source/ doc/build/ -W --keep-going -E | ||
- run: sphinx-build -b html doc/source/ doc/build/html | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: website | ||
path: doc/build/html | ||
- name: Test for missing API documentation | ||
run: | | ||
cd doc/source | ||
python _test_for_missing_docs.py | ||
format-test: | ||
runs-on: ubuntu-latest | ||
|
@@ -87,7 +113,7 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- run: pip install --user -r requirements/dev.txt | ||
- run: pip install . montepy[format] | ||
- run: black --check montepy/ tests/ | ||
|
||
|
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 |
---|---|---|
|
@@ -10,3 +10,4 @@ doc/build/* | |
.coverage | ||
.idea/ | ||
.ipynb_checkpoints/ | ||
montepy/_version.py |
Oops, something went wrong.