-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from rcpch/18-python-version-upgrade-3.11
Python Version upgrade, Dockerisation, GitHub Actions testing, repo tidy.
- Loading branch information
Showing
19 changed files
with
177 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### Overview | ||
|
||
Please describe the purpose of this PR here. | ||
|
||
### Code changes | ||
|
||
Please describe the changes you made here. | ||
|
||
### Documentation changes (done or required as a result of this PR) | ||
|
||
Please describe any changes to documentation here. | ||
|
||
### Related Issues | ||
|
||
List any issues related to this PR here. | ||
|
||
### Mentions | ||
|
||
@mentions of the person or team responsible for reviewing proposed changes. |
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,20 @@ | ||
name: Adds new Issues automatically to the dGC Project on GitHub | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
pull_request: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue or PR to project automatically | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
project-url: https://github.com/orgs/rcpch/projects/5 #dGC Project | ||
github-token: ${{ secrets.AUTO_ADD_TO_PROJECT_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
name: Run Pytest on pushes to main branches or PRs to any branch | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- development | ||
- staging | ||
- live | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
# Runs tests on multiple python versions across the range we support | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 # latest as at March 2024 | ||
|
||
- name: Set up Python version ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 # latest as at March 2024 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
pip install -r requirements.txt | ||
- name: Run pytest | ||
run: | | ||
pytest |
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 |
---|---|---|
|
@@ -130,3 +130,6 @@ dmypy.json | |
|
||
.vscode | ||
.pytest/cache | ||
|
||
# MacOS DS_Store files | ||
.DS_Store |
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,7 @@ | ||
FROM python:3.12-bookworm | ||
|
||
COPY requirements.txt . | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
COPY . . |
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,12 @@ | ||
# NOTE The below is the Docker Compose specification version NOT the Python version: | ||
version: '3.8' | ||
|
||
services: | ||
rcpchgrowth-python: | ||
build: . | ||
volumes: | ||
- .:/app | ||
tty: true # Allocate a pseudo-TTY | ||
stdin_open: true # Keep stdin open | ||
command: | | ||
cd app; pytest |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
Binary file not shown.
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ pytest | |
python-dateutil | ||
scipy | ||
matplotlib | ||
setuptools | ||
setuptools |
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -v # Enable verbose mode | ||
set -e # Exit on error | ||
|
||
# scripts may need to be made executable on some platforms before they can be run | ||
# chmod +x <filename> is the command to do this on unixy systems | ||
|
||
# shuts down the Docker Compose setup but does not destroy containers or images | ||
docker compose down |
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -v # Enable verbose mode | ||
set -e # Exit on error | ||
|
||
# scripts may need to be made executable on some platforms before they can be run | ||
# chmod +x <filename> is the command to do this on unixy systems | ||
|
||
s/remove-containers-and-images | ||
s/up |
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,10 @@ | ||
#!/bin/bash | ||
|
||
set -v # Enable verbose mode | ||
set -e # Exit on error | ||
|
||
# scripts may need to be made executable on some platforms before they can be run | ||
# chmod +x <filename> is the command to do this on unixy systems | ||
|
||
# shuts down the Docker Compose setup AND deletes containers and images (but not volumes) | ||
docker compose down --rmi local # removes the container and local images |
Oops, something went wrong.