Compare commits
4 commits
main
...
renovate/c
Author | SHA1 | Date | |
---|---|---|---|
d044c97c47 | |||
34c6ec0a62 | |||
2909ff1ff5 | |||
ab7bf2be1c |
10 changed files with 386 additions and 532 deletions
|
@ -1,29 +1,16 @@
|
||||||
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.10-slim AS python
|
FROM python:3.13-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.10 /usr/local/bin/python; \
|
RUN ln -s /usr/local/bin/python3.13 /usr/local/bin/python; \
|
||||||
python --version; \
|
python --version; \
|
||||||
python -m ensurepip
|
python -m ensurepip
|
||||||
|
|
|
@ -3,21 +3,8 @@
|
||||||
"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",
|
||||||
|
@ -31,9 +18,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"forwardPorts": [
|
|
||||||
"zipline:3000"
|
|
||||||
],
|
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"DISPLAY": "dummy",
|
"DISPLAY": "dummy",
|
||||||
"PYTHONUNBUFFERED": "True",
|
"PYTHONUNBUFFERED": "True",
|
||||||
|
@ -42,6 +26,6 @@
|
||||||
"UV_PYTHON_DOWNLOADS": "never",
|
"UV_PYTHON_DOWNLOADS": "never",
|
||||||
"PROJECT_DIR": "/workspaces/${localWorkspaceFolderBasename}"
|
"PROJECT_DIR": "/workspaces/${localWorkspaceFolderBasename}"
|
||||||
},
|
},
|
||||||
"postCreateCommand": "uv sync --frozen --group=docs",
|
"postCreateCommand": "uv sync --frozen",
|
||||||
"remoteUser": "vscode"
|
"remoteUser": "vscode"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
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,8 +1,6 @@
|
||||||
name: Actions
|
name: Actions
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -17,7 +15,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
run: uv python install 3.10
|
run: uv python install 3.11
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --no-dev
|
run: uv sync --no-dev
|
||||||
|
@ -28,7 +26,7 @@ jobs:
|
||||||
- name: Upload the package
|
- name: Upload the package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: pyzipline
|
name: pyflowery
|
||||||
path: ./dist/*
|
path: ./dist/*
|
||||||
|
|
||||||
- name: Publish to CoastalCommits
|
- name: Publish to CoastalCommits
|
||||||
|
@ -57,7 +55,7 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
run: uv python install 3.10
|
run: uv python install 3.11
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync
|
run: uv sync
|
||||||
|
@ -79,10 +77,10 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
run: uv python install 3.10
|
run: uv python install 3.11
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --group docs
|
run: uv sync --extra docs
|
||||||
|
|
||||||
- name: Set environment variables
|
- name: Set environment variables
|
||||||
uses: actions/env@v2
|
uses: actions/env@v2
|
||||||
|
|
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,8 +1,7 @@
|
||||||
__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
22
.vscode/settings.json
vendored
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
"[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
27
.vscode/tasks.json
vendored
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
"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": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -2,19 +2,30 @@
|
||||||
name = "pyzipline"
|
name = "pyzipline"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Python API Wrapper for the Zipline API"
|
description = "Python API Wrapper for the Zipline API"
|
||||||
authors = [{ name = "cswimr", email = "seaswimmerthefsh@gmail.com" }]
|
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 = ["aiohttp>=3.10.10", "asyncio>=3.4.3", "pydantic>=2.10.6"]
|
dependencies = [
|
||||||
|
"aiohttp>=3.10.10",
|
||||||
|
"asyncio>=3.4.3",
|
||||||
|
"pydantic>=2.9.2",
|
||||||
|
"requests>=2.32.3",
|
||||||
|
]
|
||||||
|
|
||||||
[dependency-groups]
|
[project.optional-dependencies]
|
||||||
docs = [
|
docs = [
|
||||||
"mkdocs>=1.6.1",
|
"mkdocs>=1.6.1",
|
||||||
"mkdocs-git-authors-plugin>=0.9.2",
|
"mkdocs-git-authors-plugin>=0.9.0",
|
||||||
"mkdocs-git-revision-date-localized-plugin>=1.3.0",
|
"mkdocstrings[python]>=0.26.2",
|
||||||
"mkdocs-material[imaging]>=9.5.50",
|
"mkdocs-git-revision-date-localized-plugin>=1.2.9",
|
||||||
"mkdocs-redirects>=1.2.2",
|
"mkdocs-material[imaging]>=9.5.42",
|
||||||
"mkdocstrings[python]>=0.27.0",
|
"mkdocs-redirects>=1.2.1",
|
||||||
|
]
|
||||||
|
|
||||||
|
[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"]
|
|
||||||
|
|
6
renovate.json
Normal file
6
renovate.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"local>cc/renovate-config"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue