Skip to content

Commit

Permalink
Merge pull request #40 from funkelab/update_deps
Browse files Browse the repository at this point in the history
Update dependencies and build process
  • Loading branch information
cmalinmayor authored May 23, 2024
2 parents ffa78ad + 62413a7 commit ae9b227
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,25 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
slug: funkelab/motile-napari-plugin

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)
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
needs: [test]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
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 }}
- name: Build a binary wheel and a source tarball
run: |
git tag
python -m build .
twine upload dist/*
python -m pip install -U pip
python -m pip install -U setuptools setuptools_scm build
python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[build-system]
requires = ["setuptools>=42.0.0", "wheel"]
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"


[tool.setuptools_scm]

[tool.black]
line-length = 79
target-version = ['py38', 'py39', 'py310']


[tool.ruff]
line-length = 79

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ install_requires =
magicgui
qtpy
scikit-image
motile @ git+https://github.com/funkelab/motile.git@5fdc0247a13a58b5cb49f808daf9d37719481467
motile_toolbox @ git+https://github.com/funkelab/motile_toolbox.git@4221b06eb1bd1485f709ca62c45482847e5488f7
motile ==0.2.1
motile_toolbox ==0.2.3
pydantic
tifffile[all]
fonticon-fontawesome6
Expand Down
9 changes: 8 additions & 1 deletion src/motile_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
__version__ = "0.0.1"
from importlib.metadata import PackageNotFoundError, version

from .widgets.motile_widget import MotileWidget

try:
__version__ = version("motile-toolbox")
except PackageNotFoundError:
# package is not installed
__version__ = "uninstalled"

__all__ = ("MotileWidget",)

0 comments on commit ae9b227

Please sign in to comment.