-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from DavidCEllis/env_zipapp
Add a ducktools-env zipapp as a distribution format
- Loading branch information
Showing
19 changed files
with
1,420 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: UnitTests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
test-splitguides: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
python-version: ["3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[testing] | ||
- name: Test with pytest | ||
run: | | ||
pytest tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build Exe Archive | ||
|
||
#on: | ||
# release: | ||
# types: [published] | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
name: Build executable | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install the module | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install . | ||
- name: Build the application | ||
run: | | ||
python application/setup.py build | ||
- name: Store the built application | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ducktools-exe | ||
path: build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build and Publish wheel to Github | ||
|
||
#on: | ||
# release: | ||
# types: [published] | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
name: Build Wheel | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- 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/ | ||
|
||
# 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: | ||
# release-signing-artifacts: false | ||
# inputs: >- | ||
# ./dist/*.tar.gz | ||
# ./dist/*.whl | ||
# - 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 }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build zipapp | ||
|
||
#on: | ||
# release: | ||
# types: [published] | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
name: Build zipapp | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install the module | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install . | ||
- name: Build the zipapp | ||
run: | | ||
python zipapp/build_zipapps.py | ||
- name: Store the built zipapp | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ducktools-zipapp | ||
path: zipapp/dist | ||
|
||
# add-to-github-release: | ||
# name: >- | ||
# Sign the zipapp with Sigstore | ||
# and upload it to GitHub Release | ||
# needs: | ||
# - build | ||
# runs-on: windows-latest | ||
# | ||
# permissions: | ||
# contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
# id-token: write # IMPORTANT: mandatory for sigstore | ||
# | ||
# steps: | ||
# - name: Download the zipapp | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: ducktools-zipapp | ||
# path: zipapp/dist/ | ||
# - name: Sign the zipapp with Sigstore | ||
# uses: sigstore/[email protected] | ||
# with: | ||
# release-signing-artifacts: false | ||
# inputs: >- | ||
# ./zipapp/dist/*.pyz | ||
# - name: Upload artifact signature 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 }}' zipapp/dist/** | ||
# --repo '${{ github.repository }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ ipython_config.py | |
# Environments | ||
.env | ||
.venv | ||
env/ | ||
env*/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
graft src | ||
graft tests | ||
graft docs | ||
|
||
prune */build | ||
prune */dist | ||
prune */.pytest_cache | ||
|
||
global-exclude *~ *.py[cod] *.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file exists to make sure the UI files are built | ||
import sys | ||
from pathlib import Path | ||
from subprocess import run | ||
|
||
|
||
from setuptools import setup | ||
|
||
if __name__ == "__main__": | ||
path_to_build = str(Path(__file__).parent / "src" / "splitguides" / "build_ui.py") | ||
run([sys.executable, path_to_build]) | ||
|
||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.9.0" | ||
__version__ = "0.9.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.