Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
justincdavis committed Oct 7, 2024
0 parents commit c7b38fd
Show file tree
Hide file tree
Showing 39 changed files with 1,192 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
20 changes: 20 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# name: Black Check
# on: [ push ]
# jobs:
# build:
# runs-on: ubuntu-latest

# steps:
# - name: Checkout code
# uses: actions/checkout@v2

# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.9

# - name: Install dependencies
# run: pip install black

# - name: Run black check
# run: black --check src/jetsontools
21 changes: 21 additions & 0 deletions .github/workflows/build-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PyPI Build
on: [ push ]
jobs:
build_check:
name: "Build jetsontools package"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build jetsontools
run: |
python -m build
25 changes: 25 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: MyPy Check
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
pip install .[dev]
pip install mypy
pip install types-setuptools
pip install types-requests
- name: Run MyPy check
run:
python3 -m mypy src/jetsontools --config-file=pyproject.toml
12 changes: 12 additions & 0 deletions .github/workflows/pyright.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# name: Pyright
# on: [ push ]
# jobs:
# build:
# runs-on: ubuntu-latest

# steps:
# - name: Pyright
# uses: jakebailey/pyright-action@v2
# with:
# version: 1.1.348
# project: pyproject.toml
35 changes: 35 additions & 0 deletions .github/workflows/release-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Package (PyPI)

on:
release:
types: [published]

jobs:
build_and_publish:
name: "Build and Publish PyPI package"

runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/jetsontools
permissions:
id-token: write

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build jetsontools
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Ruff Check
on: [ push ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: pip install ruff

- name: Run Format Check
run: ruff format src/jetsontools --check

- name: Run Lint Check
run: ruff check src/jetsontools
37 changes: 37 additions & 0 deletions .github/workflows/test-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Package (PyPI)

on:
pull_request:
branches:
- main

jobs:
build_and_publish:
name: "Build and Publish PyPI package - TEST"

runs-on: ubuntu-latest

environment:
name: pypi
url: https://test.pypi.org/p/jetsontools
permissions:
id-token: write

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build jetsontools
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/unittests-macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit Tests - MacOS

on: [ push ]

jobs:
build:
runs-on: macos-latest

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install .[test]
- name: Run unit tests
run: |
./ci/run_tests.sh
29 changes: 29 additions & 0 deletions .github/workflows/unittests-ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit Tests - Ubuntu

on: [ push ]

jobs:
build:
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install .[test]
- name: Run unit tests
run: |
./ci/run_tests.sh
29 changes: 29 additions & 0 deletions .github/workflows/unittests-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Unit Tests - Windows

on: [ push ]

jobs:
build:
runs-on: windows-latest

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install .[test]
- name: Run unit tests
run: |
./ci/run_tests.bat
Loading

0 comments on commit c7b38fd

Please sign in to comment.