Skip to content

Commit 61ad8a1

Browse files
committed
Switch to Pipenv for dependency management
naucse is an application, so it makes sense to use pipenv for nicer management of reproducible environments. Fixes: #276
1 parent 8951d41 commit 61ad8a1

File tree

6 files changed

+629
-47
lines changed

6 files changed

+629
-47
lines changed

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ cache:
66
- $HOME/.cache/pip
77
- .arca/cache
88
install:
9-
- pip install -r test_requirements.txt
10-
- pip install 'arca[docker]>=0.2'
9+
- python -m pip install pipenv --upgrade
10+
- pipenv install --deploy --dev
1111
before_script: # encrypted variables aren't accessible in PRs
1212
- 'if [ -n "$DOCKER_HUB_PASSWORD" ]; then docker login -u "$DOCKER_HUB_USERNAME" -p "$DOCKER_HUB_PASSWORD"; fi'
1313
- 'if [ -z "$DOCKER_HUB_PASSWORD" ]; then export ARCA_BACKEND_REGISTRY_PULL_ONLY=true; fi'
1414
script:
15-
- python -m pytest test_naucse
16-
- python -m naucse list_courses # don't remove, there might be timeouts otherwise, see naucse/cli.py for details
17-
- python -m naucse freeze --verbose
15+
- pipenv graph
16+
- pipenv run test
17+
- pipenv run naucse list_courses # don't remove, there might be timeouts otherwise, see naucse/cli.py for details
18+
- pipenv run naucse freeze --verbose
1819
after_script:
1920
- echo "Suplementary logs:"
2021
- cat .arca/naucse.log
@@ -23,7 +24,7 @@ after_script:
2324
deploy:
2425
provider: script
2526
skip_cleanup: true
26-
script: python -m naucse deploy --push --no-freeze
27+
script: pipenv run naucse deploy --push --no-freeze
2728
on:
2829
branch: master
2930
repo: pyvec/naucse.python.cz

Pipfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[scripts]
7+
naucse = "env PYTHONPATH=. python -m naucse"
8+
serve = "env PYTHONPATH=. python -m naucse serve"
9+
test = "python -m pytest test_naucse/"
10+
11+
[packages]
12+
"ansi2html" = "*"
13+
elsa = ">=0.1.5"
14+
ics = "*"
15+
ipython = "*"
16+
mistune = "*"
17+
nbconvert = "*"
18+
python-dateutil = "*"
19+
traitlets = "*"
20+
arca = {extras = ["docker"], version = ">= 0.3"}
21+
cssutils = "*"
22+
click = "*"
23+
giturlparse = "*"
24+
PyYAML = "*"
25+
Flask = "*"
26+
Frozen-Flask = "*"
27+
"Jinja2" = "*"
28+
jupyter_client = "*"
29+
Pygments = "*"
30+
Werkzeug = "*"
31+
GitPython = "*"
32+
33+
[dev-packages]
34+
pytest = "*"
35+
pytest-env = "*"
36+
pytest-mock = "*"
37+
38+
[requires]
39+
python_version = "3.6"

0 commit comments

Comments
 (0)