-
Notifications
You must be signed in to change notification settings - Fork 10
Fix CI #546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CI #546
Changes from all commits
a78278c
ee432e1
5a534f3
2b134e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| FROM python:3.13 | ||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
chrisaddy marked this conversation as resolved.
|
||
|
|
||
| ENV PYTEST_ADDOPTS="--rootdir=/tests" | ||
|
|
||
| WORKDIR /tests | ||
|
|
||
| COPY pyproject.toml uv.lock . | ||
|
chrisaddy marked this conversation as resolved.
|
||
| RUN uv sync --all-groups | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| FROM python:3.13-slim | ||
|
|
||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
|
||
| ENV PYTHONPATH=/app/src | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends libgomp1 \ | ||
| apt-get install -y --no-install-recommends libgomp1 curl \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY pyproject.toml ./ | ||
| RUN uv sync --no-dev | ||
|
|
||
| COPY application/datamanager/ ./application/datamanager/ | ||
|
|
||
| RUN uv sync --all-packages | ||
| COPY ./src ./src | ||
|
|
||
| EXPOSE 8000 | ||
| EXPOSE 8080 | ||
|
|
||
| ENTRYPOINT ["uv", "run", "uvicorn", "application.datamanager.src.datamanager.main:application", "--host", "0.0.0.0", "--port", "8080"] | ||
| ENTRYPOINT ["uv", "run", "uvicorn", "datamanager.main:application", "--host", "0.0.0.0", "--port", "8080", "--app-dir", "src"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,14 @@ | |
| name = "datamanager" | ||
| version = "0.1.0" | ||
| description = "Data management service" | ||
| requires-python = ">=3.13" | ||
| requires-python = ">=3.12" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No issues just checking we're okay downgrading to 3.12. |
||
| dependencies = [ | ||
| "fastapi>=0.115.12", | ||
| "uvicorn>=0.34.2", | ||
| "duckdb>=1.2.2", | ||
| "polars>=1.29.0", | ||
| "pyarrow>=20.0.0", | ||
| "datamanager" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this actually needed now? |
||
| ] | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| FROM python:3.13-slim | ||
|
|
||
| FROM python:3.13 | ||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
|
||
| ENV PYTHONPATH=/app/src | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY pyproject.toml ./ | ||
| RUN uv sync --no-dev | ||
|
|
||
| COPY application/positionmanager/ ./application/positionmanager/ | ||
|
|
||
| RUN uv sync --all-packages | ||
| COPY ./src ./src | ||
|
|
||
| EXPOSE 8080 | ||
|
|
||
| ENTRYPOINT ["uv", "run", "uvicorn", "application.positionmanager.src.positionmanager.main:application", "--host", "0.0.0.0", "--port", "8080"] | ||
| ENTRYPOINT ["uv", "run", "uvicorn", "positionmanager.main:application", "--host", "0.0.0.0", "--port", "8080", "--app-dir", "src"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing leading empty line. |
||
| services: | ||
| tests: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile.test | ||
| volumes: | ||
| - .:/tests | ||
| command: | ||
| - /bin/sh | ||
| - -euxc | ||
| - | | ||
| uv run coverage run --parallel-mode -m pytest && \ | ||
| uv run coverage combine && \ | ||
| uv run coverage report && \ | ||
| uv run coverage xml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,9 @@ | |
| name = "pocketsizefund" | ||
| version = "0.1.0" | ||
| description = "Open source quantitative hedge fund 🍊" | ||
| requires-python = ">=3.13" | ||
| requires-python = ">=3.12" | ||
|
chrisaddy marked this conversation as resolved.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question. |
||
| dependencies = [ | ||
| "pytest>=8.3.5", | ||
| "httpx>=0.28.1", | ||
| "coverage>=7.6.1", | ||
| ] | ||
|
|
||
| [tool.uv.workspace] | ||
|
|
@@ -26,3 +24,36 @@ packages = ["pocketsizefund"] | |
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "alpaca-py>=0.40.1", | ||
| "coverage>=7.8.0", | ||
| "duckdb>=1.2.2", | ||
| "ecos>=2.0.14", | ||
| "fastapi>=0.115.12", | ||
| "polars>=1.29.0", | ||
| "pyarrow>=20.0.0", | ||
| "pyportfolioopt>=1.5.6", | ||
| "pytest>=8.3.5", | ||
| "requests>=2.32.3", | ||
| ] | ||
|
|
||
|
|
||
| [tool.pytest.ini_options] | ||
| testpaths = [ | ||
| "/tests/", | ||
| "application/datamanager/tests", | ||
| "application/positionmanager/tests", | ||
| ] | ||
|
|
||
| [tool.coverage.run] | ||
| parallel = true | ||
| omit = ["*/__init__.py", "**/test_*.py"] | ||
|
|
||
| [tool.coverage.report] | ||
| show_missing = true | ||
| skip_covered = true | ||
|
|
||
| [tool.coverage.xml] | ||
| output = ".python_coverage.xml" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is version 3.13 whereas you've set the
pyproject.tomlto 3.12. Intentional?