-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from lsst-sqre/tickets/DM-41528
DM-41528: Reorganize the JupyterHub build
- Loading branch information
Showing
27 changed files
with
362 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Gafaelfawr JupyterHub authenticator | ||
|
||
This is an implementation of the JupyterHub `Authenticator` class that authenticates a user using [Gafaelfawr](https://gafaelfawr.lsst.io), assuming authentication is configured using [Phalanx](https://phalanx.lsst.io). | ||
It is, in theory, generic, and is maintained as a stand-alone Python module, but is normally installed in a Docker image with JupyterHub as part of the Rubin Science Platform JupyterHub build. | ||
|
||
For more details about this architecture, see [SQR-066](https://sqr-066.lsst.io/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[project] | ||
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ | ||
name = "rubin.nublado.authenticator" | ||
description = "JupyterHub Authenticator class supporting Gafaelfawr." | ||
license = { file = "LICENSE" } | ||
readme = "README.md" | ||
keywords = ["rubin", "lsst"] | ||
# https://pypi.org/classifiers/ | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX", | ||
"Typing :: Typed", | ||
] | ||
requires-python = ">=3.10" | ||
dependencies = ["jupyterhub<5", "tornado<7"] | ||
dynamic = ["version"] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
# Testing | ||
"pytest", | ||
"pytest-asyncio", | ||
"pytest-cov", | ||
"pytest-sugar", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://nublado.lsst.io" | ||
Source = "https://github.com/lsst-sqre/nublado" | ||
|
||
[build-system] | ||
requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=6.2"] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
[tool.setuptools_scm] | ||
root = ".." | ||
|
||
[tool.coverage.run] | ||
parallel = true | ||
branch = true | ||
source = ["rubin.nublado.authenticator"] | ||
|
||
[tool.coverage.paths] | ||
source = ["src"] | ||
|
||
[tool.coverage.report] | ||
show_missing = true | ||
exclude_lines = [ | ||
"pragma: no cover", | ||
"def __repr__", | ||
"if self.debug:", | ||
"if settings.DEBUG", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"if 0:", | ||
"if __name__ == .__main__.:", | ||
"if TYPE_CHECKING:" | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
asyncio_mode = "strict" | ||
filterwarnings = [ | ||
# Will probably be fixed with JupyterHub v4. | ||
"ignore:'pipes' is deprecated:DeprecationWarning:jupyterhub.spawner" | ||
] | ||
# The python_files setting is not for test detection (pytest will pick up any | ||
# test files named *_test.py without this setting) but to enable special | ||
# assert processing in any non-test supporting files under tests. We | ||
# conventionally put test support functions under tests.support and may | ||
# sometimes use assert in test fixtures in conftest.py, and pytest only | ||
# enables magical assert processing (showing a full diff on assert failures | ||
# with complex data structures rather than only the assert message) in files | ||
# listed in python_files. | ||
python_files = ["tests/*.py", "tests/*/*.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
"""Gafaelfawr authenticator for JupyterHub.""" | ||
|
||
from ._internals import GafaelfawrAuthenticator | ||
|
||
__all__ = ["GafaelfawrAuthenticator"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# RSP JupyterHub build | ||
|
||
This directory holds the build machinery for the modified JupyterHub build used by the Notebook Aspect of the Rubin Science Platform. | ||
|
||
The RSP JupyterHub is a combination of the standard JupyterHub build plus a custom authenticator and a custom spawner. | ||
The authenticator and spawner are maintained as separate Python library packages with normal floating dependencies. | ||
However, for a reproducible JupyterHub image build, we want to pin all Python dependencies and add some supplemental scripts. | ||
|
||
This directory contains the pinned Python dependencies and the supplemental scripts. | ||
It is used by `Dockerfile.hub` when building the JupyterHub image. | ||
The pinned dependencies here are only used for that image, and may differ from the pinned dependencies for the Nublado controller. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.