Skip to content

Commit 4dc522a

Browse files
authored
Merge pull request #4 from kenblu24/ornl-urls
SuperNeuroMAT 3.1.0
2 parents 60474e4 + cc20772 commit 4dc522a

File tree

239 files changed

+8345
-26685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+8345
-26685
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[Bug]: "
5+
labels: bug
6+
assignees: kenblu24
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Environment & Version Info (please complete the following information):**
23+
- OS (i.e. Windows 10 x64, MacOS, Linux Distro...):
24+
- Python Version :
25+
- SuperNeuroMAT Version :
26+
27+
**Additional context**
28+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "<Suggestion> "
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: "Create Draft Release w/ Docs"
2+
3+
# deploy the documentation to GitHub Pages via an artifact
4+
# does not create a branch or any commits
5+
6+
# define triggers
7+
on:
8+
push:
9+
branches:
10+
- release-test
11+
tags:
12+
- "v*"
13+
# pull_request:
14+
# branches:
15+
# - main
16+
17+
jobs:
18+
19+
# build the documentation
20+
build-docs:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v5
29+
30+
# - name: Setup Graphviz
31+
# uses: ts-graphviz/setup-graphviz@v2
32+
33+
- name: Set up Python # use uv to install Python
34+
run: uv python install
35+
36+
- name: Install superneuromat
37+
run: |
38+
uv venv venv
39+
. venv/bin/activate
40+
echo PATH=$PATH >> $GITHUB_ENV
41+
uv pip install .[docs]
42+
echo $PATH
43+
# note: need to modify GITHUB_ENV path for the new venv to be used
44+
# as each run step is a new shell
45+
- name: List src directory for debugging
46+
run: |
47+
ls -R src
48+
echo $PATH
49+
- name: Verify installation
50+
run: |
51+
uv pip show superneuromat
52+
- name: Build HTML
53+
run: |
54+
cd docs
55+
./single html
56+
- name: Add to archive
57+
run: |
58+
zip -r superneuromat-${{ github.ref_name }}-docs.zip docs/superneuromat-docs/build
59+
- name: Upload artifacts
60+
uses: actions/upload-artifact@v4
61+
id: docs-release
62+
with:
63+
name: superneuromat-docs
64+
path: superneuromat-${{ github.ref_name }}-docs.zip
65+
- name: Upload pages artifacts
66+
uses: actions/upload-pages-artifact@v3
67+
id: docs-pages
68+
with:
69+
name: github-pages
70+
path: docs/superneuromat-docs/build/html/
71+
# - name: Deploy
72+
# uses: peaceiris/actions-gh-pages@v3
73+
# if: github.ref == 'refs/heads/main'
74+
# with:
75+
# github_token: ${{ secrets.GITHUB_TOKEN }}
76+
# publish_dir: docs/build/html
77+
78+
# Deploy job
79+
draft-release:
80+
# Add a dependency to the build job
81+
needs: build-docs
82+
if: github.ref_type == 'tag'
83+
84+
# Specify runner + deployment step
85+
runs-on: ubuntu-latest
86+
permissions:
87+
contents: write
88+
discussions: write
89+
steps:
90+
- name: Download artifacts
91+
uses: actions/download-artifact@v4
92+
with:
93+
name: superneuromat-docs
94+
95+
- name: show files
96+
run: ls -lAR
97+
- name: Create Draft Release and attach artifacts
98+
id: release
99+
uses: softprops/action-gh-release@v2
100+
env:
101+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
with:
103+
draft: true
104+
files: |
105+
superneuromat-${{ github.ref_name }}-docs.zip
106+
generate_release_notes: true
107+
fail_on_unmatched_files: true
108+
109+
# Deploy job
110+
deploy-pages:
111+
# Add a dependency to the build job
112+
needs: build-docs
113+
# only deploy pages if not a test tag
114+
if: ${{! contains(github.ref_name, 'test')}}
115+
116+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
117+
permissions:
118+
pages: write # to deploy to Pages
119+
id-token: write # to verify the deployment originates from an appropriate source
120+
121+
# Deploy to the github-pages environment
122+
environment:
123+
name: github-pages
124+
url: ${{ steps.docs-pages.outputs.page_url }}
125+
126+
# Specify runner + deployment step
127+
runs-on: ubuntu-latest
128+
steps:
129+
- name: Deploy to GitHub Pages
130+
id: docs-pages
131+
uses: actions/deploy-pages@v4

