File: tox.ini

package info (click to toggle)
sncosmo 2.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,628 kB
  • sloc: python: 7,278; cpp: 184; makefile: 130; sh: 1
file content (66 lines) | stat: -rw-r--r-- 1,396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[tox]
envlist =
    py{38,39,310,311,312}{,-alldeps}{,-oldestdeps}{,-cov}
    builtins
    codestyle
    build_docs
isolated_build = true


[testenv]
description = Run tests

# Run the tests in a temporary directory to make sure that we don't import
# sncosmo from the source tree
changedir = {envtmpdir}

# Older versions of astropy need the home directory specified.
passenv = HOME

# The following indicates which extras_require from setup.cfg will be installed
extras =
    test
    alldeps: all
    oldestdeps: oldestdeps
    cov: test_coverage

commands =
    pip freeze
    !cov: pytest --pyargs sncosmo
    cov: pytest --pyargs sncosmo --cov sncosmo --cov-config={toxinidir}/setup.cfg
    cov: coverage xml -o {toxinidir}/coverage.xml


[testenv:builtins]
description = Test builtins
changedir = {envtmpdir}

# Set the HOME directory to a temporary directory to force sncosmo to
# redownload all of the builtins.
setenv =
    SNCOSMO_DATA_DIR = {envtmpdir}
extras = test
commands =
    pip freeze
    pytest --pyargs sncosmo.tests.test_download_builtins


[testenv:codestyle]
description = Check code style
changedir = {toxinidir}
skip_install = true
allowlist_externals = ./checkstyle
deps = pycodestyle
commands =
    ./checkstyle


[testenv:build_docs]
description = Build the docs
changedir = docs
extras = docs
allowlist_externals = 
    make
commands =
    pip freeze
    make html