Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .coveragerc

This file was deleted.

12 changes: 6 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 88
trim_trailing_whitespace = true

[*.yaml]
[*.{yaml,toml}]
indent_size = 2
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 88
extend-ignore = E203
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.venv
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "03:00"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: daily
Expand Down
4 changes: 4 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@
- name: "minor"
color: 0e8a16
description: "This PR causes a minor version bump in the version number."

- name: "skip-changelog"
color: fef2c0
description: "This issue or PR is exempted from the release notes."
10 changes: 7 additions & 3 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
change-template: "- #$NUMBER $TITLE @$AUTHOR"
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
change-template: '- [#$NUMBER] $TITLE [@$AUTHOR](https://github.com/$AUTHOR)'
sort-direction: ascending

exclude-labels:
- 'skip-changelog'

categories:
- title: "🚨 Breaking changes"
labels:
Expand All @@ -28,6 +31,7 @@ categories:
labels:
- "documentation"
- title: "⬆️ Dependency updates"
collapse-after: 1
labels:
- "dependencies"

Expand Down
115 changes: 98 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,120 @@
---
name: CI

# yamllint disable-line rule:truthy
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types: [released]

jobs:
run-tests:
name: 📦 Build & publish package
lint:
name: Lint and validate code
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
- name: Checkout repository
uses: actions/checkout@v3

- name: 🛠 Set up Python all python version
- name: Set up Python 3.9
uses: actions/setup-python@v3
id: setup-python
with:
python-version: 3.9

- name: 📦 Install build, check-wheel-contents, and twine
run: python -m pip install build
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached .venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: ${{ steps.cached-poetry-dependencies.outputs.cache-hit != 'true' }}
run: poetry install --no-interaction --no-root

- name: Run flake8
run: poetry run flake8

- name: Run bandit
run: poetry run bandit -r exonetapi

test:
name: Run tests on python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: 🔨 Build package
run: python -m build --sdist --wheel .
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
id: setup-python
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: 🌏 Publish distribution to PyPI
if: ${{ github.event_name == 'release' }}
uses: pypa/gh-action-pypi-publish@release/v1
- name: Load cached .venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
password: ${{ secrets.PYPI_API_TOKEN }}
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: ${{ steps.cached-poetry-dependencies.outputs.cache-hit != 'true' }}
run: poetry install --no-interaction --no-root

- name: Run pytest
run: poetry run pytest --cov exonetapi

build:
name: Build package
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
id: setup-python
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached .venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: ${{ steps.cached-poetry-dependencies.outputs.cache-hit != 'true' }}
run: poetry install --no-interaction --no-root

- name: Build package
run: poetry build
31 changes: 0 additions & 31 deletions .github/workflows/codeql.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
name: Release Drafter
name: Draft Release

# yamllint disable-line rule:truthy
on:
push:
branches:
- master

jobs:
update_release_draft:
name: ✏️ Draft release
update-release-draft:
name: Update
runs-on: ubuntu-latest

steps:
- name: 🚀 Run Release Drafter
- name: Run release drafter
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Publish

on:
release:
types: [released]

jobs:
publish:
name: Build & publish package
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Build package
run: poetry build

- name: Publish distribution to PyPI
if: ${{ github.event_name == 'release' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: Sync Labels
name: Sync labels

# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
Expand All @@ -12,13 +11,14 @@ on:

jobs:
labels:
name: ♻️ Sync labels
name: Sync labels
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
- name: Checkout repository
uses: actions/checkout@v3

- name: 🚀 Run Label Syncer
uses: micnncim/action-label-syncer@v1
- name: Run Label Syncer
uses: micnncim/action-label-syncer@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/tests.yaml

This file was deleted.

Loading