papermill

Форк
0
/
tox.ini 
68 строк · 2.1 Кб
1
[tox]
2
skipsdist = true
3
envlist = py{38,39,310,311,312}, dist, manifest, docs, binder
4

5
[gh-actions]
6
python =
7
    3.8: py38
8
    3.9: py39
9
    3.10: py310
10
    3.11: py311, docs
11
    3.12: py312, dist
12

13
# Manifest
14
[testenv:manifest]
15
skip_install = true
16
deps = check-manifest
17
commands = check-manifest
18
ignore =
19
    .readthedocs.yaml
20

21
# Docs
22
[testenv:docs]
23
description = invoke sphinx-build to build the HTML docs
24
deps =
25
    .[docs]
26
extras = docs
27
commands =
28
    sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
29
    python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
30

31
# Binder
32
[testenv:binder]
33
description = ensure /binder/*ipynb are runnable
34
deps =
35
    -r binder/requirements.txt
36
commands = python -c "import glob; import papermill as pm; [pm.execute_notebook(input, '{toxworkdir}/out.ipynb', parameters=\{'binder_dir':'binder'\}) for input in glob.glob('binder/**/*.ipynb')]"
37

38
# Distro
39
[testenv:dist]
40
skip_install = true
41
commands =
42
    python setup.py sdist --dist-dir={distdir} bdist_wheel --dist-dir={distdir}
43
    /bin/bash -c 'python -m pip install -U --force-reinstall {distdir}/papermill*.tar.gz'
44
    /bin/bash -c 'python -m pip install -U --force-reinstall {distdir}/papermill*.whl'
45

46
[testenv]
47
# disable Python's hash randomization for tests that stringify dicts, etc
48
setenv =
49
    PYTHONHASHSEED = 0
50
    AWS_ACCESS_KEY_ID=foobar_key
51
    AWS_SECRET_ACCESS_KEY=foobar_secret
52
passenv = *
53
basepython =
54
    py38: python3.8
55
    py39: python3.9
56
    py310: python3.10
57
    py311: python3.11
58
    py312: python3.12
59
    manifest: python3.11
60
    dist: python3.12
61
    docs: python3.11
62
    binder: python3.11
63
deps = .[dev]
64
# Have to use /bin/bash or the `*` will cause that argument to get quoted by the tox command line...
65
allowlist_externals = /bin/bash
66
# Python 3.12 breaks default pip/setuptools versions ... force an upgrade of these before anything else
67
install_command = /bin/bash ./tox_py_installer.sh {opts} {packages}
68
commands = pytest -v --maxfail=2 --cov=papermill -W always {posargs}
69

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.