Skip to content

Commit 60f57e4

Browse files
committed
feat: #377 initial implementation
1 parent 106f59d commit 60f57e4

File tree

4 files changed

+394
-15
lines changed

4 files changed

+394
-15
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ build
66
_README.md
77
dist
88
.env-apphub-configurator
9-
hatch
9+
hatch
10+
11+
.project
12+
.settings
13+
.pydevproject

Taskfile.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: '3'
2+
3+
tasks:
4+
5+
# schema
6+
7+
conditional-pip-install:
8+
internal: true
9+
status:
10+
- command -v {{.COMMAND}}
11+
cmds:
12+
- pip install {{.COMMAND}}
13+
14+
check-schema:
15+
desc: Executes a strict JSON schema check
16+
deps:
17+
- task: conditional-pip-install
18+
vars:
19+
COMMAND: check-jsonschema
20+
cmds:
21+
- for: ["./files/hub/config.yml"]
22+
cmd: check-jsonschema --schemafile ./schemas/config.schema.yaml {{.ITEM}}
23+
24+
create-models:
25+
desc: Generates the Pydantic models with field aliases
26+
deps:
27+
- task: conditional-pip-install
28+
vars:
29+
COMMAND: datamodel-codegen
30+
cmds:
31+
- |
32+
datamodel-codegen --input ./schemas/config.schema.yaml \
33+
--input-file-type jsonschema \
34+
--output-model-type pydantic_v2.BaseModel \
35+
--base-class pydantic.BaseModel \
36+
--output ./application_hub_context/models.py

files/hub/config.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ profiles:
3030
name: init
3131
persist: false
3232
readonly: true
33-
- content: null
34-
default_mode: null
33+
- # content: null
34+
# default_mode: null
3535
key: gateway
3636
mount_path: /etc/dask/gateway.yaml
3737
name: dask-gateway-config
3838
persist: true
3939
readonly: true
40-
- content: null
41-
default_mode: null
40+
- # content: null
41+
# default_mode: null
4242
key: gateway
4343
mount_path: /workspace/.config/dask/gateway.yaml
4444
name: dask-gateway-config-ws
@@ -47,7 +47,7 @@ profiles:
4747
- content: 'source /workspace/.bashrc
4848
4949
'
50-
default_mode: null
50+
# default_mode: null
5151
key: bash-login
5252
mount_path: /etc/profile.d/bash-login.sh
5353
name: bash-login
@@ -59,13 +59,13 @@ profiles:
5959
\ eval \"$__conda_setup\"\nelse\n if [ -f \"/opt/conda/etc/profile.d/conda.sh\" ]; then\n . \"/opt/conda/etc/profile.d/conda.sh\"\n else\n export PATH=\"/srv/conda/bin:$PATH\"\
6060
\n fi\nfi\nunset __conda_setup\n\nif [ -f \"/opt/conda/etc/profile.d/mamba.sh\" ]; then\n . \"/opt/conda/etc/profile.d/mamba.sh\"\nfi\n# <<< conda initialize <<<\n\na={{spawner.user.name}}\n\
6161
\nalias aws=\"aws --endpoint-url=http://localstack-jupyter-{{spawner.user.name}}:4566\""
62-
default_mode: null
62+
# default_mode: null
6363
key: bash-rc
6464
mount_path: /workspace/.bashrc
6565
name: bash-rc
6666
persist: true
6767
readonly: true
68-
default_url: null
68+
# default_url: null
6969
definition:
7070
default: false
7171
description: This profile is used to demonstrate the use of an init script
@@ -89,7 +89,7 @@ profiles:
8989
- group-b
9090
id: profile_1
9191
image_pull_secrets:
92-
- data: null
92+
- # data: null
9393
name: eoepca-plus-secret-ro
9494
persist: true
9595
init_containers:
@@ -699,10 +699,10 @@ profiles:
699699
- sleep infinity
700700
image: gcr.io/kaniko-project/executor:debug
701701
name: kaniko
702-
volumeMounts:
703-
- mountPath: /calrissian
702+
volume_mounts:
703+
- mount_path: /calrissian
704704
name: build-context
705-
- mountPath: /kaniko/.docker
705+
- mount_path: /kaniko/.docker
706706
name: kaniko-secret
707707
restartPolicy: Never
708708
volumes:
@@ -753,14 +753,14 @@ profiles:
753753
DASK_GATEWAY: http://traefik-dask-gw-jupyter-{{ spawner.user.name }}-dask-gateway.jupyter-{{ spawner.user.name }}.svc.cluster.local:80
754754
HOME: /workspace
755755
XDG_RUNTIME_DIR: /workspace/.local
756-
role_bindings: null
756+
# role_bindings: null
757757
secret_mounts:
758758
- mount_path: /workspace/.aws
759759
name: aws-credentials-{{ spawner.user.name }}
760-
sub_path: null
760+
# sub_path: null
761761
- mount_path: /workspace/.data-by-name
762762
name: data-by-name
763-
sub_path: null
763+
# sub_path: null
764764
- mount_path: /workspace/.docker/config.json
765765
name: eoepca-plus-secret-ro
766766
sub_path: .dockerconfigjson

0 commit comments

Comments
 (0)