Skip to content

Commit 21c3448

Browse files
committed
Initialise from template
0 parents  commit 21c3448

22 files changed

+3392
-0
lines changed

.copier-answers.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v0.1.0-16-ga014464
3+
_src_path: [email protected]:datalab-org/datalab-app-plugin-template
4+
author_email: [email protected]
5+
author_fullname: datalab developers
6+
copyright_date: '2025'
7+
copyright_holder: datalab developers
8+
copyright_holder_email: [email protected]
9+
package_name: datalab_app_plugin_example
10+
project_name: datalab-app-plugin-example
11+
repository_name: datalab-app-plugin-example
12+
repository_namespace: datalab-org
13+
short_description: datalab-app-plugin-example
14+

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI tests
2+
on:
3+
pull_request:
4+
5+
push:
6+
branches:
7+
- main
8+
9+
env:
10+
UV_VERSION: "0.8.x"
11+
12+
concurrency:
13+
group: ${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
pre-commit:
18+
name: Run linters and other pre-commit hooks
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v5
23+
24+
- name: Set up Python 3.10
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
29+
- name: Set up uv
30+
uses: astral-sh/setup-uv@v6
31+
with:
32+
version: "${{ env.UV_VERSION }}"
33+
enable-cache: true
34+
35+
- name: Install dependencies
36+
run: |
37+
uv sync --locked --all-extras --dev
38+
39+
- name: Run pre-commit
40+
run: |
41+
uv run pre-commit run --all-files --show-diff-on-failure
42+
43+
pytest:
44+
name: Run Python unit tests
45+
46+
runs-on: ubuntu-latest
47+
48+
strategy:
49+
fail-fast: false
50+
max-parallel: 2
51+
matrix:
52+
python-version: ["3.10", "3.11"]
53+
54+
steps:
55+
- uses: actions/checkout@v5
56+
with:
57+
# tests need an unshallowed version of the repository to check the version
58+
fetch-depth: 0
59+
60+
- name: Set up Python ${{ matrix.python-version }}
61+
uses: actions/setup-python@v5
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
65+
- name: Set up uv
66+
uses: astral-sh/setup-uv@v5
67+
with:
68+
version: "${{ env.UV_VERSION }}"
69+
enable-cache: true
70+
71+
- name: Install locked versions of dependencies
72+
run: |
73+
uv sync --locked --all-extras --dev
74+
75+
- name: Run all tests
76+
run: |
77+
uv run pytest -rs -vvv ./tests

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Documentation
3+
on:
4+
pull_request:
5+
6+
release:
7+
8+
push:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build-docs:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v5
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.10'
27+
28+
- name: Set up uv
29+
uses: astral-sh/setup-uv@v6
30+
with:
31+
version: "${{ env.UV_VERSION }}"
32+
enable-cache: true
33+
34+
- name: Install dependencies
35+
run: |
36+
uv sync --locked --all-extras --dev
37+
38+
- name: Build docs
39+
run: |
40+
uv run mkdocs build --strict
41+
42+
- name: Tar doc files
43+
if: github.event_name == 'push'
44+
run: tar -cvf site.tar site
45+
46+
- name: Upload doc artifact
47+
uses: actions/upload-pages-artifact@v3
48+
if: github.event_name == 'push'
49+
with:
50+
path: ./site
51+
52+
- name: Deploy to GitHub Pages
53+
if: github.event_name == 'push'
54+
uses: actions/deploy-pages@v4
55+
id: deployment

.gitignore

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Mac stuff
10+
.DS_STORE
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
cover/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# poetry
101+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105+
#poetry.lock
106+
107+
# pdm
108+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109+
#pdm.lock
110+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111+
# in version control.
112+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
113+
.pdm.toml
114+
.pdm-python
115+
.pdm-build/
116+
117+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
118+
__pypackages__/
119+
120+
# Celery stuff
121+
celerybeat-schedule
122+
celerybeat.pid
123+
124+
# SageMath parsed files
125+
*.sage.py
126+
127+
# Environments
128+
.env
129+
.venv
130+
env/
131+
venv/
132+
ENV/
133+
env.bak/
134+
venv.bak/
135+
136+
# Spyder project settings
137+
.spyderproject
138+
.spyproject
139+
140+
# Rope project settings
141+
.ropeproject
142+
143+
# mkdocs documentation
144+
/site
145+
146+
# mypy
147+
.mypy_cache/
148+
.dmypy.json
149+
dmypy.json
150+
151+
# Pyre type checker
152+
.pyre/
153+
154+
# pytype static type analyzer
155+
.pytype/
156+
157+
# Cython debug symbols
158+
cython_debug/
159+
160+
# PyCharm
161+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
162+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
163+
# and can be added to the global gitignore or merged into this file. For a more nuclear
164+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
165+
#.idea/

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
default_language_version:
2+
python: python3.10
3+
4+
exclude: '^example_data/'
5+
6+
repos:
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v6.0.0
9+
hooks:
10+
- id: trailing-whitespace
11+
args: [--markdown-linebreak-ext=md]
12+
- id: check-yaml
13+
args: [--unsafe]
14+
- id: check-json
15+
- id: end-of-file-fixer
16+
exclude: ^.copier-answers.yml$
17+
- id: check-added-large-files
18+
args: [--maxkb=1024]
19+
- id: check-symlinks
20+
- id: mixed-line-ending
21+
22+
- repo: https://github.com/astral-sh/ruff-pre-commit
23+
rev: v0.12.9
24+
hooks:
25+
- id: ruff
26+
args: [--fix]
27+
- id: ruff-format
28+
29+
- repo: https://github.com/asottile/pyupgrade
30+
rev: v3.20.0
31+
hooks:
32+
- id: pyupgrade
33+
args: [--py310-plus]
34+
35+
- repo: https://github.com/pre-commit/mirrors-mypy
36+
rev: v1.17.1
37+
hooks:
38+
- id: mypy

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## v0.0.0
4+
5+
- Changelog created.

0 commit comments

Comments
 (0)