Skip to content

Commit 09b056e

Browse files
authored
Merge pull request #1442 from rgaiacs/improve-documentation
Minor improvements to documentation
2 parents ac4f14d + 8b3f8cc commit 09b056e

File tree

7 files changed

+48
-32
lines changed

7 files changed

+48
-32
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
from repo2docker.buildpacks.conda import CondaBuildPack
6262

63-
default_python = f"`Python {CondaBuildPack.major_pythons['3']}`"
63+
default_python = f"Python {CondaBuildPack.major_pythons['3']}"
6464
myst_substitutions = {
6565
"default_python": default_python,
6666
"default_python_version": default_python,

docs/source/configuration/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ both kinds.
2121

2222
This specifies a list of Python packages that should be installed in your
2323
environment. Our
24-
[requirements.txt example](https://github.com/binder-examples/requirements/blob/HEAD/requirements.txt)
24+
[example `requirements.txt` file](https://github.com/binder-examples/requirements/blob/HEAD/requirements.txt)
2525
on GitHub shows a typical requirements file.
2626

2727
(setup-py)=

docs/source/configuration/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(config-files)=
22

3-
# Configuration files supported by repo2docker
3+
# Configuration files supported by `repo2docker`
44

55
`repo2docker` looks for configuration files in the repository being built
66
to determine how to build it. In general, `repo2docker` uses the same
@@ -15,7 +15,7 @@ Python and R installation in a repository.
1515
:::
1616

1717
A list of supported configuration files (roughly in the order of build priority)
18-
can be found on this page (and to the right).
18+
can be found in the next sections.
1919

2020
```{toctree}
2121
:maxdepth: 2

docs/source/configuration/research.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
that lets you install any kind of package,
99
including Python, R, and C/C++ packages.
1010
`repo2docker` does not use your `environment.yml` to create and activate a new conda environment.
11-
Rather, it updates a base conda environment [defined here](https://github.com/jupyterhub/repo2docker/blob/HEAD/repo2docker/buildpacks/conda/environment.yml) with the packages listed in your `environment.yml`.
11+
Rather, it updates a [pre-defined base conda environment](https://github.com/jupyterhub/repo2docker/blob/HEAD/repo2docker/buildpacks/conda/environment.yml) with the packages listed in your `environment.yml`.
1212
This means that the environment will always have the same default name, not the name
1313
specified in your `environment.yml`.
1414

1515
:::{note}
16-
You can install files from pip in your `environment.yml` as well.
17-
For example, see the [binder-examples environment.yml](https://github.com/binder-examples/python-conda_pip/blob/HEAD/environment.yml) file. See [the `conda` environment management instructions](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually) for more information.
16+
You can install files from [PyPI](https://pypi.org/) in your `environment.yml` as well.
17+
For example, see the [example `environment.yml` file](https://github.com/binder-examples/python-conda_pip/blob/HEAD/environment.yml) file. See [the `conda` environment management instructions](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually) for more information.
1818
:::
1919

2020
You can also specify which Python version to install in your built environment with `environment.yml`.
2121
By default, `repo2docker` installs {{ default_python }} with your `environment.yml` unless you include the version of Python in the `environment.yml` of your Git repository.
22-
`conda` should support all versions of Python, though `repo2docker` support is best with `Python 3.7-3.11`.
22+
`conda` should support all versions of Python, though `repo2docker` support is best with Python 3.7-3.11.
2323

2424
:::{warning}
2525
If you include a Python version in a `runtime.txt` file in addition to your
@@ -28,7 +28,7 @@ If you include a Python version in a `runtime.txt` file in addition to your
2828

2929
(install-r)=
3030

31-
## `install.R` - Install packages with R/RStudio
31+
## `install.R` - Install R packages
3232

3333
This is used to install R libraries pinned to a specific snapshot on
3434
[Posit Package Manager](https://packagemanager.posit.co/).
@@ -38,7 +38,7 @@ To set the date of the snapshot, or to specify a specific version of R, add a [r
3838

3939
(description)=
4040

41-
## `DESCRIPTION` - Install an R package
41+
## `DESCRIPTION` - Install as an R package
4242

4343
To install your repository like an R package, you may include a `DESCRIPTION` file.
4444
`repo2docker` installs the package and dependencies from the `DESCRIPTION` by running `devtools::install_local(getwd())`.

docs/source/configuration/system.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22

33
(apt-txt)=
44

5-
## `apt.txt` - Install packages with apt-get
5+
## `apt.txt` - Install packages with `apt-get`
66

7-
A list of Debian packages that should be installed. The base image used is usually the latest released
8-
version of Ubuntu.
7+
A list of packages in the [`.deb`](<https://en.wikipedia.org/wiki/Deb_(file_format)>) format that should be installed. The `.deb` files are downloaded from the server configured in the Docker base image.
8+
9+
```{note}
10+
If a `Dockerfile` is not used to change the Docker base image, the base image is [Ubuntu](https://ubuntu.com/) [22.04 LTS (Jammy Jellyfish)](https://releases.ubuntu.com/jammy/). All `.deb` files availables are listed in [Ubuntu Packages](https://packages.ubuntu.com/jammy/).
11+
```
912

1013
We use `apt.txt`, for example, to install LaTeX in our
11-
[example apt.txt for LaTeX](https://github.com/binder-examples/latex/blob/HEAD/apt.txt).
14+
[example `apt.txt` file for LaTeX](https://github.com/binder-examples/latex/blob/HEAD/apt.txt).
1215

1316
(runtime-txt)=
1417

1518
## `runtime.txt` - Specifying runtimes
1619

1720
Sometimes you want to specify the version of the runtime (e.g. the version of Python or R), but the environment specification format will not let you specify this information (e.g. `requirements.txt` or `install.R`).
18-
For these cases, we have a special file, `runtime.txt`.
21+
For these cases, we have a special `runtime.txt` file.
1922

2023
:::{warning}
2124
`runtime.txt` is only supported when used with environment specifications
@@ -25,23 +28,34 @@ that do not already support specifying the runtime
2528

2629
### Set the Python version
2730

28-
Add the line `python-x.y` in `runtime.txt` to run the repository with Python version x.y.
31+
Add the line `python-x.y` in `runtime.txt` to run the repository with Python version `x.y`.
2932
See our [Python2 example repository](https://github.com/binder-examples/python2_runtime/blob/HEAD/runtime.txt).
3033

3134
### Set the R version
3235

33-
Add the line `r-<RVERSION>-<YYYY>-<MM>-<DD>` in `runtime.txt` to run the repository with R version `RVERSION` and libraries from a `YYYY-MM-DD` snapshot of the [Posit Package Manager](https://packagemanager.posit.co/client/#/repos/2/overview).
36+
Add the line `r-x.y-YYYY-MM-DD` in `runtime.txt` to run the repository with R version `x.y` and libraries from a `YYYY-MM-DD` snapshot of the [Posit Package Manager](https://packagemanager.posit.co/client/#/repos/2/overview).
37+
38+
The version of R, i.e. `x.y`, can be set to
39+
40+
- `4.4`
41+
- `4.3`
42+
- `4.2`
43+
- `4.1`
44+
- `4.0`
45+
- `3.6`
46+
- `3.5`
47+
- `3.4`
48+
- `3.3`
3449

35-
`RVERSION` can be set to 3.4, 3.5, 3.6, or to patch releases for the 3.5 and 3.6 series.
3650
If you do not specify a version, the latest release will be used.
3751

3852
See our [R example repository](https://github.com/binder-examples/r/blob/HEAD/runtime.txt).
3953

4054
(default-nix)=
4155

42-
## `default.nix` - the nix package manager
56+
## `default.nix` - the `nix` package manager
4357

44-
Specify packages to be installed by the [nix package manager](https://github.com/NixOS/nixpkgs).
58+
Specify packages to be installed by the [`nix` package manager](https://github.com/NixOS/nixpkgs).
4559
When you use this config file all other configuration files (like `requirements.txt`)
4660
that specify packages are ignored. When using `nix` you have to specify all
4761
packages and dependencies explicitly, including the Jupyter notebook package that
@@ -54,7 +68,7 @@ a `nix` expression written in a `default.nix` file. Make sure to
5468
to produce a reproducible environment.
5569

5670
To see an example repository visit
57-
[nix binder example](https://github.com/binder-examples/nix).
71+
[nix example repository](https://github.com/binder-examples/nix).
5872

5973
(dockerfile)=
6074

docs/source/use/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# User guide
22

3-
Short, actionable guides that cover specific topics with repo2docker.
3+
Short, actionable guides that cover specific topics with `repo2docker`.
44
Select from the pages listed below to get started.
55

6-
Information about configuring your repository to work with repo2docker,
6+
Information about configuring your repository to work with `repo2docker`,
77
and controlling elements of the built environment using configuration files.
88

99
```{toctree}

docs/source/use/pathways.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ This is not the same thing as forking the repository for the community image, mo
4141
:::{grid-item-card} Benefits
4242

4343
- Only need to maintain the changes you make
44-
- Update the FROM tag to keep up with upstream changes
45-
- You must manage a GH repo
46-
- Works well with mybinder.org
44+
- Update the `FROM` tag to keep up with upstream changes
45+
- You must manage a Git repository
46+
- Works well with [mybinder.org]
4747
:::
4848
:::{grid-item-card} Drawbacks
4949
- Need to understand how upstream image is built so you can customize
5050
- Documentation for this method currently sucks (but can be fixed!)
5151
- Removing existing packages might break things
52-
- You must manage a GH repo
52+
- You must manage a Git repository
5353
:::
5454
::::
5555

5656
See [](./extend-community-image.md) for a how-to guide.
5757

58-
## 3. Use repo2docker to build your environment image
58+
## 3. Use `repo2docker` to build your environment image
5959

6060
If your needs differ far enough from the community-maintained images that you find, you can use `repo2docker` to build your environment image using [supported configuration files](#config-files).
6161
To learn how to do this, follow the [getting started with repo2docker guide](../start.md) and look at the [list of supported configuration files](#config-files).
@@ -64,7 +64,7 @@ Check out the other sections under "Image building basics" for more useful how-t
6464
::::{grid} 2
6565
:::{grid-item-card} Benefits
6666

67-
- Works well with mybinder.org
67+
- Works well with [mybinder.org]
6868
- No need to learn Dockerfile syntax
6969
- Use language specific, well understood file formats
7070
- Only get whatever packages you want
@@ -79,7 +79,7 @@ Check out the other sections under "Image building basics" for more useful how-t
7979

8080
## 4. Use a full fledged custom Dockerfile
8181

82-
If you need full control over the entire computational environment, you can always create your own `Dockerfile` from scratch, and repo2docker will build an image out of it.
82+
If you need full control over the entire computational environment, you can always create your own `Dockerfile` from scratch, and `repo2docker` will build an image out of it.
8383

8484
This is for advanced users only that know what they're doing - full guidance on how to use `Dockerfiles` is out of scope for this tutorial.
8585

@@ -90,13 +90,15 @@ This is for advanced users only that know what they're doing - full guidance on
9090

9191
- Get exactly what you want
9292
- Can be optimized for small image size & fast build times
93-
- Lots of existing documentation in the SRE world on how to use these
93+
- Lots of existing documentation in the site reliability engineer world on how to use these
9494

9595
:::
9696
:::{grid-item-card} Drawbacks
9797

9898
- Requires a lot of knowledge for ongoing maintenance
9999
- Might have to solve problems yourself that were solved in upstream images / repo2docker
100-
- Need to adapt existing documentation from the SRE use case to interactive computing use case
100+
- Need to adapt existing documentation from the site reliability engineer use case to interactive computing use case
101101
:::
102102
::::
103+
104+
[mybinder.org]: https://mybinder.org

0 commit comments

Comments
 (0)