-
Notifications
You must be signed in to change notification settings - Fork 9
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 #31 from ftorradeflot/feature_test_env
Feature test environment
- Loading branch information
Showing
25 changed files
with
507 additions
and
160 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: "Build" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build the extension | ||
run: | | ||
set -eux | ||
python -m pip install . | ||
shell: bash | ||
|
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,25 @@ | ||
name: "Post Test" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install check-manifest | ||
run: python -m pip install -U check-manifest | ||
shell: bash | ||
- name: Install Node (for Playwright) | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
- name: Install Playwright | ||
run: npx playwright install | ||
shell: bash | ||
- name: extension checks | ||
run: | | ||
jupyter server extension list 2>&1 | grep -ie "rucio_jupyterlab.*OK" | ||
jupyter labextension list 2>&1 | grep -ie "rucio-jupyterlab.*OK" | ||
shell: bash | ||
- name: Browser check | ||
run: python -m jupyterlab.browser_check | ||
shell: bash | ||
- name: Check Manifest.in | ||
run: check-manifest -v | ||
shell: bash |
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,40 @@ | ||
name: "Setup" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
architecture: 'x64' | ||
- name: Setup pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-3.9-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
pip-3.9- | ||
pip- | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
shell: bash | ||
- name: Setup yarn cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Install Python dependencies | ||
run: python -m pip install -r requirements.txt | ||
shell: bash | ||
- name: Install JS dependencies | ||
run: jlpm | ||
shell: bash | ||
|
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,16 @@ | ||
name: "Test" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Run ESLint | ||
run: jlpm run eslint:check | ||
shell: bash | ||
- name: Run Jest | ||
run: jlpm jest | ||
shell: bash | ||
- name: Run Pytest | ||
run: pytest rucio_jupyterlab/tests/ | ||
shell: bash | ||
- name: Run Pylint | ||
run: pylint --fail-under=8.5 rucio_jupyterlab/ | ||
shell: bash |
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
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 @@ | ||
[submodule "rucio"] | ||
path = docker/test_env/rucio | ||
url = [email protected]:rucio/rucio.git | ||
[submodule "docker/test_env/rucio"] | ||
path = docker/test_env/rucio | ||
url = https://github.com/rucio/rucio.git |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,40 @@ | ||
FROM jupyter/docker-stacks-foundation:python-3.9 | ||
LABEL maintainer="Muhammad Aditya Hilmy <[email protected]>, Francesc Torradeflot <[email protected]>" | ||
|
||
ENV CONTAINER_PURPOSE="test" | ||
ARG NB_USER="jovyan" | ||
ARG NB_UID="1000" | ||
ARG NB_GID="100" | ||
|
||
USER $NB_UID | ||
|
||
RUN mamba install -y -n base -c conda-forge \ | ||
python-gfal2 \ | ||
nodejs=14 \ | ||
pip \ | ||
&& mamba clean --all -f -y | ||
|
||
USER root | ||
|
||
COPY . /rucio-jupyterlab | ||
WORKDIR /rucio-jupyterlab | ||
|
||
RUN fix-permissions /rucio-jupyterlab \ | ||
&& sed -i -e 's/\r$/\n/' /rucio-jupyterlab/docker/container/configure.sh | ||
|
||
COPY docker/container/jupyter_server_config.py $HOME/.jupyter/jupyter_server_config.py | ||
RUN fix-permissions $HOME/.jupyter | ||
RUN mkdir -p /opt/rucio/etc \ | ||
&& chown -R ${NB_UID}:${NB_GID} /opt/rucio/etc | ||
|
||
USER $NB_UID | ||
|
||
RUN /rucio-jupyterlab/docker/container/install_extension.sh | ||
|
||
ENV JUPYTER_ENABLE_LAB=yes | ||
|
||
WORKDIR $HOME | ||
ENTRYPOINT ["/rucio-jupyterlab/docker/container/docker-entrypoint.sh"] | ||
CMD ["/rucio-jupyterlab/docker/container/configure.sh", "/rucio-jupyterlab/docker/container/start_notebook.sh"] | ||
|
||
USER ${NB_UID} |
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,43 @@ | ||
# Rucio jupyterlab extension docker image | ||
|
||
## Building the image | ||
|
||
### Base image: jupyter/docker-stacks-foundation | ||
|
||
We rely on the `docker-stacks-foundation` image from the | ||
[Jupyter Docker Stacks repository](https://github.com/jupyter/docker-stacks/tree/main). | ||
|
||
It is an image containing a minimal conda/mamba environment, we want to use this image to make | ||
sure the extension works in a "clean" environment. | ||
|
||
### Building a custom base image | ||
|
||
In our case we want to set the python version to 3.9, and there's no image publicly available with this version. | ||
|
||
So we clone the [Jupyter Docker Stacks repository](https://github.com/jupyter/docker-stacks/tree/main) | ||
|
||
git clone [email protected]:jupyter/docker-stacks.git jupyter-docker-stacks | ||
cd jupyter-docker-stacks/images/docker-stacks-foundation/ | ||
|
||
Tune the Dockerfile to install python=3.9, and build/tag the image that will be used as the basis | ||
for our `rucio-jupyterlab` image. | ||
|
||
docker build . -t jupyter/docker-stacks-foundation:python-3.9 | ||
|
||
### Building the `rucio-jupyterlab` docker image | ||
|
||
From the root folder of the project, run | ||
|
||
docker build . -t rucio-jupyterlab -f docker/container/Dockerfile | ||
|
||
## Using the image | ||
|
||
### Standalone | ||
|
||
Check the instructions in [the main README](../../README.md) to see how to use the image | ||
standalone, that is without the rest of the Rucio development environment | ||
|
||
### Inside Rucio's development environment | ||
|
||
Check the instructions on [how to use the test environment](../test_env/README.md) to | ||
see how to use this image together with the Rucio development environment. |
Oops, something went wrong.