File tree Expand file tree Collapse file tree 6 files changed +34
-36
lines changed Expand file tree Collapse file tree 6 files changed +34
-36
lines changed Original file line number Diff line number Diff line change 1
1
name : Development builds
2
2
on :
3
- workflow_dispatch :
4
- schedule :
5
- - cron : " 0 0 * * * "
3
+ push :
4
+ branches :
5
+ - main
6
6
7
7
jobs :
8
8
build_and_publish :
@@ -22,14 +22,16 @@ jobs:
22
22
curl -sSLf https://github.com/TomWright/dasel/releases/download/v2.0.2/dasel_linux_amd64 \
23
23
-L -o /tmp/dasel && chmod +x /tmp/dasel
24
24
25
+ # Modify pyproject.toml to set the nightly version in the form of
26
+ # x.y.z.postN, where N is the number of commits since the last release
25
27
/tmp/dasel put -f pyproject.toml project.name -v aesara-nightly
28
+ /tmp/dasel put -f pyproject.toml tool.setuptools_scm.version_scheme -v post-release
29
+ /tmp/dasel put -f pyproject.toml tool.setuptools_scm.local_scheme -v no-local-version
26
30
27
31
# Install build prerequisites
28
32
python -m pip install -U pip build
29
33
- name : Build the sdist
30
34
run : python -m build --sdist .
31
- env :
32
- BUILD_AESARA_NIGHTLY : true
33
35
- uses : pypa/gh-action-pypi-publish@release/v1
34
36
with :
35
37
password : ${{ secrets.nightly_pypi_secret }}
Original file line number Diff line number Diff line change @@ -55,3 +55,4 @@ aesara-venv/
55
55
testing-report.html
56
56
coverage.xml
57
57
.coverage. *
58
+ aesara /_version.py
Original file line number Diff line number Diff line change 1
- global-include *.txt
2
- global-include *.c
3
- global-include *.cu
4
- global-include *.cuh
5
- global-include *.cpp
6
- global-include *.h
7
- global-include *.sh
8
- recursive-include doc *
9
1
include bin/aesara-cache
2
+ prune .github
3
+ prune html
4
+ prune tests
5
+ prune dist
6
+ exclude .flake8 .gitignore .pre-commit-config.yaml CODE_OF_CONDUCT.md
7
+ exclude CONTRIBUTING.md Makefile codecov.yml conftest.py environment.yml
8
+ exclude environment-arm.yml readthedocs.yml
Original file line number Diff line number Diff line change
1
+ try :
2
+ from aesara ._version import __version__ as version
3
+ except ImportError :
4
+ raise RuntimeError (
5
+ "Unable to find the version number that is generated when either building or "
6
+ "installing from source. Please make sure that this Aesara has been properly "
7
+ "installed, e.g. with\n \n pip install -e .\n "
8
+ )
9
+
1
10
deprecated_names = [
2
11
"FALLBACK_VERSION" ,
3
12
"full_version" ,
@@ -14,9 +23,8 @@ def __getattr__(name):
14
23
f"{ name } was deprecated when migrating away from versioneer. If you "
15
24
f"need it, please search for or open an issue on GitHub entitled "
16
25
f"'Restore deprecated versioneer variable { name } '." ,
17
- DeprecationWarning ,
18
26
)
19
27
raise AttributeError (f"module { __name__ !r} has no attribute { name !r} " )
20
28
21
29
22
- version = "TODO"
30
+ __all__ = [ "version" ]
Original file line number Diff line number Diff line change 1
1
[build-system ]
2
2
requires = [
3
3
" setuptools>=61.2" ,
4
+ " setuptools_scm[toml]>=6.2" ,
4
5
]
5
6
build-backend = " setuptools.build_meta"
6
7
@@ -57,6 +58,7 @@ dependencies = [
57
58
" typing_extensions" ,
58
59
" setuptools >=48.0.0" ,
59
60
]
61
+ dynamic = [" version" ]
60
62
61
63
[project .readme ]
62
64
file = " DESCRIPTION.txt"
@@ -65,6 +67,11 @@ content-type = "text/x-rst"
65
67
[project .scripts ]
66
68
aesara-cache = " aesara.bin.aesara_cache:main"
67
69
70
+ [tool .setuptools_scm ]
71
+ write_to = " aesara/_version.py"
72
+ # Restrict the default regex to only match tags that start with "rel-".
73
+ tag_regex = ' ^rel-(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'
74
+
68
75
[tool .setuptools ]
69
76
platforms = [
70
77
" Windows" ,
@@ -95,6 +102,7 @@ namespaces = false
95
102
" *.pkl" ,
96
103
" *.h" ,
97
104
" *.cpp" ,
105
+ " *.pyx" ,
98
106
" ChangeLog" ,
99
107
" c_code/*" ,
100
108
]
@@ -112,6 +120,7 @@ namespaces = false
112
120
omit = [
113
121
" tests/*" ,
114
122
" aesara/assert_op.py" ,
123
+ " aesara/version.py" ,
115
124
" aesara/bin/aesara_cache.py" ,
116
125
" aesara/graph/opt.py" ,
117
126
" aesara/graph/opt_utils.py" ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments