forked from deshaw/versioned-hdf5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rever.xsh
49 lines (41 loc) · 1.7 KB
/
rever.xsh
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
from rever.activity import activity
from rever.conda import run_in_conda_env
$PROJECT = 'versioned-hdf5'
@activity
def run_tests():
# Don't use the built-in pytest action because that uses Docker, which is
# overkill and requires installing Docker
with run_in_conda_env(['python=3.8', 'pytest', 'numpy', 'h5py<3',
'ndindex', 'pyflakes', 'pytest-cov',
'scipy', 'pytest-doctestplus', 'pytest-flakes',
'doctr', 'sphinx']):
pyflakes versioned_hdf5/
python -We:invalid -We::SyntaxWarning -m compileall -f -q versioned_hdf5/
pytest versioned_hdf5/
@activity
def build_docs():
with run_in_conda_env(['python=3.8', 'sphinx', 'myst-parser', 'numpy',
'h5py<3', 'ndindex']):
cd docs
make html
cd ..
@activity
def annotated_tag():
# https://github.com/regro/rever/issues/212
git tag -a -m "$GITHUB_REPO $VERSION release" $VERSION
$ACTIVITIES = [
'run_tests',
'build_docs',
'annotated_tag', # Creates a tag for the new version number
'push_tag', # Pushes the tag up to the $TAG_REMOTE
# 'ghrelease', # Creates a Github release entry for the new tag
'pypi', # Sends the package to pypi
'ghpages',
]
$PUSH_TAG_REMOTE = '[email protected]:deshaw/versioned-hdf5.git' # Repo to push tags to
$GITHUB_ORG = 'deshaw' # Github org for Github releases and conda-forge
$GITHUB_REPO = 'versioned-hdf5' # Github repo for Github releases and conda-forge
$GHPAGES_REPO = '[email protected]:deshaw/versioned-hdf5.git'
$GHPAGES_COPY = $GHPAGES_COPY = (
('docs/_build/html', '$GHPAGES_REPO_DIR'),
)