Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas committed Sep 21, 2024
0 parents commit 22de006
Show file tree
Hide file tree
Showing 43 changed files with 4,000 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .copier/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v2024.27-4-g3fe659b
_src_path: /home/josh/projects/work/django-twc-package
author_email: [email protected]
author_name: Josh Thomas
current_version: 0.1.0
django_versions:
- '4.2'
- '5.0'
- '5.1'
docs_domain: readthedocs.io
github_owner: joshuadavidthomas
github_repo: bird
module_name: bird
package_description: A UI Kit for your Django projects
package_name: bird
python_versions:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
test_django_main: true
versioning_scheme: SemVer
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{,.}{j,J}ustfile]
indent_size = 4

[*.{py,rst,ini,md}]
indent_size = 4

[*.py]
line_length = 120
multi_line_output = 3

[*.{css,html,js,json,jsx,sass,scss,svelte,ts,tsx,yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{Makefile,*.bat}]
indent_style = tab
Empty file added .env.example
Empty file.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @westerveltco/oss
/docs/ @westerveltco/web-dev-docs
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
timezone: America/Chicago
labels:
- 🤖 dependabot
groups:
gha:
patterns:
- "*"
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: release

on:
release:
types: [released]

permissions:
contents: write

jobs:
test:
uses: ./.github/workflows/test.yml

pypi:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
needs: test
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.13"
allow-prereleases: true

- name: Install dependencies
run: |
python -m pip install -U pip uv
python -m uv pip install --system hatch
- name: Build package
run: |
hatch build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
111 changes: 111 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: test

on:
pull_request:
push:
branches: [main]
workflow_call:

concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true

env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.8"
allow-prereleases: true

- name: Install dependencies
run: |
python -m pip install -U pip uv
python -m uv pip install --system nox
- id: set-matrix
run: |
echo "matrix=$(python -m nox -l --json | jq -c '[.[] | select(.name == "tests") | {"python-version": .python, "django-version": .call_spec.django}] | {include: .}')" >> $GITHUB_OUTPUT
test:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
needs: generate-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true

- name: Install dependencies
run: |
python -m pip install -U pip uv
python -m uv pip install --system nox
- name: Run tests
run: |
python -m nox --session "tests(python='${{ matrix.python-version }}', django='${{ matrix.django-version }}')"
tests:
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: OK
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Fail
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.13"
allow-prereleases: true

- name: Install dependencies
run: |
python -m pip install -U pip uv
python -m uv pip install --system nox
- name: Run mypy
run: |
python -m nox --session "mypy"
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.8"
allow-prereleases: true

- name: Install dependencies
run: |
python -m pip install -U pip uv
python -m uv pip install --system nox
- name: Run coverage
run: |
python -m nox --session "coverage"
Loading

0 comments on commit 22de006

Please sign in to comment.