Skip to content

Commit 201082f

Browse files
Updates post org transfer
1 parent 48e1c73 commit 201082f

21 files changed

+198
-104
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
aesara_hmc/_version.py export-subst
1+
aehmc/_version.py export-subst

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: numfocus

.github/PULL_REQUEST_TEMPLATE.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
12
**Thank you for opening a PR!**
23

34
Here are a few important guidelines and requirements to check before your PR can be merged:
45
+ [ ] There is an informative high-level description of the changes.
56
+ [ ] The description and/or commit message(s) references the relevant GitHub issue(s).
7+
+ [ ] [`pre-commit`](https://pre-commit.com/#installation) is installed and [set up](https://pre-commit.com/#3-install-the-git-hook-scripts).
68
+ [ ] The commit messages follow [these guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
7-
+ [ ] The commits correspond to [relevant logical changes](https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes).
9+
+ [ ] The commits correspond to [_relevant logical changes_](https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes), and there are **no commits that fix changes introduced by other commits in the same branch/BR**. If your commit description starts with "Fix...", then you're probably making this mistake.
810
+ [ ] There are tests covering the changes introduced in the PR.
911

1012
Don't worry, your PR doesn't need to be in perfect order to submit it. As development progresses and/or reviewers request changes, you can always [rewrite the history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_rewriting_history) of your feature/PR branches.

.github/SECURITY.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
To report a security vulnerability to Aesara, please go to
2+
https://tidelift.com/security and see the instructions there.
3+

.github/workflows/pypi.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@ name: PyPI
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
- auto-release
77
pull_request:
8-
branches: [master]
8+
branches: [main]
99
release:
1010
types: [published]
1111

1212
jobs:
1313
build:
14-
# Disabled
15-
if: false
1614
name: Build source distribution
1715
runs-on: ubuntu-latest
1816
steps:
@@ -25,12 +23,13 @@ jobs:
2523
- name: Build the sdist
2624
run: |
2725
python setup.py sdist
28-
- name: Check that the sdist build installs
26+
- name: Check the sdist installs and imports
2927
run: |
3028
mkdir -p test-sdist
3129
cd test-sdist
3230
python -m venv venv-sdist
33-
venv-sdist/bin/python -m pip install ../dist/aesara-hmc-*
31+
venv-sdist/bin/python -m pip install ../dist/aehmc-*.tar.gz
32+
venv-sdist/bin/python -c "import aehmc;print(aehmc.__version__)"
3433
- uses: actions/upload-artifact@v2
3534
with:
3635
name: artifact
@@ -40,9 +39,7 @@ jobs:
4039
name: Upload to PyPI on release
4140
needs: [build]
4241
runs-on: ubuntu-latest
43-
# Disabled
44-
if: false
45-
# if: github.event_name == 'release' && github.event.action == 'published'
42+
if: github.event_name == 'release' && github.event.action == 'published'
4643
steps:
4744
- uses: actions/download-artifact@v2
4845
with:

.github/workflows/python-tests.yml

-72
This file was deleted.

.github/workflows/test.yml

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- checks
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
changes:
14+
name: "Check for changes"
15+
runs-on: ubuntu-latest
16+
outputs:
17+
changes: ${{ steps.changes.outputs.src }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
- uses: dorny/paths-filter@v2
23+
id: changes
24+
with:
25+
filters: |
26+
python: &python
27+
- 'aehmc/**/*.py'
28+
- 'tests/**/*.py'
29+
- 'aehmc/**/*.pyx'
30+
- 'tests/**/*.pyx'
31+
- '*.py'
32+
src:
33+
- *python
34+
- 'aehmc/**/*.c'
35+
- 'tests/**/*.c'
36+
- 'aehmc/**/*.h'
37+
- 'tests/**/*.h'
38+
- '.github/**/*.yml'
39+
- 'setup.cfg'
40+
- 'requirements.txt'
41+
- '.coveragerc'
42+
43+
44+
style:
45+
name: Check code style
46+
needs: changes
47+
runs-on: ubuntu-latest
48+
if: ${{ needs.changes.outputs.changes == 'true' }}
49+
steps:
50+
- uses: actions/checkout@v2
51+
- uses: actions/setup-python@v2
52+
- uses: pre-commit/[email protected]
53+
54+
test:
55+
name: "Test py${{ matrix.python-version }}: ${{ matrix.part }}"
56+
needs:
57+
- changes
58+
- style
59+
runs-on: ubuntu-latest
60+
if: ${{ needs.changes.outputs.changes == 'true' && needs.style.result == 'success' }}
61+
strategy:
62+
fail-fast: true
63+
matrix:
64+
python-version: ["3.6", "3.7"]
65+
fast-compile: [0]
66+
float32: [0]
67+
part:
68+
- "tests"
69+
70+
steps:
71+
- uses: actions/checkout@v2
72+
with:
73+
fetch-depth: 0
74+
- name: Set up Python ${{ matrix.python-version }}
75+
uses: conda-incubator/setup-miniconda@v2
76+
with:
77+
mamba-version: "*"
78+
channels: conda-forge,defaults
79+
channel-priority: true
80+
python-version: ${{ matrix.python-version }}
81+
auto-update-conda: true
82+
83+
- name: Create matrix id
84+
id: matrix-id
85+
env:
86+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
87+
run: |
88+
echo $MATRIX_CONTEXT
89+
export MATRIX_ID=`echo $MATRIX_CONTEXT | md5sum | cut -c 1-32`
90+
echo $MATRIX_ID
91+
echo "::set-output name=id::$MATRIX_ID"
92+
93+
- name: Install dependencies
94+
shell: bash -l {0}
95+
run: |
96+
mamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service
97+
pip install -q -r requirements.txt
98+
mamba list && pip freeze
99+
python -c 'import aesara; print(aesara.config.__str__(print_doc=False))'
100+
python -c 'import aesara; assert(aesara.config.blas__ldflags != "")'
101+
env:
102+
PYTHON_VERSION: ${{ matrix.python-version }}
103+
104+
- name: Run tests
105+
shell: bash -l {0}
106+
run: |
107+
if [[ $FAST_COMPILE == "1" ]]; then export AESARA_FLAGS=$AESARA_FLAGS,mode=FAST_COMPILE; fi
108+
if [[ $FLOAT32 == "1" ]]; then export AESARA_FLAGS=$AESARA_FLAGS,floatX=float32; fi
109+
export AESARA_FLAGS=$AESARA_FLAGS,warn__ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc__cxxflags=-pipe
110+
python -m pytest -x -r A --verbose --cov=aehmc --cov-report=xml:coverage/coverage-${MATRIX_ID}.xml --no-cov-on-fail $PART
111+
env:
112+
MATRIX_ID: ${{ steps.matrix-id.outputs.id }}
113+
MKL_THREADING_LAYER: GNU
114+
MKL_NUM_THREADS: 1
115+
OMP_NUM_THREADS: 1
116+
PART: ${{ matrix.part }}
117+
FAST_COMPILE: ${{ matrix.fast-compile }}
118+
FLOAT32: ${{ matrix.float32 }}
119+
120+
- name: Upload coverage file
121+
uses: actions/upload-artifact@v2
122+
with:
123+
name: coverage
124+
path: coverage/coverage-${{ steps.matrix-id.outputs.id }}.xml
125+
126+
all-checks:
127+
if: ${{ always() }}
128+
runs-on: ubuntu-latest
129+
name: "All tests"
130+
needs: [changes, style, test]
131+
steps:
132+
- name: Check build matrix status
133+
if: ${{ needs.changes.outputs.changes == 'true' && (needs.style.result != 'success' || needs.test.result != 'success') }}
134+
run: exit 1
135+
136+
upload-coverage:
137+
runs-on: ubuntu-latest
138+
name: "Upload coverage"
139+
needs: [changes, all-checks]
140+
if: ${{ needs.changes.outputs.changes == 'true' && needs.all-checks.result == 'success' }}
141+
steps:
142+
- uses: actions/checkout@v2
143+
144+
- name: Set up Python
145+
uses: actions/setup-python@v1
146+
with:
147+
python-version: 3.7
148+
149+
- name: Install dependencies
150+
run: |
151+
python -m pip install -U coverage>=5.1 coveralls
152+
153+
- name: Download coverage file
154+
uses: actions/download-artifact@v2
155+
with:
156+
name: coverage
157+
path: coverage
158+
159+
- name: Upload coverage to Codecov
160+
uses: codecov/codecov-action@v1
161+
with:
162+
directory: ./coverage/
163+
fail_ci_if_error: true

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: |
22
(?x)^(
33
versioneer\.py|
4-
aesara_hmc/_version\.py|
4+
aehmc/_version\.py|
55
doc/.*|
66
bin/.*
77
)$

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Ampersand
3+
Copyright (c) 2021 Aesara Developers
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
include versioneer.py
2-
include aesara_hmc/_version.py
2+
include aehmc/_version.py

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.PHONY: help venv conda docker docstyle format style black test lint check coverage pypi
22
.DEFAULT_GOAL = help
33

4-
PROJECT_NAME = aesara-hmc
5-
PROJECT_DIR = aesara_hmc/
4+
PROJECT_NAME = aehmc
5+
PROJECT_DIR = aehmc/
66
PYTHON = python
77
PIP = pip
88
CONDA = conda
File renamed without changes.

aesara_hmc/_version.py renamed to aehmc/_version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def get_config():
4141
cfg.VCS = "git"
4242
cfg.style = "pep440"
4343
cfg.tag_prefix = "v"
44-
cfg.parentdir_prefix = "aesara_hmc-"
45-
cfg.versionfile_source = "aesara_hmc/_version.py"
44+
cfg.parentdir_prefix = "aehmc-"
45+
cfg.versionfile_source = "aehmc/_version.py"
4646
cfg.verbose = False
4747
return cfg
4848

File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.cfg

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[versioneer]
22
VCS = git
33
style = pep440
4-
versionfile_source = aesara_hmc/_version.py
5-
versionfile_build = aesara_hmc/_version.py
4+
versionfile_source = aehmc/_version.py
5+
versionfile_build = aehmc/_version.py
66
tag_prefix = v
7-
parentdir_prefix = aesara_hmc-
7+
parentdir_prefix = aehmc-
88

99
[pydocstyle]
1010
# Ignore errors for missing docstrings.
@@ -19,7 +19,7 @@ testpaths=tests
1919

2020
[coverage:run]
2121
omit =
22-
aesara_hmc/_version.py
22+
aehmc/_version.py
2323
tests/*
2424
branch = True
2525

@@ -72,6 +72,6 @@ check_untyped_defs = False
7272
ignore_errors = True
7373
check_untyped_defs = False
7474

75-
[mypy-aesara_hmc._version]
75+
[mypy-aehmc._version]
7676
ignore_errors = True
7777
check_untyped_defs = False

0 commit comments

Comments
 (0)