Skip to content

Commit 8d6b305

Browse files
authored
Initial commit
0 parents  commit 8d6b305

26 files changed

+3160
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Description of Bug
11+
A clear and concise description of what the bug is.
12+
13+
## Steps To Reproduce
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
## Expected behavior
21+
A clear and concise description of what you expected to happen.
22+
23+
## Actual Behaviour
24+
A clear and concise description of what you actually see happen.
25+
26+
## Screenshots
27+
If applicable, add screenshots to help explain your problem.
28+
29+
## Setup
30+
- OS: [e.g. Windows 11]
31+
- Simvue Integrations Version: [e.g. v1.1.0]
32+
- Simvue Python API Version: [e.g v1.2.0]
33+
34+
## Additional context
35+
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 a new feature or enhancement to add to an existing Plugin
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Problem Statement
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
## Solution
14+
A clear and concise description of what you want to happen.
15+
16+
## Alternatives 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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Hotfix - [Enter Bug which has been Fixed]
2+
3+
## Description of Bug(s) and Fix(es)
4+
[Describe the bug(s) which are being fixed, and how they have been addressed]
5+
6+
## Testing Performed
7+
- **Tested Software Version(s)**: [Versions of the software which the fix has been tested against]
8+
- **Tested Operating System(s)**: [Names of operating systems which the fix has been tested against]
9+
- **Tested Python Version(s)**: [The python versions which the fix has been tested against]
10+
- **Tested Simvue Python API Version(s)**: [Versions of the Python API which the fix has been tested against]
11+
12+
## Links to Issues
13+
[Provide links to any issues which have been fixed as a result of this PR]
14+
15+
## Comments
16+
[Add any other comments about this PR here]
17+
18+
## Checklist
19+
- [ ] Code corresponds to the guidelines set out in the Contributing.md document
20+
- [ ] Any new Python package requirements have been added as an Extra to the `pyproject.toml`
21+
- [ ] New unit tests have been added to check for this bug in the future
22+
- [ ] All unit tests run and pass locally
23+
- [ ] Integration tests are passing in the CI
24+
- [ ] Code passes all pre-commit hooks
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Miscellaneous - [Enter PR Title]
2+
3+
## Description
4+
[Describe what this new PR does]
5+
6+
## Testing Performed
7+
[Detail any relevant testing which has been performed]
8+
9+
## Links to Documentation
10+
[If the documentation requires updating due to this PR, provide a link to a PR in the Documentation repository]
11+
12+
## Links to Issues
13+
[Provide links to any issues which have been raised or resolved due to this PR]
14+
15+
## Comments
16+
[Add any other comments about this PR here]
17+
18+
## Checklist
19+
- [ ] Code corresponds to the guidelines set out in the Contributing.md document
20+
- [ ] Any new Python package requirements have been added as an Extra to the `pyproject.toml`
21+
- [ ] All unit tests run and pass locally
22+
- [ ] Integration tests are passing in the CI
23+
- [ ] Code passes all pre-commit hooks
24+
- [ ] Documentation has been updated, if applicable
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# New Plugin Feature - [Enter Feature Title]
2+
3+
## Description of Feature
4+
[Describe what the new feature does, and how it is useful]
5+
6+
## Testing Performed
7+
- **Tested Software Version(s)**: [Versions of the software which the plugin has been tested against]
8+
- **Tested Operating System(s)**: [Names of operating systems which this has been tested against]
9+
- **Tested Python Version(s)**: [The python versions which this plugin has been tested against]
10+
- **Tested Simvue Python API Version(s)**: [Versions of the Python API which this plugin has been tested against]
11+
12+
## Documentation
13+
- **Link to Documentation PR**: [Provide a link to a Pull Request in the Documentation repo, where the `Integrations` and `Examples` pages have been updated to include your new Feature (if applicable)]
14+
15+
## Links to Issues
16+
[Provide links to any issues which have been raised or resolved due to this PR]
17+
18+
## Comments
19+
[Add any other comments about this PR here]
20+
21+
## Checklist
22+
- [ ] Code corresponds to the guidelines set out in the Contributing.md document
23+
- [ ] Any new Python package requirements have been added as an Extra to the `pyproject.toml`
24+
- [ ] Unit tests have been added which check all functionality of the new feature, using Mock functions to replicate the simulation software
25+
- [ ] All unit tests run and pass locally
26+
- [ ] Integration tests have been updated to use the new feature and are passing in the CI
27+
- [ ] Code passes all pre-commit hooks
28+
- [ ] The `Integrations` and `Examples` pages of the documentation have been updated to include information about your new feature (if applicable)
29+
- [ ] Example scripts have been updated to include your new feature
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# New Tests - [Enter Tests Description]
2+
3+
## Description of Tests
4+
[Describe what the new tests are testing]
5+
6+
## Testing Performed
7+
- **Tested Software Version(s)**: [Versions of the software which the tests have been ran against]
8+
- **Tested Operating System(s)**: [Names of operating systems which the tests have been ran against]
9+
- **Tested Python Version(s)**: [The python versions which the tests have been ran against]
10+
- **Tested Simvue Python API Version(s)**: [Versions of the Python API which the tests have been ran against]
11+
12+
## Links to Issues
13+
[Provide links to any issues which have been raised or resolved due to this PR]
14+
15+
## Comments
16+
[Add any other comments about this PR here]
17+
18+
## Checklist
19+
- [ ] Code corresponds to the guidelines set out in the Contributing.md document
20+
- [ ] Any new Python package requirements have been added as an Extra to the `pyproject.toml`
21+
- [ ] All unit tests run and pass locally
22+
- [ ] Integration tests are passing in the CI
23+
- [ ] Code passes all pre-commit hooks

