Skip to content

Commit

Permalink
Merge pull request #445 from openedx/bmtcril/tidy_operator_dash
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril authored Oct 10, 2023
2 parents 3cefae8 + 770ce38 commit b7ba403
Show file tree
Hide file tree
Showing 14 changed files with 452 additions and 204 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!.gitignore
TODO
__pycache__
*.DS_Store*
*.egg-info/
/build/
/dist/
Expand Down
12 changes: 6 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ click==8.1.7
# tutor
future==0.18.3
# via pyseeyou
google-auth==2.23.2
google-auth==2.23.3
# via kubernetes
idna==3.4
# via requests
Expand All @@ -35,7 +35,7 @@ kubernetes==28.1.0
# via tutor
markupsafe==2.1.3
# via jinja2
mypy==1.5.1
mypy==1.6.0
# via tutor
mypy-extensions==1.0.0
# via mypy
Expand Down Expand Up @@ -63,7 +63,7 @@ pyyaml==6.0.1
# via
# kubernetes
# tutor
regex==2023.8.8
regex==2023.10.3
# via parsimonious
requests==2.31.0
# via
Expand All @@ -85,15 +85,15 @@ toolz==0.12.0
# via pyseeyou
transifex-python==3.4.0
# via -r requirements/base.in
tutor==16.1.1
tutor==16.1.3
# via -r requirements/base.in
typing-extensions==4.8.0
# via
# mypy
# tutor
urllib3==1.26.16
urllib3==1.26.17
# via
# kubernetes
# requests
websocket-client==1.6.3
websocket-client==1.6.4
# via kubernetes
47 changes: 15 additions & 32 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
# make upgrade
#
altgraph==0.17.4
# via pyinstaller
# via
# macholib
# pyinstaller
appdirs==1.4.4
# via
# -r requirements/base.txt
# tutor
astroid==2.15.8
astroid==3.0.0
# via pylint
asttokens==2.4.0
# via
Expand All @@ -29,8 +31,6 @@ certifi==2023.7.22
# -r requirements/base.txt
# kubernetes
# requests
cffi==1.16.0
# via cryptography
charset-normalizer==3.3.0
# via
# -r requirements/base.txt
Expand All @@ -41,8 +41,6 @@ click==8.1.7
# black
# transifex-python
# tutor
cryptography==41.0.4
# via secretstorage
dill==0.3.7
# via pylint
docutils==0.20.1
Expand All @@ -51,7 +49,7 @@ future==0.18.3
# via
# -r requirements/base.txt
# pyseeyou
google-auth==2.23.2
google-auth==2.23.3
# via
# -r requirements/base.txt
# kubernetes
Expand All @@ -64,16 +62,10 @@ importlib-metadata==6.8.0
# keyring
# pyinstaller
# twine
importlib-resources==6.1.0
# via keyring
isort==5.12.0
# via pylint
jaraco-classes==3.3.0
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
jinja2==3.1.2
# via
# -r requirements/base.txt
Expand All @@ -84,8 +76,8 @@ kubernetes==28.1.0
# via
# -r requirements/base.txt
# tutor
lazy-object-proxy==1.9.0
# via astroid
macholib==1.16.3
# via pyinstaller
markdown-it-py==3.0.0
# via rich
markupsafe==2.1.3
Expand All @@ -98,7 +90,7 @@ mdurl==0.1.2
# via markdown-it-py
more-itertools==10.1.0
# via jaraco-classes
mypy==1.5.1
mypy==1.6.0
# via
# -r requirements/base.txt
# tutor
Expand Down Expand Up @@ -126,7 +118,7 @@ pathspec==0.11.2
# via black
pkginfo==1.9.6
# via twine
platformdirs==3.10.0
platformdirs==3.11.0
# via
# black
# pylint
Expand All @@ -139,8 +131,6 @@ pyasn1-modules==0.3.0
# via
# -r requirements/base.txt
# google-auth
pycparser==2.21
# via cffi
pycryptodome==3.19.0
# via
# -r requirements/base.txt
Expand All @@ -153,7 +143,7 @@ pyinstaller==6.0.0
# via -r requirements/dev.in
pyinstaller-hooks-contrib==2023.9
# via pyinstaller
pylint==2.17.7
pylint==3.0.1
# via -r requirements/dev.in
pyseeyou==1.0.2
# via
Expand All @@ -174,7 +164,7 @@ pyyaml==6.0.1
# tutor
readme-renderer==42.0
# via twine
regex==2023.8.8
regex==2023.10.3
# via
# -r requirements/base.txt
# parsimonious
Expand All @@ -200,8 +190,6 @@ rsa==4.9
# via
# -r requirements/base.txt
# google-auth
secretstorage==3.3.3
# via keyring
six==1.16.0
# via
# -r requirements/base.txt
Expand All @@ -222,7 +210,7 @@ toolz==0.12.0
# pyseeyou
transifex-python==3.4.0
# via -r requirements/base.txt
tutor==16.1.1
tutor==16.1.3
# via -r requirements/base.txt
twine==4.0.2
# via -r requirements/dev.in
Expand All @@ -233,24 +221,19 @@ typing-extensions==4.8.0
# black
# mypy
# pylint
# rich
# tutor
urllib3==1.26.16
urllib3==1.26.17
# via
# -r requirements/base.txt
# kubernetes
# requests
# twine
websocket-client==1.6.3
websocket-client==1.6.4
# via
# -r requirements/base.txt
# kubernetes
wrapt==1.15.0
# via astroid
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
4 changes: 2 additions & 2 deletions scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

