-
Notifications
You must be signed in to change notification settings - Fork 1
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 #8 from opencosmos/release/v0.0.1
Release/v0.0.1
- Loading branch information
Showing
54 changed files
with
2,588 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,2 @@ | ||
[flake8] | ||
ignore = E501 |
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,140 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install uv | ||
run: pip install uv | ||
- name: Set up uv environment | ||
run: uv venv | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml .[dev] | ||
- name: Activate virtual environment & run linters | ||
run: | | ||
source .venv/bin/activate | ||
isort . --check-only | ||
black . --check | ||
bandit: | ||
name: bandit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install uv | ||
run: pip install uv | ||
- name: Set up uv environment | ||
run: uv venv | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml .[dev] | ||
- name: Activate virtual environment & run bandit | ||
run: | | ||
source .venv/bin/activate | ||
bandit -r -c pyproject.toml . --skip B105,B106,B101 | ||
cognitive: | ||
name: cognitive | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install uv | ||
run: pip install uv | ||
- name: Set up uv environment | ||
run: uv venv | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml .[dev] | ||
- name: Activate virtual environment & run ruff | ||
run: | | ||
source .venv/bin/activate | ||
ruff check . --select C901 | ||
pydocstyle: | ||
name: pydocstyle | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install uv | ||
run: pip install uv | ||
- name: Set up uv environment | ||
run: uv venv | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml .[dev] | ||
- name: Activate virtual environment & run pydocstyle | ||
run: | | ||
source .venv/bin/activate | ||
pydocstyle . | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
needs: [bandit, cognitive, lint, pydocstyle] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install uv | ||
run: pip install uv | ||
- name: Set up uv environment | ||
run: uv venv | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml .[dev] | ||
- name: Activate virtual environment & run tests | ||
run: | | ||
source .venv/bin/activate | ||
pytest | ||
release: | ||
name: tag, changelog, release, publish | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install uv | ||
run: pip install uv | ||
- name: Set up uv environment | ||
run: uv venv | ||
- name: Install dependencies | ||
run: uv pip install -r pyproject.toml | ||
- name: Version | ||
uses: paulhatch/semantic-version@v5.0.0 | ||
id: version | ||
with: | ||
major_pattern: "(feat!)" | ||
minor_pattern: "(feat)" | ||
- name: Create changelog text | ||
id: changelog | ||
uses: loopwerk/tag-changelog@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
exclude_types: other,doc,chore | ||
- name: Create release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.version.outputs.version_tag }} | ||
release_name: Release ${{ steps.version.outputs.version_tag }} | ||
body: ${{ steps.changelog.outputs.changes }} | ||
- name: Create changelog pull request | ||
uses: peter-evans/create-pull-request@v2 | ||
with: | ||
commit-message: "Release ${{ steps.version.outputs.version_tag }} [skip ci]" | ||
labels: release, bot | ||
title: "Release ${{ steps.version.outputs.version_tag }}" | ||
body: | | ||
# Release ${{ steps.version.outputs.version_tag }} | ||
Merge this PR to update your version and changelog! | ||
## Included Pull Requests | ||
${{ steps.changelog.outputs.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 |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# Ignore config.yaml | ||
config/config.yaml | ||
|
||
# Ignore .vscode | ||
.vscode/ | ||
|
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 @@ | ||
# CHANGELOG |
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,12 @@ | ||
Copyright (c) 2022, OPEN COSMOS LTD | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Oops, something went wrong.