celeste-ai 0.0.1__tar.gz โ 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of celeste-ai might be problematic. Click here for more details.
- celeste_ai-0.0.3/.env.example +38 -0
- celeste_ai-0.0.3/.github/actions/setup-python-uv/action.yml +23 -0
- celeste_ai-0.0.3/.github/workflows/ci.yml +95 -0
- celeste_ai-0.0.3/.github/workflows/claude-code-review.yml +57 -0
- celeste_ai-0.0.3/.github/workflows/claude.yml +50 -0
- celeste_ai-0.0.3/.github/workflows/publish.yml +142 -0
- celeste_ai-0.0.3/.gitignore +159 -0
- celeste_ai-0.0.3/.pre-commit-config.yaml +61 -0
- celeste_ai-0.0.3/LICENSE +201 -0
- celeste_ai-0.0.3/Makefile +81 -0
- celeste_ai-0.0.3/PKG-INFO +163 -0
- celeste_ai-0.0.3/README.md +134 -0
- celeste_ai-0.0.3/logo.svg +11 -0
- celeste_ai-0.0.3/pyproject.toml +150 -0
- celeste_ai-0.0.3/src/__init__.py +0 -0
- celeste_ai-0.0.3/src/celeste/__init__.py +116 -0
- celeste_ai-0.0.3/src/celeste/artifacts.py +52 -0
- celeste_ai-0.0.3/src/celeste/client.py +150 -0
- celeste_ai-0.0.3/src/celeste/constraints.py +180 -0
- celeste_ai-0.0.3/src/celeste/core.py +52 -0
- celeste_ai-0.0.3/src/celeste/credentials.py +108 -0
- celeste_ai-0.0.3/src/celeste/http.py +201 -0
- celeste_ai-0.0.3/src/celeste/io.py +43 -0
- celeste_ai-0.0.3/src/celeste/mime_types.py +47 -0
- celeste_ai-0.0.3/src/celeste/models.py +91 -0
- celeste_ai-0.0.3/src/celeste/parameters.py +51 -0
- celeste_ai-0.0.3/src/celeste/py.typed +1 -0
- celeste_ai-0.0.3/src/celeste/streaming.py +114 -0
- celeste_ai-0.0.3/tests/unit_tests/test_artifacts.py +209 -0
- celeste_ai-0.0.3/tests/unit_tests/test_client.py +511 -0
- celeste_ai-0.0.3/tests/unit_tests/test_constraints.py +337 -0
- celeste_ai-0.0.3/tests/unit_tests/test_core.py +174 -0
- celeste_ai-0.0.3/tests/unit_tests/test_credentials.py +370 -0
- celeste_ai-0.0.3/tests/unit_tests/test_http.py +833 -0
- celeste_ai-0.0.3/tests/unit_tests/test_init.py +153 -0
- celeste_ai-0.0.3/tests/unit_tests/test_mime_types.py +155 -0
- celeste_ai-0.0.3/tests/unit_tests/test_models.py +338 -0
- celeste_ai-0.0.3/tests/unit_tests/test_parameters.py +58 -0
- celeste_ai-0.0.3/tests/unit_tests/test_streaming.py +688 -0
- celeste_ai-0.0.1/.gitignore +0 -22
- celeste_ai-0.0.1/PKG-INFO +0 -59
- celeste_ai-0.0.1/README.md +0 -39
- celeste_ai-0.0.1/pyproject.toml +0 -30
- celeste_ai-0.0.1/src/celeste/__init__.py +0 -25
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Celeste AI - Environment Variables
|
|
2
|
+
# Copy this file to .env and fill in your API keys
|
|
3
|
+
|
|
4
|
+
# OpenAI
|
|
5
|
+
OPENAI_API_KEY=your-openai-api-key-here
|
|
6
|
+
|
|
7
|
+
# Anthropic
|
|
8
|
+
ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
|
9
|
+
|
|
10
|
+
# Google
|
|
11
|
+
GOOGLE_API_KEY=your-google-api-key-here
|
|
12
|
+
|
|
13
|
+
# Mistral
|
|
14
|
+
MISTRAL_API_KEY=your-mistral-api-key-here
|
|
15
|
+
|
|
16
|
+
# Hugging Face
|
|
17
|
+
HUGGINGFACE_TOKEN=your-huggingface-token-here
|
|
18
|
+
|
|
19
|
+
# Stability AI
|
|
20
|
+
STABILITYAI_API_KEY=your-stabilityai-api-key-here
|
|
21
|
+
|
|
22
|
+
# Replicate
|
|
23
|
+
REPLICATE_API_TOKEN=your-replicate-api-token-here
|
|
24
|
+
|
|
25
|
+
# Cohere
|
|
26
|
+
COHERE_API_KEY=your-cohere-api-key-here
|
|
27
|
+
|
|
28
|
+
# xAI
|
|
29
|
+
XAI_API_KEY=your-xai-api-key-here
|
|
30
|
+
|
|
31
|
+
# Luma
|
|
32
|
+
LUMA_API_KEY=your-luma-api-key-here
|
|
33
|
+
|
|
34
|
+
# Topaz Labs
|
|
35
|
+
TOPAZLABS_API_KEY=your-topazlabs-api-key-here
|
|
36
|
+
|
|
37
|
+
# Perplexity
|
|
38
|
+
PERPLEXITY_API_KEY=your-perplexity-api-key-here
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: 'Setup Python and uv'
|
|
2
|
+
description: 'Set up Python, install uv package manager, and sync project dependencies with workspace support'
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
python-version:
|
|
6
|
+
required: false
|
|
7
|
+
default: '3.12'
|
|
8
|
+
group-deps:
|
|
9
|
+
required: false
|
|
10
|
+
default: 'dev'
|
|
11
|
+
|
|
12
|
+
runs:
|
|
13
|
+
using: 'composite'
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: ${{ inputs.python-version }}
|
|
18
|
+
- uses: astral-sh/setup-uv@v3
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
cache-dependency-glob: '**/pyproject.toml'
|
|
22
|
+
- shell: bash
|
|
23
|
+
run: uv sync --all-packages --group ${{ inputs.group-deps }}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main, develop]
|
|
9
|
+
workflow_call:
|
|
10
|
+
inputs:
|
|
11
|
+
python-version:
|
|
12
|
+
required: false
|
|
13
|
+
type: string
|
|
14
|
+
default: '3.12'
|
|
15
|
+
skip-tests:
|
|
16
|
+
required: false
|
|
17
|
+
type: boolean
|
|
18
|
+
default: false
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
format-check:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 1
|
|
30
|
+
- uses: ./.github/actions/setup-python-uv
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
33
|
+
- run: uv run ruff format --check src/celeste tests/
|
|
34
|
+
|
|
35
|
+
lint:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
fetch-depth: 1
|
|
41
|
+
- uses: ./.github/actions/setup-python-uv
|
|
42
|
+
with:
|
|
43
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
44
|
+
- run: uv run ruff check --output-format=github src/celeste tests/
|
|
45
|
+
|
|
46
|
+
type-check:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 1
|
|
52
|
+
- uses: ./.github/actions/setup-python-uv
|
|
53
|
+
with:
|
|
54
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
55
|
+
- run: uv run mypy -p celeste && uv run mypy tests/
|
|
56
|
+
|
|
57
|
+
security:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
with:
|
|
62
|
+
fetch-depth: 1
|
|
63
|
+
- uses: ./.github/actions/setup-python-uv
|
|
64
|
+
with:
|
|
65
|
+
python-version: ${{ inputs.python-version || '3.12' }}
|
|
66
|
+
- run: uv run bandit -c pyproject.toml -r src/ -f screen
|
|
67
|
+
|
|
68
|
+
test:
|
|
69
|
+
if: ${{ !inputs.skip-tests }}
|
|
70
|
+
runs-on: ${{ matrix.os }}
|
|
71
|
+
strategy:
|
|
72
|
+
fail-fast: false
|
|
73
|
+
matrix:
|
|
74
|
+
python-version: ["3.12", "3.13"]
|
|
75
|
+
os: [ubuntu-latest]
|
|
76
|
+
include:
|
|
77
|
+
- python-version: "3.12"
|
|
78
|
+
os: windows-latest
|
|
79
|
+
- python-version: "3.12"
|
|
80
|
+
os: macos-latest
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@v4
|
|
83
|
+
with:
|
|
84
|
+
fetch-depth: 1
|
|
85
|
+
- uses: ./.github/actions/setup-python-uv
|
|
86
|
+
with:
|
|
87
|
+
python-version: ${{ matrix.python-version }}
|
|
88
|
+
- run: uv run pytest tests/ -v --cov=celeste --cov-report=term-missing --cov-report=xml --cov-report=html --cov-fail-under=90
|
|
89
|
+
- uses: codecov/codecov-action@v4
|
|
90
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
91
|
+
with:
|
|
92
|
+
file: ./coverage.xml
|
|
93
|
+
flags: unittests
|
|
94
|
+
name: codecov-umbrella
|
|
95
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Claude Code Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize]
|
|
6
|
+
# Optional: Only run on specific file changes
|
|
7
|
+
# paths:
|
|
8
|
+
# - "src/**/*.ts"
|
|
9
|
+
# - "src/**/*.tsx"
|
|
10
|
+
# - "src/**/*.js"
|
|
11
|
+
# - "src/**/*.jsx"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
claude-review:
|
|
15
|
+
# Optional: Filter by PR author
|
|
16
|
+
# if: |
|
|
17
|
+
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
18
|
+
# github.event.pull_request.user.login == 'new-developer' ||
|
|
19
|
+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
20
|
+
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
pull-requests: read
|
|
25
|
+
issues: read
|
|
26
|
+
id-token: write
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 1
|
|
33
|
+
|
|
34
|
+
- name: Run Claude Code Review
|
|
35
|
+
id: claude-review
|
|
36
|
+
uses: anthropics/claude-code-action@v1
|
|
37
|
+
with:
|
|
38
|
+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
39
|
+
prompt: |
|
|
40
|
+
REPO: ${{ github.repository }}
|
|
41
|
+
PR NUMBER: ${{ github.event.pull_request.number }}
|
|
42
|
+
|
|
43
|
+
Please review this pull request and provide feedback on:
|
|
44
|
+
- Code quality and best practices
|
|
45
|
+
- Potential bugs or issues
|
|
46
|
+
- Performance considerations
|
|
47
|
+
- Security concerns
|
|
48
|
+
- Test coverage
|
|
49
|
+
|
|
50
|
+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
|
|
51
|
+
|
|
52
|
+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
|
|
53
|
+
|
|
54
|
+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
55
|
+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
|
|
56
|
+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
|
|
57
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Claude Code
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [created]
|
|
6
|
+
pull_request_review_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
issues:
|
|
9
|
+
types: [opened, assigned]
|
|
10
|
+
pull_request_review:
|
|
11
|
+
types: [submitted]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
claude:
|
|
15
|
+
if: |
|
|
16
|
+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
17
|
+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
18
|
+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
19
|
+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
pull-requests: read
|
|
24
|
+
issues: read
|
|
25
|
+
id-token: write
|
|
26
|
+
actions: read # Required for Claude to read CI results on PRs
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 1
|
|
32
|
+
|
|
33
|
+
- name: Run Claude Code
|
|
34
|
+
id: claude
|
|
35
|
+
uses: anthropics/claude-code-action@v1
|
|
36
|
+
with:
|
|
37
|
+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
38
|
+
|
|
39
|
+
# This is an optional setting that allows Claude to read CI results on PRs
|
|
40
|
+
additional_permissions: |
|
|
41
|
+
actions: read
|
|
42
|
+
|
|
43
|
+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
|
44
|
+
# prompt: 'Update the pull request description to include a summary of changes.'
|
|
45
|
+
|
|
46
|
+
# Optional: Add claude_args to customize behavior and configuration
|
|
47
|
+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
48
|
+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
|
|
49
|
+
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
50
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
validate-release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
outputs:
|
|
15
|
+
version: ${{ steps.extract-version.outputs.tag_version }}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- id: extract-version
|
|
19
|
+
run: |
|
|
20
|
+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
|
|
21
|
+
echo "tag_version=$TAG_VERSION" >> $GITHUB_OUTPUT
|
|
22
|
+
- id: read-version
|
|
23
|
+
run: |
|
|
24
|
+
python3 << EOF
|
|
25
|
+
import tomllib
|
|
26
|
+
with open('pyproject.toml', 'rb') as f:
|
|
27
|
+
data = tomllib.load(f)
|
|
28
|
+
version = data['project']['version']
|
|
29
|
+
print(f"pyproject_version={version}", file=open('$GITHUB_OUTPUT', 'a'))
|
|
30
|
+
EOF
|
|
31
|
+
- run: |
|
|
32
|
+
TAG_VERSION="${{ steps.extract-version.outputs.tag_version }}"
|
|
33
|
+
PYPROJECT_VERSION="${{ steps.read-version.outputs.pyproject_version }}"
|
|
34
|
+
if [ "$TAG_VERSION" != "$PYPROJECT_VERSION" ]; then
|
|
35
|
+
echo "Version mismatch: tag=$TAG_VERSION, pyproject=$PYPROJECT_VERSION"
|
|
36
|
+
exit 1
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
run-ci:
|
|
40
|
+
needs: validate-release
|
|
41
|
+
uses: ./.github/workflows/ci.yml
|
|
42
|
+
secrets: inherit
|
|
43
|
+
|
|
44
|
+
build:
|
|
45
|
+
needs: [validate-release, run-ci]
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
with:
|
|
50
|
+
fetch-depth: 1
|
|
51
|
+
- uses: ./.github/actions/setup-python-uv
|
|
52
|
+
- run: uv build
|
|
53
|
+
- run: |
|
|
54
|
+
uv pip install twine
|
|
55
|
+
uv run twine check dist/*
|
|
56
|
+
- uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: dist
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
publish-testpypi:
|
|
62
|
+
needs: [build]
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
environment:
|
|
65
|
+
name: testpypi
|
|
66
|
+
url: https://test.pypi.org/project/celeste-ai/
|
|
67
|
+
permissions:
|
|
68
|
+
id-token: write
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/download-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
name: dist
|
|
73
|
+
path: dist/
|
|
74
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
75
|
+
with:
|
|
76
|
+
repository-url: https://test.pypi.org/legacy/
|
|
77
|
+
skip-existing: true
|
|
78
|
+
print-hash: true
|
|
79
|
+
|
|
80
|
+
publish-pypi:
|
|
81
|
+
needs: [publish-testpypi]
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
environment:
|
|
84
|
+
name: pypi
|
|
85
|
+
url: https://pypi.org/project/celeste-ai/
|
|
86
|
+
permissions:
|
|
87
|
+
id-token: write
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/download-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: dist
|
|
92
|
+
path: dist/
|
|
93
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
94
|
+
with:
|
|
95
|
+
skip-existing: true
|
|
96
|
+
print-hash: true
|
|
97
|
+
|
|
98
|
+
github-release:
|
|
99
|
+
needs: [publish-pypi]
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
with:
|
|
104
|
+
fetch-depth: 0
|
|
105
|
+
- uses: actions/download-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
name: dist
|
|
108
|
+
path: dist/
|
|
109
|
+
- id: extract-version
|
|
110
|
+
run: |
|
|
111
|
+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
|
|
112
|
+
echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT
|
|
113
|
+
- id: changelog
|
|
114
|
+
run: |
|
|
115
|
+
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
|
116
|
+
if [ -z "$PREVIOUS_TAG" ]; then
|
|
117
|
+
CHANGELOG=$(git log --pretty=format:'- %s' --reverse || echo "Initial release")
|
|
118
|
+
else
|
|
119
|
+
CHANGELOG=$(git log ${PREVIOUS_TAG}..HEAD --pretty=format:'- %s' || echo "No changes")
|
|
120
|
+
fi
|
|
121
|
+
{
|
|
122
|
+
echo 'changelog<<EOF'
|
|
123
|
+
echo "$CHANGELOG"
|
|
124
|
+
echo 'EOF'
|
|
125
|
+
} >> $GITHUB_OUTPUT
|
|
126
|
+
- uses: softprops/action-gh-release@v1
|
|
127
|
+
with:
|
|
128
|
+
tag_name: ${{ github.ref }}
|
|
129
|
+
name: Release v${{ steps.extract-version.outputs.version }}
|
|
130
|
+
body: |
|
|
131
|
+
## Release v${{ steps.extract-version.outputs.version }}
|
|
132
|
+
|
|
133
|
+
### Changes
|
|
134
|
+
${{ steps.changelog.outputs.changelog }}
|
|
135
|
+
|
|
136
|
+
### Installation
|
|
137
|
+
```bash
|
|
138
|
+
uv add "celeste-ai==${{ steps.extract-version.outputs.version }}"
|
|
139
|
+
```
|
|
140
|
+
files: dist/*
|
|
141
|
+
draft: false
|
|
142
|
+
prerelease: false
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
.pybuilder/
|
|
74
|
+
target/
|
|
75
|
+
|
|
76
|
+
# Jupyter Notebook
|
|
77
|
+
.ipynb_checkpoints
|
|
78
|
+
|
|
79
|
+
# IPython
|
|
80
|
+
profile_default/
|
|
81
|
+
ipython_config.py
|
|
82
|
+
|
|
83
|
+
# pyenv
|
|
84
|
+
.python-version
|
|
85
|
+
|
|
86
|
+
# pipenv
|
|
87
|
+
Pipfile.lock
|
|
88
|
+
|
|
89
|
+
# poetry
|
|
90
|
+
poetry.lock
|
|
91
|
+
|
|
92
|
+
# pdm
|
|
93
|
+
.pdm.toml
|
|
94
|
+
.pdm-python
|
|
95
|
+
.pdm-build/
|
|
96
|
+
|
|
97
|
+
# PEP 582
|
|
98
|
+
__pypackages__/
|
|
99
|
+
|
|
100
|
+
# Celery stuff
|
|
101
|
+
celerybeat-schedule
|
|
102
|
+
celerybeat.pid
|
|
103
|
+
|
|
104
|
+
# SageMath parsed files
|
|
105
|
+
*.sage.py
|
|
106
|
+
|
|
107
|
+
# Environments
|
|
108
|
+
.env
|
|
109
|
+
.venv
|
|
110
|
+
env/
|
|
111
|
+
venv/
|
|
112
|
+
ENV/
|
|
113
|
+
env.bak/
|
|
114
|
+
venv.bak/
|
|
115
|
+
|
|
116
|
+
# Spyder project settings
|
|
117
|
+
.spyderproject
|
|
118
|
+
.spyproject
|
|
119
|
+
|
|
120
|
+
# Rope project settings
|
|
121
|
+
.ropeproject
|
|
122
|
+
|
|
123
|
+
# mkdocs documentation
|
|
124
|
+
/site
|
|
125
|
+
|
|
126
|
+
# mypy
|
|
127
|
+
.mypy_cache/
|
|
128
|
+
.dmypy.json
|
|
129
|
+
dmypy.json
|
|
130
|
+
|
|
131
|
+
# Pyre type checker
|
|
132
|
+
.pyre/
|
|
133
|
+
|
|
134
|
+
# pytype static type analyzer
|
|
135
|
+
.pytype/
|
|
136
|
+
|
|
137
|
+
# Cython debug symbols
|
|
138
|
+
cython_debug/
|
|
139
|
+
|
|
140
|
+
# IDEs
|
|
141
|
+
.vscode/
|
|
142
|
+
.idea/
|
|
143
|
+
*.swp
|
|
144
|
+
*.swo
|
|
145
|
+
*~
|
|
146
|
+
.DS_Store
|
|
147
|
+
|
|
148
|
+
# Backup files
|
|
149
|
+
*.bak
|
|
150
|
+
|
|
151
|
+
# UV
|
|
152
|
+
.uv/
|
|
153
|
+
uv.lock
|
|
154
|
+
|
|
155
|
+
# Ruff
|
|
156
|
+
.ruff_cache/
|
|
157
|
+
|
|
158
|
+
# Security reports
|
|
159
|
+
bandit-report.json
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
repos:
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v6.0.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: no-commit-to-branch
|
|
7
|
+
name: "๐ซ Prevent commits to protected branches"
|
|
8
|
+
args: [--branch, main, --branch, master, --branch, develop]
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
- id: end-of-file-fixer
|
|
11
|
+
- id: check-yaml
|
|
12
|
+
- id: check-added-large-files
|
|
13
|
+
- id: check-toml
|
|
14
|
+
- id: check-merge-conflict
|
|
15
|
+
- id: check-json
|
|
16
|
+
- id: debug-statements # Prevents committing print()/pdb.set_trace() debug statements
|
|
17
|
+
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.14.3
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff-check
|
|
22
|
+
args: [--fix]
|
|
23
|
+
files: ^(src/celeste|tests)/
|
|
24
|
+
name: "๐ Lint with Ruff"
|
|
25
|
+
- id: ruff-format
|
|
26
|
+
files: ^(src/celeste|tests)/
|
|
27
|
+
name: "๐ Format with Ruff"
|
|
28
|
+
|
|
29
|
+
- repo: local
|
|
30
|
+
hooks:
|
|
31
|
+
- id: mypy
|
|
32
|
+
name: "๐ Type check with mypy"
|
|
33
|
+
entry: uv run mypy -p celeste
|
|
34
|
+
language: system
|
|
35
|
+
types: [python]
|
|
36
|
+
pass_filenames: false
|
|
37
|
+
- id: mypy-tests
|
|
38
|
+
name: "๐ Type check tests with mypy"
|
|
39
|
+
entry: uv run mypy tests/
|
|
40
|
+
language: system
|
|
41
|
+
types: [python]
|
|
42
|
+
pass_filenames: false
|
|
43
|
+
|
|
44
|
+
- repo: https://github.com/PyCQA/bandit
|
|
45
|
+
rev: 1.8.6
|
|
46
|
+
hooks:
|
|
47
|
+
- id: bandit
|
|
48
|
+
name: "๐ Security check with Bandit"
|
|
49
|
+
args: ["-c", "pyproject.toml", "-r", "src/"]
|
|
50
|
+
additional_dependencies: ["bandit[toml]"]
|
|
51
|
+
|
|
52
|
+
- repo: local
|
|
53
|
+
hooks:
|
|
54
|
+
- id: pytest
|
|
55
|
+
name: "๐งช Run tests with coverage"
|
|
56
|
+
entry: uv run pytest tests/ --cov=celeste --cov-report=term-missing
|
|
57
|
+
language: system
|
|
58
|
+
types: [python]
|
|
59
|
+
pass_filenames: false
|
|
60
|
+
always_run: true
|
|
61
|
+
stages: [pre-push] # Run on push, not commit (keeps commits fast)
|