Skip to content

Commit

Permalink
Cleanup repo (#18)
Browse files Browse the repository at this point in the history
* Cleanup repo

Signed-off-by: GitHub <[email protected]>

* Bump CI versions

Signed-off-by: GitHub <[email protected]>

* Add pre-commit config

Signed-off-by: GitHub <[email protected]>

* oops

Signed-off-by: GitHub <[email protected]>

* go away

Signed-off-by: GitHub <[email protected]>

* Tell Ruff to set the line length to 120

Signed-off-by: GitHub <[email protected]>

* Setup Ruff config

Signed-off-by: GitHub <[email protected]>

* Limit support to Python 3.11 and 3.12

Signed-off-by: GitHub <[email protected]>

* Ruff removed the import from the root init py

Signed-off-by: GitHub <[email protected]>

* Add back other import

Signed-off-by: GitHub <[email protected]>

* Doctest thing is causing the failure for some reason

pytest-dev/pytest#9567
Signed-off-by: GitHub <[email protected]>

* Oh look I committed generated files

Signed-off-by: GitHub <[email protected]>

---------

Signed-off-by: GitHub <[email protected]>
  • Loading branch information
shenanigansd authored Nov 12, 2023
1 parent 03a7f00 commit 10f6621
Show file tree
Hide file tree
Showing 16 changed files with 246 additions and 364 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
ci-dependencies:
patterns:
- "*"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"
groups:
python-dependencies:
patterns:
- "*"
19 changes: 0 additions & 19 deletions .github/dependabot.yml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Dependency Review"

on:
pull_request:

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest

steps:
- name: "Checkout Repository"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: "Dependency Review"
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
with:
config-file: darbiadev/.github/.github/dependency-review-config.yaml@main
17 changes: 0 additions & 17 deletions .github/workflows/dependency-review.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/github-pages-python-sphinx.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/lint-test.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Publish Python 🐍 distributions 📦 to PyPI"

on:
release:
types: [published]

jobs:
build-publish:
name: "Build and publish Python 🐍 distributions 📦 to PyPI"
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- name: "Checkout repository"
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- name: "Set up Python 3.x"
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: "Install pypa/build"
run: >-
python -m
pip install
build
--user
- name: "Build a binary wheel and a source tarball"
run: >-
python -m
build
--outdir dist/
- name: "Upload packages"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: packages
path: dist

- name: "Publish distribution 📦 to PyPI"
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10
with:
skip-existing: true
verbose: true
print-hash: true
46 changes: 0 additions & 46 deletions .github/workflows/pypi-publish.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Python CI"

on:
push:
branches:
- main
pull_request:

jobs:
pre-commit:
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 #v4.0.1

lint:
needs: pre-commit
uses: darbiadev/.github/.github/workflows/python-lint.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 #v4.0.1

test:
needs: lint
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.11", "3.12" ]

uses: darbiadev/.github/.github/workflows/python-test.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 #v4.0.1
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

docs:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 #v4.0.1
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: check-json
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
- id: mixed-line-ending
args: [ --fix=lf ]
- id: end-of-file-fixer
Loading

0 comments on commit 10f6621

Please sign in to comment.