-
Notifications
You must be signed in to change notification settings - Fork 9
Add YAML linting and improve setup script
#80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2874a62
24edc3f
e151dc3
3a89302
c4dc4d5
42854e5
12191f4
326c8a3
3611273
8c78e4e
22ad7ca
a507edf
8e1b9c1
d5763a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ ENVS = data inference prewxvx training wxvx | |
| HELPERS = prewxvx vx zarr | ||
| PACKAGE = eagle | ||
| STEPS = data grids-and-meshes inference prewxvx-global prewxvx-lam training vx-grid-global vx-grid-lam vx-obs-global vx-obs-lam zarr-gfs zarr-hrrr | ||
| TOOLING = config devenv env format lint realize shellcheck test typecheck validate | ||
| TOOLING = config devenv env format lint realize shellcheck test typecheck validate yamllint | ||
|
|
||
| activate = @source conda/etc/profile.d/conda.sh && conda activate $(1) | ||
| check = @$(if $(1),,$(error $(2)= argument required)) | ||
|
|
@@ -98,7 +98,7 @@ shellcheck: | |
| @echo "=> Checking shell scripts" | ||
| @(set -x && shellcheck --format=gcc --severity=info --shell=bash $(BASHSRCS)) | ||
|
|
||
| test: lint shellcheck typecheck | ||
| test: lint shellcheck typecheck yamllint | ||
|
|
||
| training: | ||
| $(call activate,training) | ||
|
|
@@ -146,6 +146,11 @@ vx-obs-global: | |
| vx-obs-lam: | ||
| @$(make) vx truth=grid2obs extent=lam | ||
|
|
||
| yamllint: | ||
| $(call activate,base) | ||
| @echo "=> Linting YAML configs" | ||
| @(set -x && yamllint --no-warnings config/) | ||
|
|
||
|
Comment on lines
+149
to
+153
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. each recipe line runs in a separate shell. conda activate base line won’t affect the later yamllint. meaning yamllint will run in whatever environment Make happens to have.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. Thats great! |
||
| zarr: | ||
| $(call activate,data) | ||
| ifeq ($(task),?) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| # This is the base EAGLE config. It currently configures the Nested EAGLE case. | ||
|
|
||
| # yamllint disable rule:anchors rule:line-length | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When final configs are created by composing multiple YAML files together, it may be that one config contains a YAML alias for which no corresponding anchor is apparently available -- but it will be available after composition. EAGLE YAML configs may also have long lines. |
||
|
|
||
| app: | ||
| base: /path/to/eagle/src | ||
| experiment_name: default | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make testwill now also runmake yamllint, though the latter can also be requested independently.