kopia lustrzana https://github.com/jupyterhub/repo2docker
ci: adjust to and rename extra-args.yaml to test-extra-args.yaml
I misunderstood extra-args.yaml to be a file that was recognized by repo2docker's CLI, but in reality it was just a file recognized by the repo2docker test suite. Following that, I renamed this testing specific file to test-extra-args.yaml to help others avoid making that mistake and added comments to clarify that. This commit also gathers the conda buildpacks separate readme files into a single readme file.pull/1188/head
rodzic
a6af244605
commit
42bb1b384a
|
@ -0,0 +1,57 @@
|
|||
# Overview of tests for the conda buildpack
|
||||
|
||||
## py2
|
||||
|
||||
- Test setup of a Python 2 environment by declaring `python=2` in
|
||||
`environment.yml`.
|
||||
|
||||
## py35-binder-dir
|
||||
|
||||
- Test setup of a Python 3.5 environment by declaring `python=3.5` in
|
||||
`environment.yml`.
|
||||
|
||||
The reasons for testing 3.5 specifically is that it is the oldest version of
|
||||
Python 3 supported by repo2docker's conda buildpack. See
|
||||
`repo2docker/buildpacks/conda` for details.
|
||||
|
||||
- Test use of a `.binder` directory, where files outside it shouldn't be
|
||||
considered. See [this documentation](https://repo2docker.readthedocs.io/en/latest/usage.html#where-to-put-configuration-files)
|
||||
for details.
|
||||
|
||||
## py310-requirements-file
|
||||
|
||||
- Test setup of a Python 3.10 environment by declaring `python=3.10` in
|
||||
`environment.yml`.
|
||||
|
||||
The reasons for testing 3.10 specifically is that it is the newest version of
|
||||
Python 3 supported by repo2docker's conda buildpack. See
|
||||
`repo2docker/buildpacks/conda` for details.
|
||||
|
||||
- Test use of a `requirements.txt` file, where an `environment.yml` file should
|
||||
take precedence and the `requirements.txt` should be ignored.
|
||||
|
||||
## r-postbuild-file
|
||||
|
||||
- Test setup of the default Python environment by omitting `python` from
|
||||
`environment.yml` file.
|
||||
|
||||
- Test setup of the default R environment by specifying `r-base` in
|
||||
`environment.yml`.
|
||||
|
||||
- Test use of a `postBuild` file. See [this documentation](https://repo2docker.readthedocs.io/en/latest/config_files.html#postbuild-run-code-after-installing-the-environment)
|
||||
for details.
|
||||
|
||||
## r3.6-target-repo-dir-flag
|
||||
|
||||
- Test setup of a R 3.6 environment by specifying `r-base=3.6` in
|
||||
`environment.yml`.
|
||||
|
||||
- Test use of repo2docker with the `--target-repo-dir` flag. See [this documentation](https://repo2docker.readthedocs.io/en/latest/usage.html#cmdoption-jupyter-repo2docker-target-repo-dir)
|
||||
for details.
|
||||
|
||||
`--target-repo-dir` is meant to support custom paths where repositories can be
|
||||
copied to besides `${HOME}`.
|
||||
|
||||
This test makes use of the `test-extra-args.yaml` file to influence additional
|
||||
arguments passed to `repo2docker` during the test. In this test, specify
|
||||
`--target-repo-dir=/srv/repo`.
|
|
@ -1,4 +0,0 @@
|
|||
Python 2
|
||||
--------
|
||||
|
||||
Test setup of a Python 2 environment.
|
|
@ -1,17 +0,0 @@
|
|||
Python 3.10 (latest), and an ignored requirements file
|
||||
------------------------------------------------------
|
||||
|
||||
The reasons for testing 3.10 specifically is that it is the latest version of
|
||||
Python 3 supported by repo2docker's conda buildpack. See
|
||||
``repo2docker/buildpacks/conda`` for details.
|
||||
|
||||
An ``environment.yml`` file takes precedence over ``requirements.txt``.
|
||||
To install Python packages into a conda environment with pip, use the
|
||||
``pip`` key in ``environment.yml``:
|
||||
|
||||
.. sourcecode:: yaml
|
||||
|
||||
dependencies:
|
||||
- numpy
|
||||
- pip:
|
||||
- tornado
|
|
@ -1,5 +1,6 @@
|
|||
dependencies:
|
||||
- python=3.10
|
||||
- numpy
|
||||
- pip
|
||||
- pip:
|
||||
- simplejson
|
||||
- simplejson
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
Python 3.5, and a dedicated binder folder
|
||||
-----------------------------------------
|
||||
|
||||
Test setup of Python 3.5 and the use of a dedicated binder folder that should
|
||||
make files in the root directory be ignored.
|
||||
|
||||
The reasons for testing 3.5 specifically is that it is the oldest version of
|
||||
Python 3 supported by repo2docker's conda buildpack. See
|
||||
``repo2docker/buildpacks/conda`` for details.
|
|
@ -1,6 +0,0 @@
|
|||
Default R, default Python, and a postBuild file
|
||||
-----------------------------------------------
|
||||
|
||||
We test the default R and Python version set by repo2docker as used when an
|
||||
environment.yml file is provided without a ``python`` or ``r-base`` dependency
|
||||
pinned, and the use of a ``postBuild`` file.
|
|
@ -1,7 +0,0 @@
|
|||
R 3.6, and an extra-args.yaml file
|
||||
----------------------------------
|
||||
|
||||
We want to support custom paths where repositories can be copied to, instead of
|
||||
${HOME}. The `extra-args.yaml` file in each dir can contain a list of arguments
|
||||
that are passed to repo2docker during the test. We copy this repo to /srv/repo
|
||||
instead of ${HOME}
|
|
@ -1,2 +0,0 @@
|
|||
- --target-repo-dir
|
||||
- /srv/repo
|
|
@ -0,0 +1,4 @@
|
|||
# This file is respected by repo2docker's test suite, but not repo2docker
|
||||
# itself. It is used solely to help us test command line flags.
|
||||
#
|
||||
- --target-repo-dir=/srv/repo
|
|
@ -5,7 +5,7 @@ jupyter nbextension list 2>&1 | grep jupyter_server_proxy
|
|||
|
||||
R -e "library('digest')"
|
||||
|
||||
# Fail if version is not 3.6
|
||||
# Fail if R version is not 3.6
|
||||
R --version
|
||||
R -e 'if (!(version$major == "3" && as.double(version$minor) >= 6 && as.double(version$minor) < 7)) quit("yes", 1)'
|
||||
|
|
@ -198,7 +198,7 @@ class LocalRepo(pytest.File):
|
|||
args = ["--appendix", 'RUN echo "appendix" > /tmp/appendix']
|
||||
# If there's an extra-args.yaml file in a test dir, assume it contains
|
||||
# a yaml list with extra arguments to be passed to repo2docker
|
||||
extra_args_path = os.path.join(self.fspath.dirname, "extra-args.yaml")
|
||||
extra_args_path = os.path.join(self.fspath.dirname, "test-extra-args.yaml")
|
||||
if os.path.exists(extra_args_path):
|
||||
with open(extra_args_path) as f:
|
||||
extra_args = yaml.safe_load(f)
|
||||
|
|
Ładowanie…
Reference in New Issue