Skip to content

Commit 2871c07

Browse files
authored
Merge branch 'master' into help
2 parents d97219b + 37774fc commit 2871c07

File tree

199 files changed

+6492
-2387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+6492
-2387
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- restore_cache:
1616
keys:
1717
- cache-pip
18+
- run: pip install --user -e .
1819
# Install the packages needed to build our documentation
1920
# This will depend on your particular package!
2021
- run: pip install --user -r docs/doc-requirements.txt
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us repair something that is currently broken
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
<!-- Thank you for contributing. These HTML commments will not render in the issue, but you can delete them once you've read them if you prefer! -->
10+
11+
### Bug description
12+
<!-- Use this section to clearly and concisely describe the bug. -->
13+
14+
#### Expected behaviour
15+
<!-- Tell us what you thought would happen. -->
16+
17+
#### Actual behaviour
18+
<!-- Tell us what you actually happens. -->
19+
20+
### How to reproduce
21+
<!-- Use this section to describe the steps that a user would take to experience this bug. -->
22+
23+
1. Go to '...'
24+
2. Click on '....'
25+
3. Scroll down to '....'
26+
4. See error
27+
28+
### Your personal set up
29+
<!-- Tell us a little about the system you're using. You can see the guidelines for setting up and reporting this information at https://repo2docker.readthedocs.io/en/latest/contributing/contributing.html#setting-up-for-local-development. -->
30+
31+
- OS: [e.g. linux, OSX]
32+
- Docker version: `docker version` <!-- Run this command to get your version. -->
33+
- repo2docker version `repo2docker --version` <!-- Run this command to get your version. -->
34+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature or a big change to repo2docker
4+
title: ''
5+
labels: 'needs: discussion'
6+
assignees: ''
7+
8+
---
9+
<!-- Thank you for contributing. These HTML commments will not render in the issue, but you can delete them once you've read them if you prefer! -->
10+
11+
### Proposed change
12+
<!-- Use this section to describe the feature you'd like to be added. -->
13+
14+
15+
### Alternative options
16+
<!-- Use this section to describe alternative options and why you've decided on the proposed feature above. -->
17+
18+
19+
### Who would use this feature?
20+
<!-- Describe the audience for this feature. This information will affect who chooses to work on the feature with you. -->
21+
22+
23+
### How much effort will adding it take?
24+
<!-- Try to estimate how much work adding this feature will require. This information will affect who chooses to work on the feature with you. -->
25+
26+
27+
### Who can do this work?
28+
<!-- What skills are needed? Who can be recruited to add this feature? This information will affect who chooses to work on the feature with you. -->
29+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Support question
3+
about: Ask a question about using repo2docker
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
🚨 Please do **not** open an issue for support questions. Instead please search for similar issues or post on http://discourse.jupyter.org/c/questions. 🚨
11+
12+
More people read the forum than this issue tracker, it is indexed by search engines and easier for others to discover.
13+
14+
For more details: https://discourse.jupyter.org/t/a-proposal-for-jupyterhub-communications/505

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ lib64/
2121
share/
2222
include/
2323

24+
# PyTest remnants
25+
tests/dockerfile/legacy/._binder.Dockerfile
26+
tests/dockerfile/legacy/apt-sources.list
27+
tests/dockerfile/legacy/python3.frozen.yml
28+
tests/dockerfile/legacy/root.frozen.yml
29+
2430
# Docs
2531
generated/
2632
test_file_text.txt

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/ambv/black
3+
rev: 18.9b0
4+
hooks:
5+
- id: black

