Skip to content

Commit

Permalink
Chore: Initial code drop from physrisk
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions committed Dec 4, 2023
1 parent 66828e9 commit 9efc7ff
Show file tree
Hide file tree
Showing 91 changed files with 6,829 additions and 8,483 deletions.
8 changes: 5 additions & 3 deletions .aicoe-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
# Setup and configuring aicoe-ci with configuration file `.aicoe-ci.yaml`
# Example `.aicoe-ci.yaml` with a full list of config options is available here: https://github.com/AICoE/aicoe-ci/blob/master/docs/.aicoe-ci.yaml
# Example `.aicoe-ci.yaml` with a full list of config options is available
# here: https://github.com/AICoE/aicoe-ci/blob/master/docs/.aicoe-ci.yaml
check:
# Uncomment following line to build a public image of this repo
# - thoth-build
# Uncomment following line to build a public image of this repo
# - thoth-build
# Uncomment following lines to build a public image of this repo
# build:
# build-stratergy: Source
Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Bug Reporting

---

name: Bug report
about: Create a report to help us improve
labels: bug

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Feature Requests

---

name: Feature request
about: Suggest an idea for this project
labels: enhancement

---

**Is your feature request related to a problem? Please describe.**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/major-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Major release
about: Create a new major release
title: New major release
assignees: 'sesheta'
assignees: "sesheta"
labels: bot
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/minor-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Minor release
about: Create a new minor release
title: New minor release
assignees: 'sesheta'
assignees: "sesheta"
labels: bot
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/patch-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Patch release
about: Create a new patch release
title: New patch release
assignees: 'sesheta'
assignees: "sesheta"
labels: bot
---

Expand Down
9 changes: 6 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/POLISH_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Polish Notebook(s)

---

name: Polish Notebook(s)
about: Finalize notebooks prior to publishing or promoting

---

## Related Issues and Dependencies


## The following checklist items have been completed for each notebook in this PR:
## The following checklist items have been completed for each notebook in this PR

- [ ] Proofread by other team member for grammar and spelling
- [ ] Proofread by other team member for coherence and reproducibility (does the analysis make sense as you read through the code and markdown from top to bottom?)
Expand All @@ -25,7 +29,6 @@ about: Finalize notebooks prior to publishing or promoting
- [ ] Cell execution counts are in order (a working "run all" was performed just before PR)
- [ ] All pre-commit checks pass



## Additional context

<!-- If there is some reason that one of the above steps could not be completed, please describe what it is and why. -->
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/SIMPLE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Related Issues and Dependencies
# Related Issues and Dependencies


Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/builds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: "🧪 Test builds (matrix)"

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, edited, synchronize]

jobs:
pre-release:
# Don't run if pull request is NOT merged
# if: github.event.pull_request.merged == true
runs-on: "ubuntu-latest"
continue-on-error: true
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: "Populate environment variables"
id: setenv
run: |
echo "Action triggered by user: ${GITHUB_TRIGGERING_ACTOR}"
set -x
datetime=$(date +'%Y%m%d%H%M')
export datetime
echo "datetime=${datetime}" >> "$GITHUB_OUTPUT"
vernum="${{ matrix.python-version }}.${datetime}"
echo "vernum=${vernum}" >> "$GITHUB_OUTPUT"
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: "Tag for test release"
# Delete all local tags, then create a synthetic tag for testing
# Use the date/time to avoid conflicts uploading to Test PyPI
run: |
scripts/dev-versioning.sh "${{ steps.setenv.outputs.vernum }}"
git tag | xargs -L 1 | xargs git tag --delete
git tag "v${{ steps.setenv.outputs.vernum }}"
git checkout "tags/v${{ steps.setenv.outputs.vernum }}"
grep version pyproject.toml
- name: "Build with TOX (PDM backend)"
run: |
mkdir metadata
tox -e build
- name: "Save dependency graph"
uses: GuillaumeFalourd/[email protected]
with:
command_line: pdm list --graph
output_file_name: metadata/dependency-graph.txt
# yamllint disable-line rule:truthy
display_file_content: NO

- name: "Save file listing of build directory"
uses: GuillaumeFalourd/[email protected]
with:
command_line: ls -al dist/*
output_file_name: metadata/dist-ls.txt
# yamllint disable-line rule:truthy
display_file_content: NO

- name: Store the build metadata
uses: actions/upload-artifact@v3
with:
name: ${{ github.ref_name }}
path: metadata/*
retention-days: 14

- name: Store the build artefacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.ref_name }}
path: dist/
retention-days: 14
27 changes: 0 additions & 27 deletions .github/workflows/ci.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: "⛔️ Update dependencies"

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * MON"

jobs:
update-dependencies:
name: "Update Python modules"
runs-on: ubuntu-latest
permissions:
# IMPORTANT: mandatory to raise the PR
id-token: write
pull-requests: write
repository-projects: write
contents: write

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- name: "Setup PDM for build commands"
uses: pdm-project/setup-pdm@v3
with:
version: 2.10.3

- name: Update dependencies
uses: pdm-project/update-deps-action@main
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: "Chore: Update dependencies and pdm.lock"
pr-title: "Update Python module dependencies"
update-strategy: eager
# Whether to install PDM plugins before update
install-plugins: "false"
50 changes: 50 additions & 0 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: "🗒️ Build documentation"

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
pull_request:
types: [closed]

jobs:
build_and_deploy:
# Don't run if pull request is NOT merged
if: github.event.pull_request.merged == true
name: "Rebuild documentation"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Setup PDM for build commands"
uses: pdm-project/setup-pdm@v3

- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pdm export -o requirements.txt
if [ -f docs/requirements.txt ]; then
pip install -r docs/requirements.txt; fi
- name: "Build documentation: (tox/sphinx)"
run: |
tox -e docs
- name: "Publish documentation"
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html/
keep_files: true
47 changes: 0 additions & 47 deletions .github/workflows/python-publish.yml

This file was deleted.

Loading

0 comments on commit 9efc7ff

Please sign in to comment.