-
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 #7 from ezmsg-org/dev
Migrate to uv
- Loading branch information
Showing
10 changed files
with
398 additions
and
189 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,26 @@ | ||
name: Upload Python Package - ezmsg-blackrock | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: build and upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: "release" | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
|
||
- name: Build Package | ||
run: uv build | ||
|
||
- name: Publish package distributions to PyPI | ||
run: uv publish |
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,41 @@ | ||
name: Test package | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
python-version: [3.9, "3.10", "3.11", "3.12"] | ||
os: | ||
- "ubuntu-latest" | ||
- "windows-latest" | ||
- "macos-latest" | ||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
run: uv python install ${{ matrix.python-version }} | ||
|
||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
|
||
- name: Lint | ||
run: | ||
uv tool run ruff check --output-format=github src | ||
|
||
- name: Run tests | ||
run: uv 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
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 was deleted.
Oops, something went wrong.
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,21 +1,37 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "ezmsg-blackrock" | ||
version = "0.1.1" | ||
description = "Blackrock Cerebus ecosystem interface for ezmsg" | ||
authors = ["Griffin Milsap <[email protected]>"] | ||
authors = [ | ||
{ name = "Griffin Milsap", email = "[email protected]" }, | ||
{ name = "Chadwick Boulay", email = "[email protected]" }, | ||
] | ||
readme = "README.md" | ||
homepage = "https://github.com/griffinmilsap/ezmsg-blackrock" | ||
packages = [ | ||
{ include = "ezmsg", from = "src" } | ||
requires-python = ">=3.9" | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"ezmsg>=3.5.0", | ||
"pycbsdk>=0.1.3", | ||
] | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest>=8.3.3", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
ezmsg = "^3.5.0" | ||
pycbsdk = "^0.1.3" | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
[tool.hatch.build.hooks.vcs] | ||
version-file = "src/ezmsg/blackrock/__version__.py" | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["src/ezmsg"] | ||
|
||
[tool.uv] | ||
dev-dependencies = [ | ||
"ruff>=0.6.8", | ||
] |
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,4 +1 @@ | ||
import importlib.metadata | ||
|
||
|
||
__version__ = importlib.metadata.version("ezmsg-blackrock") | ||
from .__version__ import __version__ as __version__ |
Oops, something went wrong.