From d66b49af7e2225a325d145583abc4c5394526705 Mon Sep 17 00:00:00 2001 From: Roy Smart Date: Sun, 27 Oct 2024 20:37:51 -0600 Subject: [PATCH 1/2] Added base package --- .github/workflows/black.yml | 17 +++++++++++++++++ .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/ruff.yml | 14 ++++++++++++++ optimize/__init__.py | 3 +++ 4 files changed, 68 insertions(+) create mode 100644 .github/workflows/black.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/ruff.yml create mode 100644 optimize/__init__.py diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0000000..6f27509 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,17 @@ +name: Black + +on: + push: + branches: + - main + pull_request: + +jobs: + black: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: psf/black@stable + with: + options: "--check --verbose --diff" + src: "./optimize" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..3830800 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish to PyPI + +permissions: + id-token: write + contents: read + +on: + release: + types: [published] + +jobs: + publish: + name: Build and publish to PyPI + if: startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..50345c1 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,14 @@ +name: Ruff + +on: + push: + branches: + - main + pull_request: + +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 diff --git a/optimize/__init__.py b/optimize/__init__.py new file mode 100644 index 0000000..8f225d1 --- /dev/null +++ b/optimize/__init__.py @@ -0,0 +1,3 @@ +""" +Numba-accelerated minimization of objective functions. +""" \ No newline at end of file From e08c2633fc9939076024221da7924a573a559b2e Mon Sep 17 00:00:00 2001 From: Roy Smart Date: Sun, 27 Oct 2024 20:38:59 -0600 Subject: [PATCH 2/2] black --- optimize/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimize/__init__.py b/optimize/__init__.py index 8f225d1..b36e432 100644 --- a/optimize/__init__.py +++ b/optimize/__init__.py @@ -1,3 +1,3 @@ """ Numba-accelerated minimization of objective functions. -""" \ No newline at end of file +"""