Skip to content

Commit

Permalink
run auto formatters
Browse files Browse the repository at this point in the history
cleanup website
  • Loading branch information
blink1073 committed Apr 5, 2022
1 parent dfeac2a commit df811d0
Show file tree
Hide file tree
Showing 160 changed files with 5,268 additions and 3,858 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Help us improve the Jupyter Enterprise Gateway project by reporting issues
or asking questions.
or asking questions.

## Description

## Screenshots / Logs

If applicable, add screenshots and/or logs to help explain your problem.
To generate better logs, please run the gateway with `--debug` command line parameter.

Expand All @@ -12,4 +13,3 @@ To generate better logs, please run the gateway with `--debug` command line para
- Enterprise Gateway Version [e.g. 1.x, 2.x, ...]
- Platform: [e.g. YARN, Kubernetes ...]
- Others [e.g. Jupyter Server 5.7, JupyterHub 1.0, etc]

110 changes: 55 additions & 55 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,62 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
clean: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Display dependency info
run: |
python --version
pip --version
conda --version
- name: Add SBT launcher
run: |
mkdir -p $HOME/.sbt/launchers/1.3.12
curl -L -o $HOME/.sbt/launchers/1.3.12/sbt-launch.jar https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.3.12/sbt-launch.jar
- name: Install Python dependencies
run: |
python -m pip install --upgrade setuptools pip websocket-client flake8 pytest pytest-tornasync ipykernel coverage codecov
- name: Build Jupyter Enterprise Gateway conda env
run: |
SA="source $CONDA_HOME/bin/activate" make env
- name: Build and install Jupyter Enterprise Gateway
uses: nick-invision/retry@v1.0.0
with:
timeout_minutes: 10
max_attempts: 2
command: |
SA="source $CONDA_HOME/bin/activate" make clean dist enterprise-gateway-demo
python -m pip install --upgrade dist/*.whl
- name: Log current Python dependencies version
run: |
pip freeze
- name: Log current Enterprise Gateway version
run: |
jupyter enterprisegateway --help
- name: Run tests
uses: nick-invision/retry@v1.0.0
with:
timeout_minutes: 3
max_attempts: 1
command: |
pytest -v -s enterprise_gateway/tests
- name: Run integration tests
run: |
SA="source $CONDA_HOME/bin/activate" make itest-yarn
- name: Collect logs
run: |
python --version
pip --version
pip list
docker logs itest-yarn
- name: Checkout
uses: actions/checkout@v2
with:
clean: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"
- name: Display dependency info
run: |
python --version
pip --version
conda --version
- name: Add SBT launcher
run: |
mkdir -p $HOME/.sbt/launchers/1.3.12
curl -L -o $HOME/.sbt/launchers/1.3.12/sbt-launch.jar https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.3.12/sbt-launch.jar
- name: Install Python dependencies
run: |
python -m pip install --upgrade setuptools pip websocket-client flake8 pytest pytest-tornasync ipykernel coverage codecov
- name: Build Jupyter Enterprise Gateway conda env
run: |
SA="source $CONDA_HOME/bin/activate" make env
- name: Build and install Jupyter Enterprise Gateway
uses: nick-invision/retry@v1.0.0
with:
timeout_minutes: 10
max_attempts: 2
command: |
SA="source $CONDA_HOME/bin/activate" make clean dist enterprise-gateway-demo
python -m pip install --upgrade dist/*.whl
- name: Log current Python dependencies version
run: |
pip freeze
- name: Log current Enterprise Gateway version
run: |
jupyter enterprisegateway --help
- name: Run tests
uses: nick-invision/retry@v1.0.0
with:
timeout_minutes: 3
max_attempts: 1
command: |
pytest -v -s enterprise_gateway/tests
- name: Run integration tests
run: |
SA="source $CONDA_HOME/bin/activate" make itest-yarn
- name: Collect logs
run: |
python --version
pip --version
pip list
docker logs itest-yarn
link_check:
runs-on: ubuntu-latest
Expand Down
67 changes: 36 additions & 31 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,47 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
# - id: end-of-file-fixer
# - id: check-case-conflict
# - id: check-executables-have-shebangs
# - id: requirements-txt-fixer
# - id: check-added-large-files
# - id: check-case-conflict
# - id: check-toml
# - id: check-yaml
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
- id: check-added-large-files
- id: check-case-conflict
- id: check-toml
- id: check-yaml
exclude: etc/kubernetes/.*.yaml
- id: debug-statements
# - id: forbid-new-submodules
# - id: check-builtin-literals
# - id: trailing-whitespace
- id: forbid-new-submodules
- id: trailing-whitespace

# - repo: https://github.com/psf/black
# rev: 22.3.0
# hooks:
# - id: black
# args: ["--line-length", "100"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: ["--line-length", "100"]

# - repo: https://github.com/PyCQA/isort
# rev: 5.10.1
# hooks:
# - id: isort
# files: \.py$
# args: [--profile=black]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
files: \.py$
args: [--profile=black]

# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v2.6.1
# hooks:
# - id: prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.1
hooks:
- id: prettier
exclude: |
(?x)^(
etc/kubernetes/.*.yaml|
website/.*
)$
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.1
# hooks:
# - id: pyupgrade
# args: [--py37-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/PyCQA/doc8
rev: 0.11.1
Expand Down
6 changes: 3 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Expand All @@ -48,8 +48,8 @@ Jupyter uses a shared copyright model. Each contributor maintains copyright
over their contributions to Jupyter. But, it is important to note that these
contributions are typically only changes to the repositories. Thus, the Jupyter
source code, in its entirety is not the copyright of any single person or
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
institution. Instead, it is the collective copyright of the entire Jupyter
Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the
change to one of the Jupyter repositories.
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ exclude *.yaml

prune enterprise_gateway/tests
prune enterprise_gateway/itests

41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ including Apache Spark managed by YARN, IBM Spectrum Conductor, Kubernetes or Do

It provides out of the box support for the following kernels:

* Python using IPython kernel
* R using IRkernel
* Scala using Apache Toree kernel
- Python using IPython kernel
- R using IRkernel
- Scala using Apache Toree kernel

Full Documentation for Jupyter Enterprise Gateway can be found [here](https://jupyter-enterprise-gateway.readthedocs.io/en/latest)

Expand All @@ -28,24 +28,24 @@ you should use [JupyterHub](https://github.com/jupyterhub/jupyterhub).

## Technical Overview

Jupyter Enterprise Gateway is a web server that provides headless access to Jupyter kernels within
an enterprise. Inspired by Jupyter Kernel Gateway, Jupyter Enterprise Gateway provides feature parity with Kernel Gateway's [jupyter-websocket mode](https://jupyter-kernel-gateway.readthedocs.io/en/latest/websocket-mode.html) in addition to the following:
* Adds support for remote kernels hosted throughout the enterprise where kernels can be launched in
the following ways:
* Local to the Enterprise Gateway server (today's Kernel Gateway behavior)
* On specific nodes of the cluster utilizing a round-robin algorithm
* On nodes identified by an associated resource manager
* Provides support for Apache Spark managed by YARN, IBM Spectrum Conductor, Kubernetes or Docker Swarm out of the box. Others can be configured via Enterprise Gateway's extensible framework.
* Secure communication from the client, through the Enterprise Gateway server, to the kernels
* Multi-tenant capabilities
* Persistent kernel sessions
* Ability to associate profiles consisting of configuration settings to a kernel for a given user (see [Project Roadmap](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/roadmap.html))
Jupyter Enterprise Gateway is a web server that provides headless access to Jupyter kernels within
an enterprise. Inspired by Jupyter Kernel Gateway, Jupyter Enterprise Gateway provides feature parity with Kernel Gateway's [jupyter-websocket mode](https://jupyter-kernel-gateway.readthedocs.io/en/latest/websocket-mode.html) in addition to the following:

- Adds support for remote kernels hosted throughout the enterprise where kernels can be launched in
the following ways:
_ Local to the Enterprise Gateway server (today's Kernel Gateway behavior)
_ On specific nodes of the cluster utilizing a round-robin algorithm \* On nodes identified by an associated resource manager
- Provides support for Apache Spark managed by YARN, IBM Spectrum Conductor, Kubernetes or Docker Swarm out of the box. Others can be configured via Enterprise Gateway's extensible framework.
- Secure communication from the client, through the Enterprise Gateway server, to the kernels
- Multi-tenant capabilities
- Persistent kernel sessions
- Ability to associate profiles consisting of configuration settings to a kernel for a given user (see [Project Roadmap](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/roadmap.html))

![Deployment Diagram](https://github.com/jupyter-server/enterprise_gateway/blob/master/docs/source/images/deployment.png?raw=true)

## Installation

Detailed installation instructions are located in the
Detailed installation instructions are located in the
[Users Guide](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/users/index.html)
of the project docs. Here's a quick start using `pip`:

Expand All @@ -60,17 +60,16 @@ jupyter enterprisegateway --help-all
jupyter enterprisegateway
```

Please check the [configuration options within the Operators Guide](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/operators/index.html#configuring-enterprise-gateway)
Please check the [configuration options within the Operators Guide](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/operators/index.html#configuring-enterprise-gateway)
for information about the supported options.

## System Architecture

The [System Architecture page](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/system-architecture.html)
The [System Architecture page](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/system-architecture.html)
includes information about Enterprise Gateway's remote kernel, process proxy, and launcher frameworks.

## Contributing

The [Contribution page](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/contrib.html) includes
information about how to contribute to Enterprise Gateway along with our roadmap. While there, you'll want to
The [Contribution page](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/contrib.html) includes
information about how to contribute to Enterprise Gateway along with our roadmap. While there, you'll want to
[set up a development environment](https://jupyter-enterprise-gateway.readthedocs.io/en/latest/contributors/devinstall.html) and check out typical developer tasks.

8 changes: 3 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


def pytest_addoption(parser):
parser.addoption("--host", action="store", default="localhost:8888")
parser.addoption("--username", action="store", default="elyra")
Expand All @@ -9,9 +7,9 @@ def pytest_addoption(parser):
def pytest_generate_tests(metafunc):
# This is called for every test. Only get/set command line arguments
# if the argument is specified in the list of test "fixturenames".
if 'host' in metafunc.fixturenames:
if "host" in metafunc.fixturenames:
metafunc.parametrize("host", [metafunc.config.option.host])
if 'username' in metafunc.fixturenames:
if "username" in metafunc.fixturenames:
metafunc.parametrize("username", [metafunc.config.option.username])
if 'impersonation' in metafunc.fixturenames:
if "impersonation" in metafunc.fixturenames:
metafunc.parametrize("impersonation", [metafunc.config.option.impersonation])
4 changes: 2 additions & 2 deletions docs/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ mistune<1
myst-parser
pydata_sphinx_theme
sphinx
sphinx-markdown-tables
sphinx_book_theme
sphinxcontrib-openapi
sphinxcontrib_github_alt
sphinxemoji
sphinx_book_theme
sphinx-markdown-tables
tornado
4 changes: 2 additions & 2 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body div.sphinxsidebarwrapper p.logo {
text-align: left;
}
text-align: left;
}
Loading

0 comments on commit df811d0

Please sign in to comment.