def get_text_for_translations(root_path):
assets_file = (
root_path + "/env/plugins/aspects/apps/superset/pythonpath/assets.yaml"
root_path + "/env/plugins/aspects/apps/superset/localization/assets.yaml"
)

strings = []
Expand Down Expand Up @@ -96,7 +96,7 @@ def compile_translations(root_path):
tx.fetch_translations()

translation_file = (
"tutoraspects/templates/aspects/apps/superset/pythonpath/locale.yaml"
"tutoraspects/templates/aspects/apps/superset/localization/locale.yaml"
)
file = open(translation_file, "w")

Expand Down
15 changes: 15 additions & 0 deletions tutoraspects/patches/k8s-deployments
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ spec:
name: docker
- mountPath: /app/pythonpath
name: pythonpath
- mountPath: /app/localization
name: localization
- mountPath: /app/security
name: security
volumes:
Expand All @@ -220,6 +222,9 @@ spec:
- name: pythonpath
configMap:
name: superset-pythonpath
- name: localization
configMap:
name: superset-localization
- name: security
configMap:
name: superset-security
Expand Down Expand Up @@ -300,6 +305,8 @@ spec:
name: docker
- mountPath: /app/pythonpath
name: pythonpath
- mountPath: /app/localization
name: localization
- mountPath: /app/security
name: security
volumes:
Expand All @@ -309,6 +316,9 @@ spec:
- name: pythonpath
configMap:
name: superset-pythonpath
- name: localization
configMap:
name: superset-localization
- name: security
configMap:
name: superset-security
Expand Down Expand Up @@ -389,6 +399,8 @@ spec:
name: docker
- mountPath: /app/pythonpath
name: pythonpath
- mountPath: /app/localization
name: localization
- mountPath: /app/security
name: security
volumes:
Expand All @@ -398,6 +410,9 @@ spec:
- name: pythonpath
configMap:
name: superset-pythonpath
- name: localization
configMap:
name: superset-localization
- name: security
configMap:
name: superset-security
Expand Down
10 changes: 10 additions & 0 deletions tutoraspects/patches/k8s-jobs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ spec:
name: docker
- mountPath: /app/pythonpath
name: pythonpath
- mountPath: /app/localization
name: localization
- mountPath: /app/security
name: security
- mountPath: /app/assets
Expand All @@ -227,6 +229,9 @@ spec:
- name: pythonpath
configMap:
name: superset-pythonpath
- name: localization
configMap:
name: superset-localization
- name: security
configMap:
name: superset-security
Expand Down Expand Up @@ -296,6 +301,8 @@ spec:
name: docker
- mountPath: /app/pythonpath
name: pythonpath
- mountPath: /app/localization
name: localization
- mountPath: /app/security
name: security
- mountPath: /app/assets
Expand All @@ -307,6 +314,9 @@ spec:
- name: pythonpath
configMap:
name: superset-pythonpath
- name: localization
configMap:
name: superset-localization
- name: security
configMap:
name: superset-security
Expand Down
7 changes: 7 additions & 0 deletions tutoraspects/patches/kustomization-configmapgenerator
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
labels:
app.kubernetes.io/name: superset

- name: superset-localization
files:{% for file in "aspects/apps/superset/localization"|walk_templates %}
- plugins/{{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: superset

- name: superset-security
files:
- plugins/aspects/apps/superset/security/roles.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

FILE_NAME_ATTRIBUTE = "_file_name"

TRANSLATIONS_FILE_PATH = "/app/pythonpath/locale.yaml"
TRANSLATIONS_FILE_PATH = "/app/localization/locale.yaml"
ASSETS_FILE_PATH = "/app/pythonpath/assets.yaml"

merged_data = {}
Expand Down
1 change: 1 addition & 0 deletions tutoraspects/templates/base-docker-compose-services
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ image: {{ DOCKER_IMAGE_SUPERSET }}
volumes:
- ../../env/plugins/aspects/apps/superset/docker:/app/docker
- ../../env/plugins/aspects/apps/superset/pythonpath:/app/pythonpath
- ../../env/plugins/aspects/apps/superset/localization:/app/localization
- ../../env/plugins/aspects/apps/superset/security:/app/security
- ../../env/plugins/aspects/apps/superset/superset_home:/app/superset_home
- ../../env/plugins/aspects/apps/superset/assets:/app/assets
Expand Down
Loading

0 comments on commit b7ba403

Please sign in to comment.