Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ updates:
- package-ecosystem: "uv" # See documentation for possible values
directories:
- "/"
- "/src" # Location of package manifests
schedule:
interval: "weekly"
groups:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install uv
uv sync --project=src --no-dev
uv sync --no-dev

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build Site
run: |
export PYTHONPATH=src:$PYTHONPATH
uv run --project=src mkdocs build --clean --config-file mkdocs.yml
uv run mkdocs build --clean --config-file mkdocs.yml

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/link_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- .github/workflows/linkchecker.yml
# run on any PR that changes the pip requirements
- requirements.txt
- src/pyproject.toml
- pyproject.toml
# let us trigger it manually
workflow_dispatch:

Expand All @@ -31,13 +31,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip uv
uv sync --dev --project=src
uv sync --dev

- name: Build Site
run: |
uv run --project=src mkdocs build --verbose --clean --config-file mkdocs.yml
uv run mkdocs build --verbose --clean --config-file mkdocs.yml

- name: Check links
run: |
uv run --project=src linkchecker site/index.html
uv run linkchecker site/index.html

6 changes: 3 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip uv
uv sync --project=src --dev --frozen
uv sync --dev --frozen
# - uses: psf/black@stable
- name: Test with pytest
run: |
uv run --project=src pytest
uv run pytest
- name: Build
run: |
uv build --project=src
uv build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
18 changes: 6 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,23 @@ ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
RUN python -m venv "${VIRTUAL_ENV}"
FROM base AS dependencies

ARG BASE_DIR=..
ARG SRC_DIR=${BASE_DIR}/src

# Copy the files we need
COPY ${BASE_DIR}/ /app
COPY . /app
# Set the environment variable
ENV PYTHONPATH=/app/src
COPY ${SRC_DIR}/pyproject.toml /app/src/pyproject.toml
COPY ${SRC_DIR}/uv.lock /app/src/uv.lock

# install requirements
RUN uv sync --project=/app/src --frozen

RUN uv sync --frozen

FROM dependencies AS test
ENV PYTHONPATH=/app/src
# Install pytest and dev dependencies
RUN uv sync --project=/app/src --frozen --dev
RUN uv sync --frozen --dev
# Run the unit tests
CMD ["uv", "run", "--project=/app/src", "pytest"]
CMD ["uv", "run", "pytest"]

FROM dependencies AS docs
CMD ["uv", "run", "--project=/app/src", "mkdocs", "serve", "--dev-addr", "0.0.0.0:8000"]
CMD ["uv", "run", "mkdocs", "serve", "--dev-addr", "0.0.0.0:8000"]

FROM dependencies AS registry_api
CMD ["uv", "run", "--project=/app/src", "uvicorn", "ssvc.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uv", "run", "uvicorn", "ssvc.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
6 changes: 3 additions & 3 deletions src/pyproject.toml → pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ ssvc_doctools="ssvc.doctools:main"

[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["ssvc*"] # package names should match these glob patterns (["*"] by default)
include = ["src*"] # package names should match these glob patterns (["*"] by default)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want this to be src/ssvc/* ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe it's where = ["./src"] and leave include = ["ssvc*"] ?

Copy link
Contributor Author

@sei-renae sei-renae Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 3 options successfully run uv sync

exclude = ["test*"] # exclude packages matching these glob patterns (empty by default)
#namespaces = false # to disable scanning PEP 420 namespaces (true by default)

[tool.setuptools_scm]
version_file = "ssvc/_version.py"
root = ".."
version_file = "./src/ssvc/_version.py"
root = "."
local_scheme = "no-local-version"
version_scheme = "no-guess-dev"

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was autogenerated by uv via the following command:
# uv export --project=src --no-editable -o ./requirements.txt
# uv export --no-editable -o ./requirements.txt
.
annotated-types==0.7.0 \
--hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \
Expand Down
File renamed without changes.
Loading