-
Notifications
You must be signed in to change notification settings - Fork 0
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
Raquel Serial
committed
Jul 6, 2024
0 parents
commit 0a3ed3c
Showing
40 changed files
with
3,148 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,35 @@ | ||
[bumpversion] | ||
commit = True | ||
tag = False | ||
current_version = 0.1.0 | ||
|
||
[bumpversion:file:pyproject.toml] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
||
[bumpversion:file:src/flintpy/__init__.py] | ||
search = __version__ = "{current_version}" | ||
replace = __version__ = "{new_version}" | ||
|
||
[bumpversion:file(title):CHANGELOG.md] | ||
search = {#}{#} [Unreleased] | ||
replace = {#}{#} [Unreleased] | ||
|
||
{#}{#} [{new_version}] - {now:%Y-%m-%d} | ||
|
||
[bumpversion:file(links):CHANGELOG.md] | ||
search = [Unreleased]: https://github.com/rserial/flintpy/compare/v{current_version}...HEAD | ||
replace = [Unreleased]: https://github.com/rserial/flintpy/compare/v{new_version}...HEAD | ||
[{new_version}]: https://github.com/rserial/flintpy/compare/v{current_version}...v{new_version} | ||
|
||
[bumpversion:file(version):CITATION.cff] | ||
search = version: {current_version} | ||
replace = version: {new_version} | ||
|
||
[bumpversion:file(tag):CITATION.cff] | ||
search = https://github.com/rserial/flintpy/releases/tag/v{current_version} | ||
replace = https://github.com/rserial/flintpy/releases/tag/v{new_version} | ||
|
||
[bumpversion:file(description):CITATION.cff] | ||
search = description: The Software Heritage link for version {current_version}. | ||
replace = description: The Software Heritage link for version {new_version}. |
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 @@ | ||
# This is a comment. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# More details are here: https://help.github.com/articles/about-codeowners/ | ||
|
||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @rserial will be requested for review when someone opens | ||
# a pull request. | ||
* @rserial |
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,25 @@ | ||
--- | ||
name: 🐛 Bug report | ||
about: Create a report to help us improve | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Expected Behavior | ||
|
||
|
||
## Actual Behavior | ||
|
||
|
||
## Steps to Reproduce the Problem | ||
|
||
1. | ||
1. | ||
1. | ||
|
||
## Specifications | ||
|
||
- Version: | ||
- Platform: | ||
- Subsystem: |
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 @@ | ||
blank_issues_enabled: false | ||
contact_links: [] |
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,19 @@ | ||
--- | ||
name: 🚀 Feature request | ||
about: Suggest an idea for this project | ||
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,7 @@ | ||
Fixes # | ||
|
||
## Proposed 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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/docs" | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily |
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,41 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: | ||
pull_request: | ||
branches: | ||
schedule: | ||
- cron: '0 6 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.1.1 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,43 @@ | ||
name: "Pre-commit autoupdate" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 6 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
autoupdate: | ||
name: autoupdate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install system deps | ||
shell: bash | ||
run: | | ||
pip install poetry | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root --only dev --only linters --sync | ||
- name: Run autoupdate | ||
run: poetry run pre-commit autoupdate | ||
|
||
- name: Run pre-commit | ||
run: poetry run pre-commit run --all-files | ||
|
||
- uses: peter-evans/create-pull-request@v6.0.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: chore-update-pre-commit-hooks | ||
title: Update pre-commit hooks | ||
commit-message: "Update pre-commit hooks" | ||
body: | | ||
# Update pre-commit hooks | ||
- Update pre-commit hooks to the latest version. | ||
delete-branch: true |
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,72 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install system deps | ||
shell: bash | ||
run: | | ||
pip install poetry | ||
poetry config virtualenvs.in-project true | ||
- name: Build package | ||
run: | | ||
poetry build --ansi | ||
- name: Publish package on PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.8.11 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Publish package on TestPyPI | ||
uses: pypa/gh-action-pypi-publish@v1.8.11 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
github_release: | ||
needs: release | ||
name: Create Github Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Get version from tag | ||
id: tag_name | ||
shell: bash | ||
run: | | ||
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2.2.2 | ||
with: | ||
version: ${{ steps.tag_name.outputs.current_version }} | ||
path: ./CHANGELOG.md | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1.1.4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
draft: false | ||
prerelease: false |
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,108 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: | ||
pull_request: | ||
branches: | ||
|
||
jobs: | ||
linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install system deps | ||
shell: bash | ||
run: | | ||
pip install poetry | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root --only dev --only linters --sync | ||
- name: Linting | ||
shell: bash | ||
run: poetry run pre-commit run --all-files | ||
|
||
tests: | ||
needs: linting | ||
name: ${{ matrix.os }} / ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
matrix: | ||
os: [Ubuntu, MacOS, Windows] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system deps | ||
shell: bash | ||
run: | | ||
pip install nox-poetry | ||
pip install poetry | ||
poetry config virtualenvs.in-project true | ||
- name: Run mypy with nox | ||
shell: bash | ||
run: nox --force-color -s mypy-${{ matrix.python-version }} | ||
|
||
- name: Run tests with nox | ||
shell: bash | ||
run: nox --force-color -s tests-${{ matrix.python-version }} | ||
|
||
- name: Run securtity check | ||
if: matrix.python-version == '3.12' && matrix.os == 'Ubuntu' | ||
shell: bash | ||
run: nox --force-color -s security | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os }}-${{ matrix.python-version }}.coverage-data | ||
path: ".coverage.*" | ||
retention-days: 2 | ||
|
||
coverage: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5.0.0 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install system deps | ||
shell: bash | ||
run: | | ||
pip install nox-poetry | ||
pip install poetry | ||
poetry config virtualenvs.in-project true | ||
- name: Download coverage data | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: "*.coverage-data" | ||
merge-multiple: true | ||
|
||
- name: Create coverage report | ||
shell: bash | ||
run: | | ||
nox --force-color --session=coverage -- --fmt xml | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v3.1.4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.