Commit 3d3db11
committed
Replace make, dotenv, honcho with mise
**Breaking change:** To migrate from an existing local `.env`, add
`[env]` to the top of the file and rename it to `mise.local.toml`.
`mise` can be used to simplify our existing dev setup by replacing other
dependencies.
Running the project is now two commands:
```sh
mise install
mise dev
```
`mise dev` will automatically re-run bundler scripts, build scripts,
only when relevant files change, as the tasks specify relevant `sources`
and `outputs`. This was previously accomplished using a `sentinel` file
which is no longer necessary. (Technical detail: mise automatically
creates sentinels in `~/.mise` as necessary)
`mise tasks` lists available tasks:
```sh
$ mise tasks
Name Description
build Build all assets
build:css Build CSS from SCSS
build:favicons Copy NHS UK frontend favicons
build:js Build JavaScript bundles
bundle Install all dependencies
ci Run CI checks in parallel
clean Clean build artifacts and dependencies
dev Start development servers
dev:flask Run Flask development server
dev:js Watch and build JS files
dev:scss Watch and build SCSS files
docker Build and run Docker container
docker:build Build Docker image
docker:run Run Docker container
gitleaks Detect secrets with gitleaks
lint Run code linting
lint:fix Run code linting with autofix
npm:install Install Node.js dependencies
test Run all tests
test:coverage Run tests with coverage reporting
uv:sync Sync Python dependencies with uv
```
Notable cool new tasks: `mise ci` which runs all the CI checks in
parallel.
Local dev-only environment variables are now declared via `mise.local.toml`.
**Breaking change:** To migrate from an existing local `.env`, add
`[env]` to the top of the file and rename it to `mise.local.toml`.
```sh
$ mise env
set -gx CLIENT_ID deadbabe
set -gx CLIENT_SECRET cafebabe
set -gx DOCKER_IMAGE 'mavis-reporting:latest'
set -gx FLASK_APP 'mavis.reporting:create_app'
set -gx FLASK_ENV development
set -gx HOST_PORT 4001
set -gx MAVIS_ROOT_URL 'http://localhost:4000/'
set -gx PATH '/Users/...'
set -gx PYTHONPYCACHEPREFIX tmp/pycache
set -gx SECRET_KEY deadbeef
set -gx SESSION_TTL_SECONDS 600
```
- Removal of `.tool-versions` in favour of declaring them in `mise.toml`
- `mise clean` now thoroughly cleans ~everything
- New `tmp` folder, and `__PYCACHE__` bytecode directories will spawn
there instead of polluting `./mavis/`. This is a quality of life
improvement when using tools like `tree`1 parent a788850 commit 3d3db11
File tree
13 files changed
+192
-200
lines changed- .github/workflows
- mavis/reporting/config
13 files changed
+192
-200
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | | - | |
26 | | - | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 5 | | |
11 | 6 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 7 | + | |
| 8 | + | |
46 | 9 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
51 | 15 | | |
52 | 16 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 17 | + | |
62 | 18 | | |
63 | | - | |
64 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
65 | 22 | | |
66 | | - | |
| 23 | + | |
67 | 24 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
77 | 29 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 30 | + | |
81 | 31 | | |
82 | | - | |
| 32 | + | |
| 33 | + | |
83 | 34 | | |
84 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
85 | 38 | | |
86 | | - | |
| 39 | + | |
87 | 40 | | |
88 | 41 | | |
89 | 42 | | |
90 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
91 | 46 | | |
92 | 47 | | |
93 | 48 | | |
94 | 49 | | |
95 | | - | |
| 50 | + | |
96 | 51 | | |
97 | 52 | | |
98 | 53 | | |
| |||
106 | 61 | | |
107 | 62 | | |
108 | 63 | | |
109 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
110 | 67 | | |
111 | 68 | | |
112 | 69 | | |
113 | | - | |
| 70 | + | |
| 71 | + | |
114 | 72 | | |
115 | 73 | | |
116 | | - | |
117 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments