-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
223 additions
and
3,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Benchmarks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
benchmark: | ||
name: Run benchmarks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '3.10' ] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up benchmark environment | ||
run: | | ||
python -m pip install -U pip | ||
pip install . | ||
less requirements.txt | grep 'pytest\|chex' | xargs -i -t pip install {} | ||
- name: Run benchmarks | ||
run: | | ||
pytest -vv -m benchmark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,48 @@ | ||
name: Nightly | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build_and_publish: | ||
name: Build source distribution | ||
name: Build and publish on PyPi | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.7" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade build | ||
- name: Build the sdist | ||
run: python -m build | ||
env: | ||
BUILD_BLACKJAX_NIGHTLY: true | ||
- uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_NIGHTLY_TOKEN }} | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Update pyproject.toml | ||
# Taken from /~https://github.com/aesara-devs/aesara/pull/1375 | ||
run: | | ||
curl -sSLf /~https://github.com/TomWright/dasel/releases/download/v2.0.2/dasel_linux_amd64 \ | ||
-L -o /tmp/dasel && chmod +x /tmp/dasel | ||
/tmp/dasel put -f pyproject.toml project.name -v blackjax-nightly | ||
/tmp/dasel put -f pyproject.toml tool.setuptools_scm.version_scheme -v post-release | ||
/tmp/dasel put -f pyproject.toml tool.setuptools_scm.local_scheme -v no-local-version | ||
- name: Build the sdist and wheel | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install build | ||
python -m build | ||
- name: Check sdist install and imports | ||
run: | | ||
mkdir -p test-sdist | ||
cd test-sdist | ||
python -m venv venv-sdist | ||
venv-sdist/bin/python -m pip install ../dist/blackjax-nightly-*.tar.gz | ||
venv-sdist/bin/python -c "import blackjax" | ||
- name: Check wheel install and imports | ||
run: | | ||
mkdir -p test-wheel | ||
cd test-wheel | ||
python -m venv venv-wheel | ||
venv-wheel/bin/python -m pip install ../dist/blackjax_nightly-*.whl | ||
- name: Publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@v1.4.2 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_NIGHTLY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ share/python-wheels/ | |
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
_version.py | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[title-max-length] | ||
line-length=120 | ||
|
||
[title-min-length] | ||
min-length=15 | ||
|
||
[title-match-regex] | ||
# python-style regex that the commit-msg title must match | ||
# Note that the regex can contradict with other rules if not used correctly | ||
# (e.g. title-must-not-contain-word). | ||
regex=^[A-Z].*$ | ||
|
||
[title-must-not-contain-word] | ||
# Comma-separated list of words that should not occur in the title. Matching is case | ||
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING" | ||
# will not cause a violation, but "WIP: my title" will. | ||
words=wip | ||
|
||
[body-max-line-length] | ||
line-length=72 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.