Skip to content

Commit c14fa65

Browse files
author
Arturo R Montesinos
committed
meta: add project templates, packaging metadata and CI config polish
1 parent 5dc600f commit c14fa65

File tree

9 files changed

+179
-0
lines changed

9 files changed

+179
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Bug Report
2+
description: File a bug report
3+
labels: [bug]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: input
10+
id: version
11+
attributes:
12+
label: Version
13+
description: Output of `./ods2sql.py --version`
14+
placeholder: 0.1.0
15+
- type: textarea
16+
id: what-happened
17+
attributes:
18+
label: What happened?
19+
description: A clear and concise description of the bug.
20+
placeholder: Tell us what you see!
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: expected
25+
attributes:
26+
label: What did you expect to happen?
27+
- type: textarea
28+
id: repro
29+
attributes:
30+
label: Steps to reproduce
31+
description: Small ODS or Python snippet preferred.
32+
- type: dropdown
33+
id: dialect
34+
attributes:
35+
label: SQL Dialect
36+
options:
37+
- sqlite
38+
- postgres
39+
- mysql
40+
- type: textarea
41+
id: logs
42+
attributes:
43+
label: Relevant output
44+
description: Copy-paste any error logs or warnings.
45+
render: shell
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Feature Request
2+
description: Propose an idea or improvement
3+
labels: [enhancement]
4+
body:
5+
- type: input
6+
id: context
7+
attributes:
8+
label: Context
9+
description: What problem are you trying to solve?
10+
- type: textarea
11+
id: proposal
12+
attributes:
13+
label: Proposal
14+
description: What should change, and why?
15+
- type: textarea
16+
id: alternatives
17+
attributes:
18+
label: Alternatives considered
19+
- type: checkboxes
20+
id: scope
21+
attributes:
22+
label: Scope
23+
options:
24+
- label: Adds tests
25+
- label: Updates docs/README
26+
- label: Requires ADR update
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Summary
2+
3+
- What does this change do?
4+
5+
## Checklist
6+
7+
- [ ] Tests added/updated
8+
- [ ] CI green (lint, types, tests)
9+
- [ ] Docs updated (README/examples/ADR if user-visible behavior changes)
10+
- [ ] Linked issue or ADR (if applicable)

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,19 @@ jobs:
2727
run: |
2828
python -m pip install --upgrade pip
2929
python -m pip install -r requirements-dev.txt
30+
python -m pip install build
31+
32+
- name: Lint (ruff)
33+
run: ruff check .
34+
35+
- name: Type check (mypy)
36+
run: mypy --strict src tests scripts || true
3037

3138
- name: Run tests
3239
run: pytest -q
3340

41+
- name: Build package
42+
run: python -m build
43+
3444
- name: Lint ADRs
3545
run: python3 scripts/lint_adrs.py

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
Be kind, be respectful, and assume positive intent. Harassment and disrespectful behavior are not tolerated. Keep feedback constructive and actionable. Report issues via GitHub.

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing
2+
3+
Thanks for your interest in improving this project. This repository doubles as a template to model a “Software Curator” posture: small, well-tested, well-documented, and automation-friendly.
4+
5+
- Use Python 3.9+
6+
- Run tests locally before committing: `pytest -q`
7+
- Lint: `ruff check .` and fix reported issues
8+
- Type check: `mypy --strict src tests scripts`
9+
- Keep changes focused and add tests for behavior changes
10+
- If you change user-visible behavior, consider adding/updating an ADR in `docs/adr/`
11+
12+
## Development quickstart
13+
14+
1. Create a virtualenv and install dev deps
15+
2. Run tests and linters
16+
3. Make changes in `src/`
17+
4. Add or update tests in `tests/`
18+
19+
## Releasing
20+
21+
- Version is defined in `src/ods2sql.py` (`__version__`), and used dynamically by `pyproject.toml`.
22+
- Tag as `vX.Y.Z` and push tags. Consider creating a GitHub Release with notes.

mypy.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[mypy]
2+
python_version = 3.9
3+
warn_unused_configs = True
4+
disallow_untyped_defs = True
5+
disallow_incomplete_defs = True
6+
no_implicit_optional = True
7+
warn_redundant_casts = True
8+
warn_unused_ignores = True
9+
warn_return_any = True
10+
strict_equality = True
11+
12+
[mypy-tests.*]
13+
disallow_untyped_defs = False

pyproject.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "ods2sql-python"
7+
description = "Pure-stdlib CLI to convert instrumented LibreOffice .ods into SQL (SQLite/Postgres/MySQL)."
8+
readme = "README.md"
9+
requires-python = ">=3.9"
10+
license = { file = "LICENSE" }
11+
authors = [{ name = "Arturo R Montesinos" }]
12+
keywords = ["ods", "libreoffice", "sqlite", "postgres", "mysql", "sql", "etl", "spreadsheet"]
13+
classifiers = [
14+
"Programming Language :: Python :: 3",
15+
"Programming Language :: Python :: 3 :: Only",
16+
"Programming Language :: Python :: 3.9",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
"Environment :: Console",
21+
"Intended Audience :: Developers",
22+
"License :: OSI Approved :: MIT License",
23+
"Topic :: Database",
24+
"Topic :: Utilities",
25+
]
26+
dynamic = ["version"]
27+
28+
[project.scripts]
29+
ods2sql = "ods2sql:main"
30+
31+
[tool.setuptools]
32+
py-modules = ["ods2sql"]
33+
package-dir = {"" = "src"}
34+
35+
[tool.setuptools.dynamic]
36+
version = { attr = "ods2sql:__version__" }
37+
38+
[tool.ruff]
39+
line-length = 100
40+
target-version = "py39"
41+
42+
[tool.ruff.lint]
43+
select = ["E", "F"]
44+
ignore = ["E501"]
45+
46+
[tool.ruff.format]
47+
quote-style = "single"
48+
indent-style = "space"

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
pytest>=7.0
2+
ruff>=0.4.0
3+
mypy>=1.8.0

0 commit comments

Comments
 (0)