Skip to content

Commit

Permalink
Backport PR jupyterhub#4303: make sure event-schemas are installed
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio authored and meeseeksmachine committed Jan 27, 2023
1 parent 193ebc9 commit 3e608cf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
27 changes: 21 additions & 6 deletions ci/check_installed_data.py
Expand Up @@ -2,19 +2,34 @@
# Check that installed package contains everything we expect


import os
from pathlib import Path

import jupyterhub
from jupyterhub._data import DATA_FILES_PATH

print("Checking jupyterhub._data")
print(f"DATA_FILES_PATH={DATA_FILES_PATH}")
assert os.path.exists(DATA_FILES_PATH), DATA_FILES_PATH
print("Checking jupyterhub._data", end=" ")
print(f"DATA_FILES_PATH={DATA_FILES_PATH}", end=" ")
DATA_FILES_PATH = Path(DATA_FILES_PATH)
assert DATA_FILES_PATH.is_dir(), DATA_FILES_PATH
for subpath in (
"templates/page.html",
"static/css/style.min.css",
"static/components/jquery/dist/jquery.js",
"static/js/admin-react.js",
):
path = os.path.join(DATA_FILES_PATH, subpath)
assert os.path.exists(path), path
path = DATA_FILES_PATH / subpath
assert path.is_file(), path

print("OK")

print("Checking package_data", end=" ")
jupyterhub_path = Path(jupyterhub.__file__).parent.resolve()
for subpath in (
"alembic.ini",
"alembic/versions/833da8570507_rbac.py",
"event-schemas/server-actions/v1.yaml",
):
path = jupyterhub_path / subpath
assert path.is_file(), path

print("OK")
7 changes: 6 additions & 1 deletion setup.py
Expand Up @@ -50,7 +50,12 @@ def get_package_data():
(mostly alembic config)
"""
package_data = {}
package_data['jupyterhub'] = ['alembic.ini', 'alembic/*', 'alembic/versions/*']
package_data['jupyterhub'] = [
'alembic.ini',
'alembic/*',
'alembic/versions/*',
'event-schemas/*/*.yaml',
]
return package_data


Expand Down

0 comments on commit 3e608cf

Please sign in to comment.