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
23 changes: 16 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ parameters:
jobs:
lint:
docker:
- image: ghcr.io/astral-sh/uv:python<< pipeline.parameters.python-version >>-bookworm-slim
- image: ghcr.io/astral-sh/uv:python<< pipeline.parameters.python-version >>-bookworm
steps:
- checkout
- run:
name: Install dev dependencies
name: Install dependencies and dev dependencies
command: uv sync --frozen --extra dev
- run:
name: Lint and format code and sort imports
Expand Down Expand Up @@ -74,15 +74,24 @@ jobs:

build:
docker:
- image: ghcr.io/astral-sh/uv:python<< pipeline.parameters.python-version >>-bookworm-slim
- image: ghcr.io/astral-sh/uv:python<< pipeline.parameters.python-version >>-bookworm
steps:
- checkout
- run:
name: Install dependencies and dev dependencies
command: uv sync --frozen
name: Compute RELEASE_VERSION via setuptools_scm
command: |
uv pip install --system setuptools-scm
# derive from setuptools_scm or base version + build number
RELEASE_VERSION=$(python -m setuptools_scm)
echo "Building a wheel release with version $RELEASE_VERSION"
echo "Build number: $CIRCLE_BUILD_NUM"
echo "Commit hash: ${CIRCLE_SHA1:0:7}"
echo "Git tag: $CIRCLE_TAG"
- run:
name: Build a distributable package
command: uv build
name: Build a distributable package as a wheel release
command: |
uv build --wheel
# Build already executed above; artifacts are in dist/
- store_artifacts:
path: dist
- persist_to_workspace:
Expand Down
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["uv_build>=0.9.0,<0.10.0"]
build-backend = "uv_build"
requires = ["setuptools>=68", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "udata-hydra-csvapi"
version = "0.2.6"
dynamic = ["version"]
description = "API for CSV converted by udata-hydra"
authors = [
{name = "data.gouv.fr", email = "opendatateam@data.gouv.fr"},
Expand All @@ -16,7 +16,7 @@ dependencies = [
"sentry-sdk<3.0.0,>=2.13.0",
]
requires-python = "<4.0,>=3.11"
license = {text = "MIT"}
license = "MIT"
readme = "README.md"

[project.optional-dependencies]
Expand All @@ -33,6 +33,9 @@ dev = [
lint = { extend-select = ["I"], ignore = ["F401"] } # ["I"] is to also sort imports with an isort rule # TODO: remove ignore F401 later
line-length = 100

[tool.uv.build-backend]
module-name = "api_tabular"
module-root = ""
[tool.setuptools.packages.find]
include = ["api_tabular*"]

[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"