-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from sissaschool/release/1.0.0
Release SporTran `v1.0.0rc1`
- Loading branch information
Showing
148 changed files
with
207,494 additions
and
44,824 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,16 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Check that the GitHub release tag matches the package version.""" | ||
import argparse | ||
import json | ||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('GITHUB_REF', help='The GITHUB_REF environmental variable') | ||
parser.add_argument('SETUP_PATH', help='Path to the setup.json') | ||
args = parser.parse_args() | ||
assert args.GITHUB_REF.startswith('refs/tags/v'), f'GITHUB_REF should start with "refs/tags/v": {args.GITHUB_REF}' | ||
tag_version = args.GITHUB_REF[11:] | ||
with open(args.SETUP_PATH, encoding='utf8') as handle: | ||
data = json.load(handle) | ||
pypi_version = data['version'] | ||
assert tag_version == pypi_version, f'The tag version {tag_version} != {pypi_version} specified in `setup.json`' |
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,69 @@ | ||
name: continuous-integration | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
pre-commit: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-pre-commit-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-pre-commit- | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install python dependencies | ||
run: | ||
pip install -e .[pre-commit,tests] | ||
|
||
- name: Run pre-commit | ||
run: | ||
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | ||
|
||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-pre-commit-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-pre-commit- | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install --upgrade setuptools | ||
pip install -e .[tests] | ||
- name: Test with pytest | ||
run: | | ||
pytest -sv tests |
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,115 @@ | ||
name: release | ||
|
||
# Automate deployment to PyPI when creating a release tag vX.Y.Z | ||
# will only be published to PyPI if the git tag matches the release version | ||
# and the pre-commit and tests pass | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
jobs: | ||
|
||
check-release-tag: | ||
|
||
# Only run this job on the main repository and not on forks | ||
if: github.repository == 'sissaschool/sportran' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- run: python .github/workflows/check_release_tag.py $GITHUB_REF setup.json | ||
|
||
pre-commit: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-pre-commit-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-pre-commit- | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install python dependencies | ||
run: | ||
pip install -e .[pre-commit,tests] | ||
|
||
- name: Run pre-commit | ||
run: | ||
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | ||
|
||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-pre-commit-${{ hashFiles('**/setup.json') }} | ||
restore-keys: | ||
pip-pre-commit- | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
pip install --upgrade setuptools | ||
pip install -e .[tests] | ||
- name: Test with pytest | ||
run: | | ||
pytest -sv tests | ||
publish: | ||
|
||
name: Publish to PyPI | ||
|
||
needs: [check-release-tag, pre-commit, tests] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- name: Build package | ||
run: | | ||
pip install wheel | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_SPORTRAN }} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.9" | ||
# You can also specify other tool versions: | ||
# nodejs: "16" | ||
# rust: "1.55" | ||
# golang: "1.17" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
|
||
# If using Sphinx, optionally build your docs in additional formats such as PDF | ||
# formats: | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- doc |
File renamed without changes.
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,11 +1,11 @@ | ||
recursive-include examples * | ||
include LICENSE.txt | ||
include setup.json | ||
include thermocepstrum/README.md | ||
include thermocepstrum/metadata.json | ||
include thermocepstrum/utils/plot_style.mplstyle | ||
exclude thermocepstrum/utils/blocks.py | ||
exclude thermocepstrum/utils/blockanalysis.py | ||
include thermocepstrum_gui/README_GUI.md | ||
include thermocepstrum_gui/assets/icon.gif | ||
include thermocepstrum_gui/assets/languages.json | ||
include sportran/README.md | ||
include sportran/metadata.json | ||
include sportran/utils/plot_style.mplstyle | ||
exclude sportran/utils/blocks.py | ||
exclude sportran/utils/blockanalysis.py | ||
include sportran_gui/README_GUI.md | ||
include sportran_gui/assets/icon.gif | ||
include sportran_gui/assets/languages.json |
Oops, something went wrong.