Compare commits
10 commits
renovate/c
...
main
Author | SHA1 | Date | |
---|---|---|---|
1a6baa4ee4 | |||
d93a9b57e9 | |||
9d81ab38dd | |||
4356722acd | |||
f87c36bff1 | |||
ceea6b5f8a | |||
351a3ad799 | |||
f46bc185d9 | |||
ff554ddcb4 | |||
70a84ba1b4 |
10 changed files with 532 additions and 386 deletions
|
@ -1,16 +1,29 @@
|
||||||
FROM ghcr.io/astral-sh/uv:0.5.25 AS uv
|
FROM ghcr.io/astral-sh/uv:0.5.25 AS uv
|
||||||
FROM python:3.13-slim AS python
|
FROM python:3.10-slim AS python
|
||||||
FROM code.forgejo.org/forgejo/runner:6.2.0@sha256:936c4fef04f0e2bda86c325b8ef40359aeead4740a48b1d5a0c9a112f1185e45 AS forgejo-runner
|
FROM code.forgejo.org/forgejo/runner:6.2.0@sha256:936c4fef04f0e2bda86c325b8ef40359aeead4740a48b1d5a0c9a112f1185e45 AS forgejo-runner
|
||||||
|
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm@sha256:6155a486f236fd5127b76af33086029d64f64cf49dd504accb6e5f949098eb7e
|
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm@sha256:6155a486f236fd5127b76af33086029d64f64cf49dd504accb6e5f949098eb7e
|
||||||
LABEL repository="www.coastalcommits.com/cswimr/PyZipline"
|
LABEL repository="www.coastalcommits.com/cswimr/PyZipline"
|
||||||
LABEL maintainer="cswimr <seaswimmerthefsh@gmail.com>"
|
LABEL maintainer="cswimr <seaswimmerthefsh@gmail.com>"
|
||||||
|
|
||||||
|
RUN apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
# MkDocs Social dependencies
|
||||||
|
libcairo2-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libz-d \
|
||||||
|
pngquant; \
|
||||||
|
apt-get clean; \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=uv --chown=vscode: /uv /uvx /bin/
|
COPY --from=uv --chown=vscode: /uv /uvx /bin/
|
||||||
COPY --from=python --chown=vscode: /usr/local /usr/local
|
COPY --from=python --chown=vscode: /usr/local /usr/local
|
||||||
COPY --from=forgejo-runner --chown=vscode: /bin/forgejo-runner /bin/forgejo-runner
|
COPY --from=forgejo-runner --chown=vscode: /bin/forgejo-runner /bin/forgejo-runner
|
||||||
COPY --chown=vscode: .devcontainer/home/* /home/vscode/
|
COPY --chown=vscode: .devcontainer/home/* /home/vscode/
|
||||||
|
|
||||||
RUN ln -s /usr/local/bin/python3.13 /usr/local/bin/python; \
|
RUN ln -s /usr/local/bin/python3.10 /usr/local/bin/python; \
|
||||||
python --version; \
|
python --version; \
|
||||||
python -m ensurepip
|
python -m ensurepip
|
||||||
|
|
|
@ -3,8 +3,21 @@
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "devcontainer",
|
"service": "devcontainer",
|
||||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||||
|
},
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
|
"settings": {
|
||||||
|
"python.terminal.activateEnvInCurrentTerminal": true,
|
||||||
|
"python.terminal.activateEnvironment": true,
|
||||||
|
"terminal.integrated.defaultProfile.linux": "zsh",
|
||||||
|
"terminal.integrated.profiles.linux": {
|
||||||
|
"zsh": {
|
||||||
|
"path": "/bin/zsh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"charliermarsh.ruff",
|
"charliermarsh.ruff",
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
|
@ -18,6 +31,9 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"forwardPorts": [
|
||||||
|
"zipline:3000"
|
||||||
|
],
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"DISPLAY": "dummy",
|
"DISPLAY": "dummy",
|
||||||
"PYTHONUNBUFFERED": "True",
|
"PYTHONUNBUFFERED": "True",
|
||||||
|
@ -26,6 +42,6 @@
|
||||||
"UV_PYTHON_DOWNLOADS": "never",
|
"UV_PYTHON_DOWNLOADS": "never",
|
||||||
"PROJECT_DIR": "/workspaces/${localWorkspaceFolderBasename}"
|
"PROJECT_DIR": "/workspaces/${localWorkspaceFolderBasename}"
|
||||||
},
|
},
|
||||||
"postCreateCommand": "uv sync --frozen",
|
"postCreateCommand": "uv sync --frozen --group=docs",
|
||||||
"remoteUser": "vscode"
|
"remoteUser": "vscode"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
services:
|
||||||
|
devcontainer:
|
||||||
|
container_name: devcontainer
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: .devcontainer/Dockerfile
|
||||||
|
volumes:
|
||||||
|
- ../..:/workspaces:cached
|
||||||
|
network_mode: service:zipline
|
||||||
|
command: sleep infinity
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
container_name: zipline-database
|
||||||
|
image: postgres:16
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: zipline
|
||||||
|
POSTGRES_PASSWORD: zipline
|
||||||
|
POSTGRES_DATABASE: zipline
|
||||||
|
volumes:
|
||||||
|
- pg_data:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
zipline:
|
||||||
|
container_name: zipline
|
||||||
|
image: ghcr.io/diced/zipline:v4
|
||||||
|
environment:
|
||||||
|
CORE_SECRET: "4Q8PrvM8Vwe9yRSRsCuwTdQUSXLYkgt9Gvdg/7/qPgQ="
|
||||||
|
CORE_HOSTNAME: 0.0.0.0
|
||||||
|
DATABASE_URL: postgres://zipline:zipline@postgres:5432/zipline
|
||||||
|
DATASOURCE_TYPE: local
|
||||||
|
DATASOURCE_LOCAL_DIRECTORY: /zipline/uploads
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- data:/zipline/public
|
||||||
|
- themes:/zipline/themes
|
||||||
|
- uploads:/zipline/uploads
|
||||||
|
depends_on:
|
||||||
|
- "postgres"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget -q --spider http://localhost:3001 || exit 1"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
pg_data:
|
||||||
|
data:
|
||||||
|
themes:
|
||||||
|
uploads:
|
|
@ -1,6 +1,8 @@
|
||||||
name: Actions
|
name: Actions
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -15,7 +17,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
run: uv python install 3.11
|
run: uv python install 3.10
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --no-dev
|
run: uv sync --no-dev
|
||||||
|
@ -26,7 +28,7 @@ jobs:
|
||||||
- name: Upload the package
|
- name: Upload the package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: pyflowery
|
name: pyzipline
|
||||||
path: ./dist/*
|
path: ./dist/*
|
||||||
|
|
||||||
- name: Publish to CoastalCommits
|
- name: Publish to CoastalCommits
|
||||||
|
@ -55,7 +57,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
run: uv python install 3.11
|
run: uv python install 3.10
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync
|
run: uv sync
|
||||||
|
@ -77,10 +79,10 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
run: uv python install 3.11
|
run: uv python install 3.10
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --extra docs
|
run: uv sync --group docs
|
||||||
|
|
||||||
- name: Set environment variables
|
- name: Set environment variables
|
||||||
uses: actions/env@v2
|
uses: actions/env@v2
|
||||||
|
|
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,7 +1,8 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
.cache
|
.cache
|
||||||
.zipline
|
.zipline
|
||||||
|
.venv
|
||||||
dev.py
|
dev.py
|
||||||
dist/
|
dist
|
||||||
pyzipline.egg-info/
|
pyzipline.egg-info
|
||||||
site/
|
site
|
||||||
|
|
22
.vscode/settings.json
vendored
Normal file
22
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"[python]": {
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll": "explicit"
|
||||||
|
},
|
||||||
|
"editor.defaultFormatter": "charliermarsh.ruff"
|
||||||
|
},
|
||||||
|
"[json]": {
|
||||||
|
"editor.defaultFormatter": "vscode.json-language-features"
|
||||||
|
},
|
||||||
|
"[jsonc]": {
|
||||||
|
"editor.defaultFormatter": "vscode.json-language-features"
|
||||||
|
},
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": true,
|
||||||
|
"**/__pycache__": true,
|
||||||
|
"**/.ruff_cache": true,
|
||||||
|
"**/.mypy_cache": true,
|
||||||
|
"**/*.egg-info": true,
|
||||||
|
}
|
||||||
|
}
|
27
.vscode/tasks.json
vendored
Normal file
27
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "MkDocs: Build Documentation",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "uv",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"mkdocs",
|
||||||
|
"build",
|
||||||
|
],
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Forgejo Actions: Run Actions",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "forgejo-runner",
|
||||||
|
"args": [
|
||||||
|
"exec",
|
||||||
|
"--default-actions-url=https://www.coastalcommits.com",
|
||||||
|
"--gitea-instance=https://www.coastalcommits.com"
|
||||||
|
],
|
||||||
|
"problemMatcher": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -6,26 +6,15 @@ authors = [{name="cswimr", email="seaswimmerthefsh@gmail.com"}]
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = [
|
dependencies = ["aiohttp>=3.10.10", "asyncio>=3.4.3", "pydantic>=2.10.6"]
|
||||||
"aiohttp>=3.10.10",
|
|
||||||
"asyncio>=3.4.3",
|
|
||||||
"pydantic>=2.9.2",
|
|
||||||
"requests>=2.32.3",
|
|
||||||
]
|
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[dependency-groups]
|
||||||
docs = [
|
docs = [
|
||||||
"mkdocs>=1.6.1",
|
"mkdocs>=1.6.1",
|
||||||
"mkdocs-git-authors-plugin>=0.9.0",
|
"mkdocs-git-authors-plugin>=0.9.2",
|
||||||
"mkdocstrings[python]>=0.26.2",
|
"mkdocs-git-revision-date-localized-plugin>=1.3.0",
|
||||||
"mkdocs-git-revision-date-localized-plugin>=1.2.9",
|
"mkdocs-material[imaging]>=9.5.50",
|
||||||
"mkdocs-material[imaging]>=9.5.42",
|
"mkdocs-redirects>=1.2.2",
|
||||||
"mkdocs-redirects>=1.2.1",
|
"mkdocstrings[python]>=0.27.0",
|
||||||
]
|
|
||||||
|
|
||||||
[tool.uv]
|
|
||||||
dev-dependencies = [
|
|
||||||
"datamodel-code-generator>=0.26.2",
|
|
||||||
"pylint>=3.3.1",
|
|
||||||
"ruff>=0.7.0",
|
|
||||||
]
|
]
|
||||||
|
dev = ["datamodel-code-generator>=0.26.5", "pylint>=3.3.4", "ruff>=0.9.3"]
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"local>cc/renovate-config"
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue