Skip to content

Commit 782849a

Browse files
authored
Merge pull request #129 from AD-SDL/dev
Improvements for Admin Actions, Datapoints, and Docs
2 parents 4345349 + 06fefc6 commit 782849a

File tree

97 files changed

+4199
-2052
lines changed

Some content is hidden

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

97 files changed

+4199
-2052
lines changed

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ jobs:
7272
tags: ${{ steps.meta.outputs.tags }}
7373
labels: ${{ steps.meta.outputs.labels }}
7474
platforms: linux/amd64,linux/arm64
75-
#cache-from: type=gha
76-
#cache-to: type=gha,mode=max
75+
cache-from: type=gha
76+
cache-to: type=gha,mode=max

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
- id: nbstripout
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
1919
# Ruff version.
20-
rev: v0.5.5
20+
rev: v0.6.5
2121
hooks:
2222
# Run the linter.
2323
- id: ruff

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,16 @@ RUN mkdir -p wei/requirements
2424
RUN mkdir -p .wei/experiments
2525
RUN mkdir -p .diaspora
2626

27-
# Install Python Dependencies first, for caching purposes
27+
# Install Node and Python Dependencies first, for caching purposes
28+
COPY ./src/ui/package*.json ./
29+
RUN npm install
30+
2831
COPY requirements/requirements.txt wei/requirements/requirements.txt
2932
COPY requirements/dev.txt wei/requirements/dev.txt
3033
RUN --mount=type=cache,target=/root/.cache \
3134
pip install --upgrade setuptools wheel pip && \
3235
pip install -r wei/requirements/requirements.txt
3336

34-
# Install Node Dependencies first, for caching purposes
35-
COPY ./src/ui/package*.json ./
36-
RUN npm install
37-
3837
# Copy rest of wei files
3938
COPY src wei/src
4039
COPY tests wei/tests

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
################################################################################
44
.DEFAULT_GOAL := init
55

6-
.PHONY: init checks test clean
6+
.PHONY: init checks test clean down up restart rebuild
77

88
init: # Do the initial configuration of the project
99
@test -e .env || cp example.env .env
@@ -22,11 +22,20 @@ checks: # Runs all the pre-commit checks
2222
@pre-commit install
2323
@pre-commit run --all-files || { echo "Checking fixes\n" ; pre-commit run --all-files; }
2424

25-
test: init .env build # Runs all the tests
26-
@docker compose up -d
25+
test: init .env build up # Runs all the tests
2726
@docker compose run test_wei_server pytest -p no:cacheprovider wei
2827
@#docker compose down
2928

29+
down:
30+
@docker compose down
31+
32+
up:
33+
@docker compose up -d --remove-orphans
34+
35+
restart: build up
36+
37+
rebuild: restart
38+
3039
clean:
3140
@rm .env
3241

compose.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ services:
6363
--save 600 1
6464
--loglevel warning
6565
--appendonly yes'
66+
utilities:
67+
image: ${IMAGE}
68+
container_name: utilities
69+
ports:
70+
- 8001:8001
71+
command: 'python3 -m wei.modules.utility_module
72+
--port 8001
73+
--alias utilities'
6674

6775
################
6876
# Data Storage #

docs/source/assets/dashboard.png

219 KB
Loading

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ wei.core.admin
1313

1414
.. autosummary::
1515

16+
check_can_send_admin_command
1617
send_cancel
18+
send_lock
1719
send_pause
1820
send_reset
1921
send_resume
2022
send_safety_stop
2123
send_shutdown
24+
send_unlock
2225

2326

2427

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
wei.core.notifications
2+
======================
3+
4+
.. automodule:: wei.core.notifications
5+
6+
7+
8+
9+
10+
11+
12+
.. rubric:: Functions
13+
14+
.. autosummary::
15+
16+
send_email
17+
send_failed_step_notification
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ wei.core
3434
wei.core.location
3535
wei.core.loggers
3636
wei.core.module
37+
wei.core.notifications
3738
wei.core.scheduler
3839
wei.core.state_manager
3940
wei.core.step

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ wei.modules
2828
:recursive:
2929

3030
wei.modules.rest_module
31+
wei.modules.utility_module
3132

0 commit comments

Comments
 (0)