.travis.yml

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
dist: xenial
12
language: python
23
sudo: required
34
cache: pip
@@ -12,41 +13,50 @@ install:
1213
- pip install -r dev-requirements.txt
1314
- python setup.py bdist_wheel
1415
- pip install dist/*.whl
16+
- pip freeze
1517
script:
16-
# cd into tests so CWD being repo2docker does not hide
17-
# possible issues with MANIFEST.in
18-
- pushd tests;
19-
if [ ${REPO_TYPE} == "r" ] || [ ${REPO_TYPE} == "stencila-r" ] || [ ${REPO_TYPE} == "stencila-py" ]; then
20-
travis_wait 30 pytest --durations 10 --cov repo2docker -v ${REPO_TYPE} || exit 1;
21-
else
22-
travis_retry pytest --durations 10 --cov repo2docker -v ${REPO_TYPE} || exit 1;
23-
fi;
24-
popd;
25-
- pip install -r docs/doc-requirements.txt
26-
- pushd docs;
27-
make html || exit 1;
28-
popd;
18+
- |
19+
# run autoformat
20+
if [[ "$REPO_TYPE" == "lint" ]]; then
21+
pre-commit run --all-files
22+
fi
23+
- |
24+
# run any of the other tests
25+
if [[ "$REPO_TYPE" != "lint" ]]; then
26+
# cd into tests so CWD being repo2docker does not hide
27+
# possible issues with MANIFEST.in
28+
pushd tests;
29+
if [ ${REPO_TYPE} == "r" ] || [ ${REPO_TYPE} == "stencila-r" ] || [ ${REPO_TYPE} == "stencila-py" ]; then
30+
travis_wait 30 pytest --durations 10 --cov repo2docker -v ${REPO_TYPE} || exit 1;
31+
else
32+
travis_retry pytest --durations 10 --cov repo2docker -v ${REPO_TYPE} || exit 1;
33+
fi;
34+
popd;
35+
fi
2936
after_success:
3037
- pip install codecov
3138
- pushd tests && codecov && popd
32-
jobs:
33-
include:
34-
- stage: deploy
35-
script: skip
36-
if: type = push
37-
env:
38-
- REPO_TYPE=
39-
deploy:
40-
provider: script
41-
script: "./travis/travis-script.bash"
42-
on:
43-
tags: true
44-
branch: master
39+
40+
after_failure:
41+
- |
42+
# point to auto-lint-fix
43+
if [[ "$REPO_TYPE" == "lint" ]]; then
44+
echo "You can install pre-commit hooks to automatically run formatting"
45+
echo "on each commit with:"
46+
echo " pre-commit install"
47+
echo "or you can run by hand on staged files with"
48+
echo " pre-commit run"
49+
echo "or after-the-fact on already committed files with"
50+
echo " pre-commit run --all-files"
51+
fi
52+
4553
env:
4654
matrix:
55+
- REPO_TYPE=lint
4756
- REPO_TYPE=unit
4857
- REPO_TYPE=base
4958
- REPO_TYPE=conda
59+
- REPO_TYPE=pipfile
5060
- REPO_TYPE=venv
5161
- REPO_TYPE=stencila-r
5262
- REPO_TYPE=stencila-py
@@ -61,7 +71,7 @@ env:
6171
- secure: KoOOJUp60vtvx/mXzoZWpvWgB6W3rr8I0gDWL2laCTgxo6HsTL+SSOY1l12SBE2jlvFmQqVwPPBfnp5Dudna2RQFF36eO2jUlISBkvK/q/GRmOQbjpAJRtVlan8Z4dlIf4az/oQ9G0ZUEfgUliVvS5MTrEPvKej3znug2zAH1t+H0U6aon1VJeVC+b94jsETGvQ7HHupqrr+DNGrNVHOgAazw7z4j+VtfZyfNaglnrKwYPeUljw3GIOXyFmP81t/cLiDY+IjPPepUYJFQIjCoVpIDm6UR70d4mzWf/LYWONEdh8LhDJZ2UyEtnUT2IPTdhqem1BfCAKUcLedHPk3S4Lcn0jL23os0klHeQvn9JRPEDV/Ib33XGcNEIXZi0pBkluUyhx8JgTz4e+KL8jKcyf9TRX7o/ViH7Ler6viliyMu15yfs2mJKAxzw6GFMtqGzhJ8tUXjguTozfjKTJKjBpkFoYdYbO9GqNkBQo2F7H+8zAmb4D4K0jzfOo8owjYLXJzOMJN5f5pKBqfLdjOtTxve4PrCgy4B8x7GDkW41SuRz2pkVwRDMMJRCetLcbqpEK+8b9Oy/inlxt7/56oS/tvvAtBj2FlLGBPQJKpwyZozIY9XqXWu8u+VbRsSTqbRtdSHzzKyQ25a03dc7KDHmyoDAlzyehe6cHPWp1UqXg=
6272
matrix:
6373
include:
64-
- python: 3.4
74+
- python: 3.5
6575
env:
6676
- REPO_TYPE=venv
6777
deploy:

CONTRIBUTING.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
# Contributing to repo2docker development
22

3-
The repo2docker developer documentation can be found on these pages:
3+
:sparkles: Thank you for thinking about contributing to repo2docker! :sparkles:
4+
5+
(And thank you particularly for coming to read the guidelines! :heart_eyes:)
6+
7+
The repo2docker developer documentation is all rendered on our documentation website: [https://repo2docker.readthedocs.io](https://repo2docker.readthedocs.io).
8+
If you're here, you're probably looking for the [Contributing to repo2docker development](https://repo2docker.readthedocs.io/en/latest/contributing/contributing.html) page.
9+
10+
Please make sure you've read the following sections before opening an issue/pull request:
11+
* [Process for making a contribution](https://repo2docker.readthedocs.io/en/latest/contributing/contributing.html#process-for-making-a-contribution).
12+
* These steps talk you through choosing the right issue template (bug report or feature request) and making a change.
13+
* [Guidelines to getting a Pull Request merged](https://repo2docker.readthedocs.io/en/latest/contributing/contributing.html#guidelines-to-getting-a-pull-request-merged).
14+
* These are tips and tricks to help make your contribution as smooth as possible for you and for the repo2docker maintenance team.
15+
16+
There are a few other pages to highlight:
417

5-
* [Contributing to repo2docker](https://repo2docker.readthedocs.io/en/latest/contributing/contributing.html)
618
* [Our roadmap](https://repo2docker.readthedocs.io/en/latest/contributing/roadmap.html)
19+
* We use the roadmap to develop a shared understanding of the project's vision and direction amongst the community of users, contributors, and maintainers.
20+
This is a great place to get a feel for what the maintainers are thinking about for the short, medium, and long term future of the project.
21+
* [Design of repo2docker](https://repo2docker.readthedocs.io/en/latest/design.html)
22+
* This page explains some of the design principles behind repo2docker.
23+
Its a good place to understand _why_ the team have made the decisions that they have along the way!
24+
* We absolutely encourage discussion around refactoring, updating or extending repo2docker, but please make sure that you've understood this page before opening an issue to discuss the change you'd like to propose.
725
* [Common developer tasks and how-tos](https://repo2docker.readthedocs.io/en/latest/contributing/tasks.html)
26+
* Some notes on running tests, buildpack dependencies, creating a release, updating the changelog and keeping the pip files up to date.

Dockerfile

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
1-
FROM python:3.6.3
1+
ARG ALPINE_VERSION=3.9.4
2+
FROM alpine:${ALPINE_VERSION}
3+
4+
RUN apk add --no-cache git python3 python3-dev
5+
6+
# build wheels in first image
7+
ADD . /tmp/src
8+
RUN cd /tmp/src && git clean -xfd && git status
9+
RUN mkdir /tmp/wheelhouse \
10+
&& cd /tmp/wheelhouse \
11+
&& pip3 install wheel \
12+
&& pip3 wheel --no-cache-dir /tmp/src \
13+
&& ls -l /tmp/wheelhouse
14+
15+
FROM alpine:${ALPINE_VERSION}
16+
17+
# install python, git, bash
18+
RUN apk add --no-cache git git-lfs python3 bash
19+
20+
# install repo2docker
21+
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
22+
RUN pip3 install --no-cache-dir /tmp/wheelhouse/*.whl \
23+
&& pip3 list
24+
25+
# add git-credential helper
26+
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
27+
RUN git config --system credential.helper env
228

329
# Used for testing purpose in ports.py
430
EXPOSE 52000
5-
RUN mkdir /tmp/src
6-
ADD . /tmp/src
7-
RUN pip3 install --no-cache-dir /tmp/src
8-
RUN cp /tmp/src/docker/git-credential-env /usr/local/bin/git-credential-env && \
9-
git config --system credential.helper env

Pipfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
# update these accordingly
44

55
[dev-packages]
6-
pytest="*"
6+
pytest=">=3.6"
77
wheel="*"
88
pytest-cov="*"
99
PyYAML = "*"
1010
recommonmark = "*"
1111
alabaster = "*"
1212
Sphinx = ">=1.4,!=1.5.4"
1313
alabaster_jupyterhub = "*"
14+
sphinxcontrib-autoprogram = "*"
1415

1516
[packages]
1617
repo2docker = {path=".", editable=true}

0 commit comments

Comments
 (0)