Skip to content

Commit

Permalink
cleanup and move to new dev enviroment. Drop support for python versi…
Browse files Browse the repository at this point in the history
…ons < 3.10
  • Loading branch information
R. Broderick committed Apr 28, 2024
1 parent e55e48e commit 7f5b797
Show file tree
Hide file tree
Showing 44 changed files with 2,045 additions and 5,618 deletions.
51 changes: 1 addition & 50 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
# .gitattributes snippet to force users to use same line endings for project.
#
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
# https://help.github.com/articles/dealing-with-line-endings/
# https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes



# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.css text
*.js text
*.json text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
.htaccess text
*.sh text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.pyc binary
stringdatadeque/_version.py export-subst
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
24 changes: 24 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Black Formatting

"on":
push:
pull_request:

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- name: Test Formatting
run: just ruff_format_fixes
24 changes: 24 additions & 0 deletions .github/workflows/dapperdata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Configuration File Formatting

"on":
push:
pull_request:

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- name: Test Formatting
run: just dapperdata_check
18 changes: 18 additions & 0 deletions .github/workflows/gh_pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy Sphinx documentation to Pages

"on":
push:
branches: [main] # branch to trigger deployment

jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
41 changes: 0 additions & 41 deletions .github/workflows/main.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Mypy testing

"on":
push:
pull_request:

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- name: Test Typing
run: just mypy
23 changes: 23 additions & 0 deletions .github/workflows/pip-audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pip-Audit

"on":
push:
pull_request:

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- uses: pypa/[email protected]
93 changes: 93 additions & 0 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish Python distribution to PyPI and TestPyPI

"on": push

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/protocol-implements-decorator/ # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python distribution with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
27 changes: 27 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PyTest

"on":
push:
pull_request:

env:
COLUMNS: 120

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- name: Run Tests
run: just pytest
24 changes: 24 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Ruff Linting

"on":
push:
pull_request:

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- name: Test Formatting
run: just ruff_check
27 changes: 27 additions & 0 deletions .github/workflows/tomlsort.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: TOML Formatting

"on":
push:
pull_request:

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

- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: 'pip'

- uses: taiki-e/install-action@just

- name: Install Dependencies
run: just install

- name: Install toml-sort
run: pip install toml-sort

- name: Test Typing
run: just tomlsort_check
Loading

0 comments on commit 7f5b797

Please sign in to comment.