Skip to content

Commit

Permalink
release version
Browse files Browse the repository at this point in the history
  • Loading branch information
kapoorlab committed Oct 6, 2023
1 parent 87aa733 commit 9143f8e
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 34 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: napatrackmater_deploy
on:
workflow_dispatch:
inputs:
name:
description: "Hello KapoorLabs Lab member"
default: "Ready to dispach your code to PyPi"

jobs:

deploy:

#needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools setuptools_scm wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build .
twine upload dist/*
21 changes: 21 additions & 0 deletions .github/workflows/napari-hub-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: napari hub Preview Page # we use this name to find your preview page artifact, so don't change it!
# For more info on this action, see https://github.com/chanzuckerberg/napari-hub-preview-action/blob/main/action.yml

on:
pull_request:
branches:
- '**'

jobs:
preview-page:
name: Preview Page Deploy
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: napari hub Preview Page Builder
uses: chanzuckerberg/[email protected]
with:
hub-ref: main
32 changes: 8 additions & 24 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Manual Tests Trigger
name: napatrackmater_test_deploy

on:
workflow_dispatch:
Expand All @@ -16,7 +16,7 @@ jobs:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
Expand All @@ -27,41 +27,25 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# these libraries enable testing on Qt on linux
- uses: tlambert03/setup-qt-libs@v1

# strategy borrowed from vispy for installing opengl libs on windows
- name: Install Windows OpenGL
if: runner.os == 'Windows'
run: |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
# note: if you need dependencies from conda, considering using
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
# and
# tox-conda: https://github.com/tox-dev/tox-conda
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions
pip install setuptools tox tox-gh-actions
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
with:
run: python -m tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}

- name: Coverage
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false

deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test]

#needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
Expand Down
24 changes: 14 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,33 @@ repos:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort


- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.2.3
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]
- repo: https://github.com/myint/autoflake
rev: v2.2.1
rev: v2.0.0
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports>=1.9.0]
args: ["--ignore=E501,E203,W503"]

# Add a custom hook to update _version.py
- repo: local
hooks:
- id: update-version
name: Update _version.py with Git tag
entry: python update_version.py
language: system
pass_filenames: false

0 comments on commit 9143f8e

Please sign in to comment.