.github/workflows/pages-build.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: "Sphinx: Build HTML"
2+
3+
# deploy the documentation to GitHub Pages via an artifact
4+
# does not create a branch or any commits
5+
6+
# define triggers
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- actions-test
12+
pull_request:
13+
branches:
14+
- main
15+
16+
jobs:
17+
18+
# build the documentation
19+
build:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
29+
# - name: Setup Graphviz
30+
# uses: ts-graphviz/setup-graphviz@v2
31+
32+
- name: Set up Python # use uv to install Python
33+
run: uv python install
34+
35+
- name: Install superneuromat
36+
run: |
37+
uv venv venv
38+
. venv/bin/activate
39+
echo PATH=$PATH >> $GITHUB_ENV
40+
uv pip install .[docs]
41+
echo $PATH
42+
# note: need to modify GITHUB_ENV path for the new venv to be used
43+
# as each run step is a new shell
44+
- name: List src directory for debugging
45+
run: |
46+
ls -R src
47+
echo $PATH
48+
- name: Verify installation
49+
run: |
50+
uv pip show superneuromat
51+
- name: Build HTML
52+
run: |
53+
cd docs
54+
./single html
55+
- name: Upload artifacts
56+
uses: actions/upload-pages-artifact@v3
57+
id: deployment
58+
with:
59+
name: github-pages
60+
path: docs/superneuromat-docs/build/html/
61+
# - name: Deploy
62+
# uses: peaceiris/actions-gh-pages@v3
63+
# if: github.ref == 'refs/heads/main'
64+
# with:
65+
# github_token: ${{ secrets.GITHUB_TOKEN }}
66+
# publish_dir: docs/build/html
67+
68+
# Deploy job
69+
deploy:
70+
# Add a dependency to the build job
71+
needs: build
72+
if: github.ref == 'refs/heads/main'
73+
74+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
75+
permissions:
76+
pages: write # to deploy to Pages
77+
id-token: write # to verify the deployment originates from an appropriate source
78+
79+
# Deploy to the github-pages environment
80+
environment:
81+
name: github-pages
82+
url: ${{ steps.deployment.outputs.page_url }}
83+
84+
# Specify runner + deployment step
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Deploy to GitHub Pages
88+
id: deployment
89+
uses: actions/deploy-pages@v4

.github/workflows/pypi-release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Build & Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
release-build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.x"
28+
29+
- name: Build release distributions
30+
run: |
31+
python -m pip install build
32+
python -m build
33+
34+
- name: Upload distributions
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: release-dists
38+
path: dist/
39+
40+
pypi-publish:
41+
runs-on: ubuntu-latest
42+
needs:
43+
- release-build
44+
permissions:
45+
# IMPORTANT: this permission is mandatory for trusted publishing
46+
id-token: write
47+
48+
# Dedicated environments with protections for publishing are strongly recommended.
49+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
50+
environment:
51+
name: pypi
52+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
53+
# url: https://pypi.org/p/YOURPROJECT
54+
#
55+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
56+
# ALTERNATIVE: exactly, uncomment the following line instead:
57+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
58+
59+
steps:
60+
- name: Retrieve release distributions
61+
uses: actions/download-artifact@v4
62+
with:
63+
name: release-dists
64+
path: dist/
65+
66+
- name: Publish release distributions to PyPI
67+
uses: pypa/gh-action-pypi-publish@release/v1
68+
with:
69+
packages-dir: dist/

.github/workflows/test.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Tox Tests (partial)"
2+
3+
# run tests via tox
4+
5+
# define triggers
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- actions-test
11+
# tags:
12+
# - "v*"
13+
pull_request:
14+
branches:
15+
- main
16+
17+
jobs:
18+
test:
19+
name: test with ${{ matrix.env }} on ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
env: # see entries in [tool.tox.gh.python] in pyproject.toml
25+
- "3.13"
26+
- "3.9"
27+
os:
28+
- ubuntu-latest
29+
- macos-latest
30+
- windows-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install the latest version of uv
34+
uses: astral-sh/setup-uv@v5
35+
- name: Install tox
36+
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh
37+
- name: Install Python
38+
if: matrix.env != '3.13'
39+
run: uv python install --python-preference only-managed ${{ matrix.env }}
40+
- name: Setup test suite
41+
run: tox run -vv --notest --skip-missing-interpreters false
42+
env:
43+
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
44+
- name: Run test suite
45+
run: tox run --skip-pkg-install
46+
env:
47+
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}

0 commit comments

Comments
 (0)