Skip to content

Commit 3d00c43

Browse files
authored
Merge pull request #134 from AD-SDL/dev
Workflow Parameters Support; Documentation Improvements
2 parents ac6ad7f + de3c4d4 commit 3d00c43

File tree

76 files changed

+1250
-1426
lines changed

Some content is hidden

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

76 files changed

+1250
-1426
lines changed

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111
name: Checkout code
12-
- uses: actions/setup-python@v3
12+
- uses: actions/setup-python@v4
1313
name: Setup Python
14+
with:
15+
python-version: 3.12
1416
- uses: pre-commit/[email protected]
1517
name: Run Pre-Commit Checks

.github/workflows/pypi-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v3
1616
name: Checkout code
17-
- name: Set up Python 3.9
17+
- name: Set up Python 3.12
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: 3.9
20+
python-version: 3.12
2121
- name: Setup PDM
2222
uses: pdm-project/setup-pdm@v3
2323
with:
24-
python-version: 3.9
24+
python-version: 3.12
2525
- name: Install dependencies
2626
run: pdm install
2727
- name: Publish to PyPi

.github/workflows/tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ jobs:
88
steps:
99
- uses: actions/checkout@v3
1010
name: Checkout code
11-
- name: Set up Python 3.9
11+
- name: Set up Python 3.12
1212
uses: actions/setup-python@v4
1313
with:
14-
python-version: 3.9
14+
python-version: 3.12
1515
- name: Setup PDM
1616
uses: pdm-project/setup-pdm@v3
1717
with:
18-
python-version: 3.9
19-
- name: Build the Project
20-
run: make init build
18+
python-version: 3.12
2119
- name: Test with pytest
22-
run: make test
20+
run: make init build test

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-yaml
66
- id: check-json
@@ -17,7 +17,7 @@ repos:
1717
- id: nbstripout
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
1919
# Ruff version.
20-
rev: v0.6.5
20+
rev: v0.7.0
2121
hooks:
2222
# Run the linter.
2323
- id: ruff

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ COPY requirements/requirements.txt wei/requirements/requirements.txt
3232
COPY requirements/dev.txt wei/requirements/dev.txt
3333
RUN --mount=type=cache,target=/root/.cache \
3434
pip install --upgrade setuptools wheel pip && \
35-
pip install -r wei/requirements/requirements.txt
35+
pip install -r wei/requirements/requirements.txt && \
36+
pip install -r wei/requirements/dev.txt
37+
38+
ENV PATH="${PATH}:~/.local/bin"
3639

3740
# Copy rest of wei files
3841
COPY src wei/src

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ else
1414
@sed -i 's/^USER_ID=.*/USER_ID=$(shell id -u)/' .env
1515
@sed -i 's/^GROUP_ID=.*/GROUP_ID=$(shell id -g)/' .env
1616
endif
17+
ifeq ($(OS),Windows_NT)
18+
@where pdm || (Invoke-WebRequest -Uri https://pdm-project.org/install-pdm.py -UseBasicParsing).Content | py -
19+
else
20+
@where pdm || curl -sSL https://pdm-project.org/install-pdm.py | python3 -
21+
endif
1722

1823

1924
.env: init
@@ -23,7 +28,7 @@ checks: # Runs all the pre-commit checks
2328
@pre-commit run --all-files || { echo "Checking fixes\n" ; pre-commit run --all-files; }
2429

2530
test: init .env build up # Runs all the tests
26-
@docker compose run test_wei_server pytest -p no:cacheprovider wei
31+
@docker compose exec test_wei_server pytest -p no:cacheprovider wei
2732
@#docker compose down
2833

2934
down:
@@ -52,7 +57,7 @@ build: build-python # Builds the project
5257

5358
# (Make sure you've installed PDM)
5459

55-
init-python: init pdm.lock deps # Installs the python environment (requires PDM)
60+
init-python: init pdm-update pdm.lock deps # Installs the python environment (requires PDM)
5661

5762
build-python: init-python # Builds the pypi package for APP_NAME
5863
pdm build
@@ -66,6 +71,9 @@ publish-python: init-python # Publishes the pypi package for wei
6671
# Python Dependency Managment #
6772
###############################
6873

74+
pdm-update:
75+
pdm self update
76+
6977
pdm.lock: pyproject.toml # Generates the pdm.lock file
7078
pdm install --group :all
7179

docs/source/pages/_autosummary/wei.config.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,9 @@ wei.config
44
.. automodule:: wei.config
55

66

7-
8-
9-
10-
11-
12-
13-
14-
15-
167
.. rubric:: Classes
178

189
.. autosummary::
1910

2011
Config
21-
22-
23-
24-
25-
26-
27-
28-
29-
12+

docs/source/pages/_autosummary/wei.core.admin.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ wei.core.admin
44
.. automodule:: wei.core.admin
55

66

7-
8-
9-
10-
11-
127
.. rubric:: Functions
138

149
.. autosummary::
@@ -22,16 +17,4 @@ wei.core.admin
2217
send_safety_stop
2318
send_shutdown
2419
send_unlock
25-
26-
27-
28-
29-
30-
31-
32-
33-
34-
35-
36-
37-
20+

docs/source/pages/_autosummary/wei.core.events.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,15 @@ wei.core.events
44
.. automodule:: wei.core.events
55

66

7-
8-
9-
10-
11-
127
.. rubric:: Functions
138

149
.. autosummary::
1510

1611
send_event
1712

18-
19-
20-
21-
2213
.. rubric:: Classes
2314

2415
.. autosummary::
2516

2617
EventHandler
27-
28-
29-
30-
31-
32-
33-
34-
35-
18+

docs/source/pages/_autosummary/wei.core.experiment.rst

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,11 @@ wei.core.experiment
44
.. automodule:: wei.core.experiment
55

66

7-
8-
9-
10-
11-
127
.. rubric:: Functions
138

149
.. autosummary::
1510

1611
get_experiment
1712
parse_experiments_from_disk
1813
register_new_experiment
19-
20-
21-
22-
23-
24-
25-
26-
27-
28-
29-
30-
31-
14+

0 commit comments

Comments
 (0)