.github/pull-request-template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Select Your Pull Request Template
2+
Please go to 'Preview' view using the toggle above, and then select the appropriate pull request template by clicking on the link from the list below:
3+
4+
## New Feature added to Existing Connector
5+
If you have added a new feature to an existing Connector, [please use this template](?expand=1&template=new-feature-template.md)
6+
7+
## New Tests
8+
If you have added some new Unit or Integration tests, [please use this template](?expand=1&template=new-tests-template.md)
9+
10+
## Bugfix or Hotfix
11+
If you are creating a hotfix or fixing some bugs in the code, [please use this template](?expand=1&template=bugfix-template.md)
12+
13+
## Other
14+
If your Pull Request does not fit into any of the above categories, [pleae use this template](?expand=1&template=miscellaneous-template.md)

.github/workflows/deploy.yaml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Deploy to PyPi
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
build:
8+
name: Build Wheels and Package 🛠️
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Code
12+
uses: actions/checkout@v4
13+
- name: Set up Python 3.12
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.x"
17+
- name: Install Poetry
18+
run: python -m pip install poetry
19+
- name: Build Module
20+
run: poetry build
21+
- name: Store the distribution packages
22+
uses: actions/upload-artifact@v4
23+
with:
24+
retention-days: 1
25+
if-no-files-found: error
26+
name: python-package-distributions
27+
path: dist/
28+
publish_test:
29+
name: Publish to TestPyPi 🧪
30+
needs:
31+
- build
32+
runs-on: ubuntu-latest
33+
environment:
34+
name: test_pypi
35+
url: https://test.pypi.org/p/{your-module-name}
36+
permissions:
37+
id-token: write
38+
steps:
39+
- name: Download all the dists
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: python-package-distributions
43+
path: dist/
44+
- name: Publish to TestPyPi
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
with:
47+
repository-url: https://test.pypi.org/legacy/
48+
verbose: true
49+
publish:
50+
name: Publish to PyPi 🐍📦
51+
needs:
52+
- publish_test
53+
if: "!contains(github.ref, 'rc') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha')"
54+
runs-on: ubuntu-latest
55+
environment:
56+
name: pypi
57+
url: https://pypi.org/p/{your-module-name}
58+
permissions:
59+
id-token: write
60+
steps:
61+
- name: Download all the dists
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: python-package-distributions
65+
path: dist/
66+
- name: Publish to PyPi
67+
uses: pypa/gh-action-pypi-publish@release/v1
68+
github-release:
69+
name: Create Signed GitHub Release 🔏
70+
needs:
71+
- publish
72+
runs-on: ubuntu-latest
73+
permissions:
74+
contents: write
75+
id-token: write
76+
steps:
77+
- name: Download all the dists
78+
uses: actions/download-artifact@v4
79+
with:
80+
name: python-package-distributions
81+
path: dist/
82+
- name: Sign the dists with Sigstore
83+
uses: sigstore/[email protected]
84+
with:
85+
inputs: >-
86+
./dist/*.tar.gz
87+
./dist/*.whl
88+
- name: Create GitHub Release
89+
env:
90+
GITHUB_TOKEN: ${{ github.token }}
91+
run: >-
92+
LATESTCHANGES=$(awk '
93+
BEGIN { header_found = 0 }
94+
/^## / {
95+
if (header_found == 0) {
96+
header = $0
97+
header_found = 1
98+
next
99+
} else {
100+
exit
101+
}
102+
}
103+
header_found == 1 && /^\* / { print }
104+
' CHANGELOG.md)
105+
gh release create
106+
'${{ github.ref_name }}'
107+
--notes "$LATESTCHANGES"
108+
--title 'Simvue ${{ github.ref_name }}'
109+
--repo '${{ github.repository }}'
110+
- name: Upload artifact signatures to GitHub Release
111+
env:
112+
GITHUB_TOKEN: ${{ github.token }}
113+
run: >-
114+
gh release upload
115+
'${{ github.ref_name }}' dist/**
116+
--repo '${{ github.repository }}'
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches: ["main", "dev"]
6+
pull_request:
7+
branches: [ "main", "dev"]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
IntegrationTests:
19+
runs-on: ubuntu-latest
20+
container:
21+
image: {your_base_image_here}
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.11"
28+
- name: Install poetry
29+
run: python3 -m pip install poetry
30+
- name: Install dependencies and run tests
31+
run: |
32+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
33+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
34+
poetry install --all-extras
35+
poetry run pytest tests/integration

.github/workflows/test_macos.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Unit Tests (MacOS)
2+
3+
on:
4+
push:
5+
branches: ["main", "dev"]
6+
pull_request:
7+
branches: [ "main", "dev"]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build_macos:
19+
20+
runs-on: macos-latest
21+
timeout-minutes: 30
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Python 3.10
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
- name: Install dependencies
29+
run: |
30+
rm poetry.lock
31+
python -m pip install poetry
32+
- name: Test with pytest
33+
run: |
34+
export SIMVUE_URL=${{ secrets.SIMVUE_URL }}
35+
export SIMVUE_TOKEN=${{ secrets.SIMVUE_TOKEN }}
36+
poetry install --all-extras
37+
poetry run pytest tests/unit/

0 commit comments

Comments
 (0)