-
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.
* clean for 2023 * 2023 day 1 complete
- Loading branch information
Colin Sullivan
authored
Dec 2, 2023
1 parent
7a07edd
commit 39ecf13
Showing
91 changed files
with
6,905 additions
and
2,629 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
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,34 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: 'bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Describe the bug | ||
A clear and concise description of what the bug is. | ||
|
||
## To Reproduce | ||
|
||
### Environment | ||
Output of `aoc debug-version-info`: | ||
``` | ||
... | ||
``` | ||
|
||
### Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. 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. | ||
|
||
## 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,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,29 @@ | ||
categories: | ||
- title: ":boom: Breaking Changes" | ||
label: "breaking" | ||
- title: ":rocket: Features" | ||
label: "enhancement" | ||
- title: ":fire: Removals and Deprecations" | ||
label: "removal" | ||
- title: ":beetle: Fixes" | ||
label: "bug" | ||
- title: ":racehorse: Performance" | ||
label: "performance" | ||
- title: ":rotating_light: Testing" | ||
label: "testing" | ||
- title: ":construction_worker: Continuous Integration" | ||
label: "ci" | ||
- title: ":books: Documentation" | ||
label: "documentation" | ||
- title: ":hammer: Refactoring" | ||
label: "refactoring" | ||
- title: ":lipstick: Style" | ||
label: "style" | ||
- title: ":package: Dependencies" | ||
labels: | ||
- "dependencies" | ||
- "build" | ||
template: | | ||
## Changes | ||
$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,108 @@ | ||
# This workflow will install Python dependencies, run tests and lint. | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
checks: | ||
name: Code Quality Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Install poetry | ||
run: | | ||
pipx install poetry | ||
- name: Chekout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: "poetry" | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry env use 3.11 | ||
poetry config installer.modern-installation false | ||
poetry install | ||
- name: Verify formatting | ||
run: | | ||
poetry run ruff . --select I | ||
poetry run ruff format --check . | ||
- name: Lint | ||
run: | | ||
poetry run ruff . --exit-zero | ||
poetry run mypy --install-types --non-interactive . | ||
poetry run mypy --html-report=mypy_report . | ||
- name: "Upload Mypy Report" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mypy | ||
path: mypy_report | ||
|
||
- name: Build Docs | ||
run: | | ||
make docs | ||
- name: Upload Docs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: docs/site | ||
|
||
- name: Build Wheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
python -m build . | ||
- name: "Upload Distribution" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: Run tests | ||
run: | | ||
poetry run coverage run -m pytest --html=test_report.html --self-contained-html | ||
- name: "Upload Coverage" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: .coverage.* | ||
|
||
- name: Show Coverage Report | ||
run: | | ||
poetry run coverage combine | ||
poetry run coverage report | ||
- name: Create HTML report | ||
run: | | ||
poetry run coverage html | ||
- name: Upload HTML report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage_html | ||
path: htmlcov | ||
|
||
- name: Upload coverage data | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: .coverage | ||
|
||
- name: Check minimum coverage | ||
run: | | ||
poetry run coverage report | ||
poetry run echo '## Test Coverage Report' >> $GITHUB_STEP_SUMMARY | ||
poetry run coverage report --format markdown >> $GITHUB_STEP_SUMMARY |
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,113 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["CI"] | ||
branches: [main] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
draft-release: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
name: Draft Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
build_assets: ${{ steps.check-version.outputs.tag }} | ||
upload_url: ${{ steps.update-release.outputs.upload_url }} | ||
steps: | ||
- name: Install poetry | ||
run: | | ||
pipx install poetry | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: "poetry" | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry env use 3.11 | ||
poetry config installer.modern-installation false | ||
poetry install | ||
- name: Detect and tag new version | ||
id: check-version | ||
uses: salsify/[email protected] | ||
with: | ||
version-command: | | ||
bash -o pipefail -c "poetry version | awk '{ print \$2 }'" | ||
- name: Publish the release notes | ||
id: update-release | ||
uses: release-drafter/[email protected] | ||
with: | ||
publish: ${{ steps.check-version.outputs.tag != '' }} | ||
tag: ${{ steps.check-version.outputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-release-assets: | ||
name: Build Release Assets | ||
runs-on: ubuntu-latest | ||
needs: draft-release | ||
if: ${{ needs.draft-release.outputs.build_assets != '' }} | ||
steps: | ||
- name: Install poetry | ||
run: | | ||
pipx install poetry | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: "poetry" | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry env use 3.11 | ||
poetry config installer.modern-installation false | ||
poetry install | ||
- name: Build Distribution | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
python -m build . | ||
- name: Upload Distribution Assets | ||
uses: shogo82148/actions-upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ needs.draft-release.outputs.upload_url }} | ||
asset_path: dist/* | ||
|
||
- name: Build Documentation | ||
run: | | ||
make docs | ||
zip -r docs.zip docs/site | ||
- name: Upload Documentation Assets | ||
uses: shogo82148/actions-upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ needs.draft-release.outputs.upload_url }} | ||
asset_path: docs.zip | ||
|
||
- name: Publish docs to github pages | ||
run: | | ||
cd docs/; poetry run mkdocs gh-deploy --force |
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 |
---|---|---|
|
@@ -7,4 +7,9 @@ | |
.pytest_cache | ||
.vscode | ||
htmlcov | ||
.DS_Store | ||
.DS_Store | ||
.venv | ||
.ruff_cache | ||
.coverage | ||
*.html | ||
mypy_report |
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 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude: docs/docs/CLI.md | ||
- id: end-of-file-fixer | ||
exclude: docs/docs/CLI.md | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: debug-statements | ||
- id: detect-private-key | ||
|
||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
# Ruff version. | ||
rev: "v0.1.5" | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format |
Oops, something went wrong.