Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: astral-sh/setup-uv@v6
Comment thread
vkryzh marked this conversation as resolved.

- name: Install
run: make install-dev

Expand All @@ -55,6 +57,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: astral-sh/setup-uv@v6

- name: Install
run: make install-dev

Expand Down Expand Up @@ -109,11 +113,10 @@ jobs:
with:
python-version: '3.10'

- name: Install dependencies
run: pip install -U setuptools wheel build
- uses: astral-sh/setup-uv@v6

- name: Build the package
run: python -m build
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
Expand Down
32 changes: 17 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
srcs = src docs/modules/ROOT/examples tests
UV_SYNC = uv sync --frozen --extra dev
UV_RUN = uv run --frozen --extra dev

## all: Run linter and tests.
.PHONY: all
Expand All @@ -11,18 +13,18 @@ help: Makefile

## install: Install all requirements.
.PHONY: install
install: install-corva-sdk install-dev
install:
@$(UV_SYNC)

## install-corva-sdk: Install corva-sdk requirements.
.PHONY: install-corva-sdk
install-corva-sdk:
@pip install -U pip
@pip install -U -e .
@uv sync --frozen

## install-dev: Install dev requirements.
.PHONY: install-dev
install-dev: install-corva-sdk
@pip install -U '.[dev]'
install-dev:
@$(UV_SYNC)


## test: Run tests.
Expand All @@ -32,39 +34,39 @@ test: up-cache unit-tests integration-tests down-cache
## unit-tests: Run unit tests.
unit-tests: test_path = tests/unit
unit-tests:
@coverage run -m pytest $(test_path)
@$(UV_RUN) coverage run -m pytest $(test_path)

## integration-tests: Run integration tests.
.PHONY: integration-tests
integration-tests: export CACHE_URL = redis://localhost:6379
integration-tests: test_path = tests/integration
integration-tests:
@coverage run -m pytest $(test_path)
@$(UV_RUN) coverage run -m pytest $(test_path)

## coverage: Display code coverage in the console.
.PHONY: coverage
coverage: test
@coverage combine
@coverage report --sort=cover
@$(UV_RUN) coverage combine
@$(UV_RUN) coverage report --sort=cover

## coverage-html: Display code coverage in the browser.
.PHONY: coverage-html
coverage-html: test
@coverage combine
@coverage html
@$(UV_RUN) coverage combine
@$(UV_RUN) coverage html
@x-www-browser htmlcov/index.html

## lint: Run linter.
.PHONY: lint
lint:
@ruff check $(srcs)
@mypy $(srcs)
@$(UV_RUN) ruff check $(srcs)
@$(UV_RUN) mypy $(srcs)

## format: Format all files.
.PHONY: format
format:
@ruff check --fix $(srcs)
@ruff format $(srcs)
@$(UV_RUN) ruff check --fix $(srcs)
@$(UV_RUN) ruff format $(srcs)

## docs: Generate docs.
.PHONY: docs
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "corva-sdk"
description = "SDK for building Corva DevCenter Python apps."
readme = "README.md"
version = "2.1.1"
license = { text = "The Unlicense" }
license = "Unlicense"
authors = [
{ name = "Jordan Ambra", email = "jordan.ambra@corva.ai" }
]
Expand Down Expand Up @@ -45,9 +45,9 @@ dev = [
"types-requests~=2.27.27",
"coverage==7.6.1",
"freezegun==1.5.1",
"pytest==6.2.5",
"pytest-mock==3.3.1",
"requests-mock==1.8.0",
"pytest~=8.3.5",
"pytest-mock~=3.14.0",
"requests-mock~=1.12.1",
]

[tool.setuptools]
Expand Down
Loading
Loading