test.py 1.4 KB
Newer Older
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
#
# allen-s-interval-algebra --- Implementation of the Allen"s interval algebra
# Copyright © 2021 Tanguy Le Carrour <tanguy@bioneland.org>
#
# This file is part of allen-s-interval-algebra.
#
# allen-s-interval-algebra is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# allen-s-interval-algebra is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar.  If not, see <https://www.gnu.org/licenses/>.
#
from invoke import task

from tasks.helpers import title


@task
def syntax(c):
    """Run code syntax analyser."""
    title(syntax.__doc__)
    c.run("flake8 allen_s_interval_algebra tasks", pty=True)


@task
def types(c):
    """Run static type analyser."""
    title(types.__doc__)
    c.run("mypy --strict allen_s_interval_algebra", pty=True)


@task
def specs(c):
    """Run specifications."""
    title(specs.__doc__)
    c.run("mamba --format documentation allen_s_interval_algebra", pty=True)


@task(syntax, types, specs, default=True)
def all(c):
    """Run the test suite."""