-
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 branch 'pixi-pyroject' into 'main'
pixi with pyroject See merge request johndutchover/short-circuit-me!6
- Loading branch information
Showing
10 changed files
with
3,410 additions
and
1,699 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,25 @@ | ||
jobs: | ||
tests: | ||
name: Test ${{ matrix.environment }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
environment: | ||
- pl017 | ||
- pl018 | ||
- pl019 | ||
- pl020 | ||
- py39 | ||
- py310 | ||
- py311 | ||
- py312 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
# already installs the corresponding environment and caches it | ||
environments: ${{ matrix.environment }} | ||
- name: Install dependencies | ||
run: | | ||
pixi run --env ${{ matrix.environment }} postinstall | ||
pixi run --env ${{ matrix.environment }} test |
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 |
---|---|---|
|
@@ -400,4 +400,7 @@ secrets.toml | |
# fly ssh keys | ||
id | ||
id-cert.pub | ||
# test report | ||
report.md | ||
# End of project exclusions | ||
.pixi/* |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML | ||
|
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,3 @@ | ||
# pixi environments | ||
.pixi | ||
|
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,27 +1,34 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM python:3.10.13-slim-bookworm | ||
FROM python:3.12-slim-bookworm | ||
WORKDIR /app | ||
ENV PIXI_VERSION=latest | ||
ENV INSTALL_DIR=/usr/local/bin | ||
ENV REPO=prefix-dev/pixi | ||
ENV PLATFORM=unknown-linux-musl | ||
ENV PROJECT_NAME=pixi-in-docker | ||
ENV PYTHONPATH /app | ||
|
||
# Install apt-utils first to avoid debconf warning | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends apt-utils \ | ||
&& apt-get install -y --no-install-recommends apt-utils curl tar \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the necessary files from the repository root | ||
COPY .env pyproject.toml poetry.lock /app/ | ||
# Download and install pixi | ||
RUN if [ "$PIXI_VERSION" = "latest" ]; then \ | ||
DOWNLOAD_URL="https://github.com/$REPO/releases/latest/download/pixi-$(uname -m)-$PLATFORM.tar.gz"; \ | ||
else \ | ||
DOWNLOAD_URL="https://github.com/$REPO/releases/download/$PIXI_VERSION/pixi-$(uname -m)-$PLATFORM.tar.gz"; \ | ||
fi && \ | ||
curl -SL "$DOWNLOAD_URL" | tar -xz -C "$INSTALL_DIR" | ||
|
||
# Install poetry and project dependencies, upgrade pip first | ||
RUN pip install --upgrade pip \ | ||
&& pip install --no-cache-dir poetry \ | ||
&& poetry config virtualenvs.create false \ | ||
&& poetry install --no-interaction --no-ansi | ||
# Copy the necessary files from the repository root | ||
COPY ../pixi.toml ../pixi.lock ../pyproject.toml backend/.env /app/ | ||
|
||
# Copy the application-specific files from the backend subdirectory | ||
COPY backend/slackbolt_api.py backend/start_bolt.sh /app/ | ||
|
||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["sh", "/app/start_bolt.sh"] | ||
ENTRYPOINT ["pixi", "run", "-e", "prod", "start-d"] |
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,53 @@ | ||
[project] | ||
name = "scm-backend" | ||
version = "0.1.0" | ||
description = "Add a short description here" | ||
authors = ["John Dutchover <[email protected]>"] | ||
channels = ["conda-forge"] | ||
platforms = ["linux-aarch64", "osx-64", "osx-arm64"] | ||
|
||
[tasks] | ||
postinstall-e = "pip install --no-build-isolation --no-deps --disable-pip-version-check -e ." | ||
postinstall = "pip install --no-build-isolation --no-deps --disable-pip-version-check ." | ||
start-d = { cmd = "python slackbolt_api.py" } | ||
start = { cmd = "python slackbolt_api.py", cwd = "backend" } | ||
|
||
[dependencies] | ||
python = ">3.10,<=3.12" | ||
anyio = ">=3.7.1,<3.8" | ||
fastapi = ">=0.110.0,<0.111" | ||
slack-bolt = ">=1.18.1,<1.19" | ||
pydantic = ">=2.6.3,<2.7" | ||
uvicorn = ">=0.27.1,<0.28" | ||
requests = ">=2.31.0,<2.32" | ||
numpy = ">=1.26.4,<1.27" | ||
motor = ">=3.3.2,<3.4" | ||
dnspython = ">=2.6.1,<2.7" | ||
aiohttp = ">=3.9.3,<3.10" | ||
typing-extensions = ">=4.10.0,<4.11" | ||
watchdog = ">=4.0.0,<4.1" | ||
|
||
[host-dependencies] | ||
python = "*" | ||
pip = "*" | ||
|
||
[feature.test.dependencies] | ||
pytest = "*" | ||
pytest-md = "*" | ||
pytest-asyncio = "*" | ||
typer = ">=0.9.0" | ||
flake8 = ">=6.0.0" | ||
black = ">=23.3.0" | ||
pylint = ">=2.17.4" | ||
gitpython = ">=3.1.35" | ||
packaging = ">=22.0" | ||
|
||
[feature.test.tasks] | ||
test = "pytest --md=report.md" | ||
|
||
[environments] | ||
default = {features = ["test"], solve-group = "prod-group"} | ||
prod = {features = [], solve-group = "prod-group"} | ||
|
||
[pypi-dependencies] | ||
load-dotenv = "*" |
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,45 +1,11 @@ | ||
[tool.poetry] | ||
[project] | ||
name = "short-circuit-me" | ||
version = "0.6.1" | ||
description = "short-circuit-me poetry" | ||
authors = ["John Dutchover <[email protected]>"] | ||
readme = ["README.md", "backend/backend.README.md"] | ||
packages = [ | ||
{ include = "backend" }, | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
|
||
[tool.poetry.group.backend] | ||
|
||
[tool.poetry.group.backend.dependencies] | ||
anyio = {version = ">=4.0.0", python=">=3.10"} | ||
fastapi = {version = ">=0.103.0", python=">=3.10"} | ||
slack-bolt = {version = "^1.18.0", python=">=3.10"} | ||
python-dotenv = {version = "^1.0.0", python=">=3.10"} | ||
pydantic = {version = ">=1.8.0", python=">=3.10"} | ||
uvicorn = { version = ">=0.23.0", python=">=3.10"} | ||
requests = { version = ">=2.3.0", python=">=3.10"} | ||
watchdog = { version = "^3.0.0", python = ">=3.10" } | ||
asyncio = "^3.4.3" | ||
numpy = {version = "^1.24.3", python = ">=3.10"} | ||
motor = {version = "^3.1.2", python=">=3.10"} | ||
load-dotenv = "^0.1.0" | ||
dnspython = {version = "^2.3.0", python=">=3.10,<4.0"} | ||
aiohttp = {version = ">=3.8.5", python=">=3.10"} | ||
typing-extensions = {version = ">=4.8.0", python = ">=3.10"} | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
typer = { version = "^0.9.0", python = ">=3.10" } | ||
flake8 = { version = "^6.0.0", python=">=3.10"} | ||
black = { version = "^23.3.0", python=">=3.10"} | ||
pylint = { version = "^2.17.4", python=">=3.10"} | ||
gitpython = { version = ">=3.1.35", python = ">3.10" } | ||
packaging = { version = ">=22.0", python = "3.10" } | ||
|
||
[tool.poetry.group.test.dependencies] | ||
pytest = { version = ">=7.4.4", python = ">=3.10" } | ||
|
||
[build-system] | ||
requires = ["poetry-core", "setuptools-scm"] | ||
build-backend = "poetry.core.masonry.api" | ||
dynamic = ["version"] | ||
description = "short-circuit-me" | ||
authors = [ | ||
{name = "John Dutchover", email = "[email protected]"} | ||
] | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
|
||
[tool.setuptools] | ||
packages = ["assets", "backend"] |