-
Notifications
You must be signed in to change notification settings - Fork 14
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 #31 from open-lasso-python/release/2.0.0rc1
Release Candidate 1 for Version 2
- Loading branch information
Showing
175 changed files
with
29,949 additions
and
0 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,20 @@ | ||
--- | ||
name: "✨ Feature request" | ||
about: Suggest an idea for this project. | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,10 @@ | ||
--- | ||
name: "\U0001F308 Generic Ticket" | ||
about: Anything not being a bug report or a feature. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
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,31 @@ | ||
--- | ||
name: "\U0001F41B Bug report" | ||
about: Create a report to help us fix a software bug. | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**🐛 Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**🔢 To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
1. Use file '...' | ||
2. Run '...' | ||
3. See error | ||
|
||
**💘 Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**📷 Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**🖥️ Setup** | ||
- lasso-python version: [e.g. 1.5.1] | ||
- OS: [e.g. iOS] | ||
|
||
**ℹ️ Additional context** | ||
Add any other context about the problem here. |
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,199 @@ | ||
name: Python Linting, Test and Upload | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# JOB | ||
# This job runs unit tests, linting and format checks | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
# If either the tests for 3.8 or 3.10 fail all workflows | ||
# are terminated to safe computing resources. | ||
fail-fast: true | ||
# To safe runtime least and latest version supported are | ||
# chosen. We go for 3.8 due to some dependencies. For more | ||
# info see the pyproject.toml | ||
matrix: | ||
python-version: ["3.8", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Task | ||
run: | | ||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d | ||
# Cache dependencies from poetry to speed things up | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install and upgrade pip and poetry | ||
run: python -m pip install --upgrade pip poetry | ||
|
||
- name: Install Dependencies | ||
run: ./bin/task setup | ||
|
||
- name: Lint code | ||
run: ./bin/task lint | ||
|
||
- name: Test code | ||
run: ./bin/task test | ||
|
||
# JOB | ||
# This job publishes the package to test-pipy. | ||
test-publish: | ||
# Will run after the job 'tests' | ||
needs: [tests] | ||
|
||
if: > | ||
startsWith(github.ref, 'refs/tags/') || | ||
startsWith(github.ref, 'refs/heads/release/') | ||
runs-on: ubuntu-latest | ||
# Required for installation of the test package in the | ||
# next job. | ||
outputs: | ||
version: ${{ steps.extract_version.outputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Remember version | ||
id: extract_version | ||
run: | | ||
VERSION=$(cat pyproject.toml | grep -oE -m 1 "version = \"(.*)\"" | cut -f2 -d '"') | ||
echo "Version: ${VERSION}" | ||
echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
# For publishing any version will do | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Task | ||
run: | | ||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip poetry | ||
./bin/task setup | ||
- name: Build packages for release | ||
run: ./bin/task build | ||
|
||
- name: Publish distribution to Test PyPI | ||
env: | ||
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/ | ||
TWINE_USERNAME: __token__ | ||
TWINE_NON_INTERACTIVE: 1 | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
run: poetry run twine upload --skip-existing --verbose 'dist/*' | ||
|
||
# JOB | ||
# Test install from pypi to see if we have any installation bugs. | ||
test-install: | ||
needs: [test-publish] | ||
if: > | ||
startsWith(github.ref, 'refs/tags/') || | ||
startsWith(github.ref, 'refs/heads/release/') | ||
runs-on: ubuntu-latest | ||
|
||
# Use the version from the previous job | ||
env: | ||
VERSION: ${{ needs.test-publish.outputs.version }} | ||
|
||
steps: | ||
# Install python (be aware NO checkout action) | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Check if it installs without errors | ||
- name: Install package | ||
run: | | ||
python -m pip install \ | ||
--index-url https://test.pypi.org/simple/ \ | ||
--extra-index-url https://pypi.org/simple \ | ||
lasso-python=="${VERSION}" | ||
# We run the D3plot import here as it is the most delicate piece of the | ||
# package for importing C-libraries. | ||
- name: Test if the installed package works | ||
run: python -c 'from lasso.dyna import D3plot' | ||
|
||
# JOB | ||
# Finally publish the code to pypi | ||
publish: | ||
needs: [test-install] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Task | ||
run: | | ||
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade poetry pip | ||
./bin/task setup | ||
- name: Build packages for release | ||
run: ./bin/task build | ||
|
||
# Not required but this saves the distribution files | ||
# with the package upload for debugging purposes. | ||
- name: Save packages as artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
if-no-files-found: error | ||
|
||
- name: Publish distribution to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_NON_INTERACTIVE: 1 | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
run: poetry run twine upload --skip-existing --verbose 'dist/*' | ||
|
||
- name: Upload new docs | ||
run: ./bin/task docs:deploy |
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,76 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Mac specific files | ||
.DS_Store | ||
|
||
# Notepad++ backup file | ||
.bak | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
./build/ | ||
.vscode | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Compiled Dynamic libraries | ||
#*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Ignore generated changelog | ||
CHANGELOG.md |
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,5 @@ | ||
# There are different style types for markdown code blocks and strangely | ||
# indentation is the default. We change it here to the more often used 'fenced' | ||
# style denoted by ``` | ||
MD046: | ||
style: fenced |
Oops, something went wrong.