civic-transparency-sdk 0.1.0__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.
Files changed (106) hide show
  1. civic_transparency_sdk-0.1.0/.editorconfig +13 -0
  2. civic_transparency_sdk-0.1.0/.gitattributes +2 -0
  3. civic_transparency_sdk-0.1.0/.github/scripts/coverage_summary.py +59 -0
  4. civic_transparency_sdk-0.1.0/.github/scripts/list_artifacts.py +41 -0
  5. civic_transparency_sdk-0.1.0/.github/workflows/ci.yml +63 -0
  6. civic_transparency_sdk-0.1.0/.github/workflows/deploy-docs.yml +44 -0
  7. civic_transparency_sdk-0.1.0/.github/workflows/release.yml +70 -0
  8. civic_transparency_sdk-0.1.0/.gitignore +78 -0
  9. civic_transparency_sdk-0.1.0/.pre-commit-config.yaml +11 -0
  10. civic_transparency_sdk-0.1.0/CHANGELOG.md +39 -0
  11. civic_transparency_sdk-0.1.0/CITATION.cff +9 -0
  12. civic_transparency_sdk-0.1.0/CODE_OF_CONDUCT.md +48 -0
  13. civic_transparency_sdk-0.1.0/CONTRIBUTING.md +91 -0
  14. civic_transparency_sdk-0.1.0/LICENSE +21 -0
  15. civic_transparency_sdk-0.1.0/PKG-INFO +157 -0
  16. civic_transparency_sdk-0.1.0/README.md +107 -0
  17. civic_transparency_sdk-0.1.0/docs/en/cli.md +129 -0
  18. civic_transparency_sdk-0.1.0/docs/en/index.md +55 -0
  19. civic_transparency_sdk-0.1.0/docs/en/schema.md +168 -0
  20. civic_transparency_sdk-0.1.0/docs/en/sdk/digests.md +151 -0
  21. civic_transparency_sdk-0.1.0/docs/en/sdk/hash_core.md +180 -0
  22. civic_transparency_sdk-0.1.0/docs/en/sdk/ids.md +222 -0
  23. civic_transparency_sdk-0.1.0/docs/en/sdk/io_schema.md +208 -0
  24. civic_transparency_sdk-0.1.0/docs/en/sdk/overview.md +77 -0
  25. civic_transparency_sdk-0.1.0/docs/en/sdk/window_agg.md +137 -0
  26. civic_transparency_sdk-0.1.0/docs/en/usage.md +108 -0
  27. civic_transparency_sdk-0.1.0/mkdocs.yml +72 -0
  28. civic_transparency_sdk-0.1.0/pyproject.toml +110 -0
  29. civic_transparency_sdk-0.1.0/schema/schema.sql +16 -0
  30. civic_transparency_sdk-0.1.0/scripts_py/gen_empty_world.py +148 -0
  31. civic_transparency_sdk-0.1.0/scripts_py/jsonl_to_duckdb.py +120 -0
  32. civic_transparency_sdk-0.1.0/setup.cfg +4 -0
  33. civic_transparency_sdk-0.1.0/site/404.html +822 -0
  34. civic_transparency_sdk-0.1.0/site/assets/_mkdocstrings.css +213 -0
  35. civic_transparency_sdk-0.1.0/site/assets/images/favicon.png +0 -0
  36. civic_transparency_sdk-0.1.0/site/assets/javascripts/bundle.92b07e13.min.js +16 -0
  37. civic_transparency_sdk-0.1.0/site/assets/javascripts/bundle.92b07e13.min.js.map +7 -0
  38. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
  39. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
  40. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
  41. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
  42. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.el.min.js +1 -0
  43. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
  44. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
  45. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
  46. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.he.min.js +1 -0
  47. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
  48. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
  49. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
  50. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
  51. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
  52. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
  53. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
  54. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
  55. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
  56. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
  57. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
  58. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
  59. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
  60. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
  61. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
  62. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
  63. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
  64. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
  65. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
  66. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
  67. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
  68. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
  69. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
  70. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/tinyseg.js +206 -0
  71. civic_transparency_sdk-0.1.0/site/assets/javascripts/lunr/wordcut.js +6708 -0
  72. civic_transparency_sdk-0.1.0/site/assets/javascripts/workers/search.973d3a69.min.js +42 -0
  73. civic_transparency_sdk-0.1.0/site/assets/javascripts/workers/search.973d3a69.min.js.map +7 -0
  74. civic_transparency_sdk-0.1.0/site/assets/stylesheets/main.7e37652d.min.css +1 -0
  75. civic_transparency_sdk-0.1.0/site/assets/stylesheets/main.7e37652d.min.css.map +1 -0
  76. civic_transparency_sdk-0.1.0/site/assets/stylesheets/palette.06af60db.min.css +1 -0
  77. civic_transparency_sdk-0.1.0/site/assets/stylesheets/palette.06af60db.min.css.map +1 -0
  78. civic_transparency_sdk-0.1.0/site/cli/index.html +1197 -0
  79. civic_transparency_sdk-0.1.0/site/index.html +1070 -0
  80. civic_transparency_sdk-0.1.0/site/objects.inv +0 -0
  81. civic_transparency_sdk-0.1.0/site/schema/index.html +1279 -0
  82. civic_transparency_sdk-0.1.0/site/sdk/digests/index.html +1407 -0
  83. civic_transparency_sdk-0.1.0/site/sdk/hash_core/index.html +1457 -0
  84. civic_transparency_sdk-0.1.0/site/sdk/ids/index.html +1594 -0
  85. civic_transparency_sdk-0.1.0/site/sdk/io_schema/index.html +1480 -0
  86. civic_transparency_sdk-0.1.0/site/sdk/overview/index.html +1231 -0
  87. civic_transparency_sdk-0.1.0/site/sdk/window_agg/index.html +1447 -0
  88. civic_transparency_sdk-0.1.0/site/search/search_index.json +1 -0
  89. civic_transparency_sdk-0.1.0/site/sitemap.xml +63 -0
  90. civic_transparency_sdk-0.1.0/site/sitemap.xml.gz +0 -0
  91. civic_transparency_sdk-0.1.0/site/usage/index.html +1271 -0
  92. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/__init__.py +23 -0
  93. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/_version.py +34 -0
  94. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/cli/main.py +158 -0
  95. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/digests.py +26 -0
  96. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/hash_core.py +15 -0
  97. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/ids.py +39 -0
  98. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/io_schema.py +128 -0
  99. civic_transparency_sdk-0.1.0/src/ci/transparency/sdk/window_agg.py +35 -0
  100. civic_transparency_sdk-0.1.0/src/civic_transparency_sdk.egg-info/PKG-INFO +157 -0
  101. civic_transparency_sdk-0.1.0/src/civic_transparency_sdk.egg-info/SOURCES.txt +104 -0
  102. civic_transparency_sdk-0.1.0/src/civic_transparency_sdk.egg-info/dependency_links.txt +1 -0
  103. civic_transparency_sdk-0.1.0/src/civic_transparency_sdk.egg-info/entry_points.txt +2 -0
  104. civic_transparency_sdk-0.1.0/src/civic_transparency_sdk.egg-info/requires.txt +26 -0
  105. civic_transparency_sdk-0.1.0/src/civic_transparency_sdk.egg-info/top_level.txt +1 -0
  106. civic_transparency_sdk-0.1.0/tests/test_smoke.py +65 -0
@@ -0,0 +1,13 @@
1
+ # project .editorconfig file
2
+ root = true
3
+
4
+ [*]
5
+ # Unix-style line endings
6
+ end_of_line = lf
7
+ # Add a newline at the end of the file
8
+ insert_final_newline = true
9
+
10
+ # Use 4-space indentation for Python files
11
+ [*.py]
12
+ indent_style = space
13
+ indent_size = 4
@@ -0,0 +1,2 @@
1
+ # .gitattributes
2
+ * text=auto eol=lf
@@ -0,0 +1,59 @@
1
+ # .github/scripts/coverage_summary.py
2
+ import os
3
+ import xml.etree.ElementTree as ET
4
+ from pathlib import Path
5
+ from typing import Optional
6
+
7
+
8
+ def get_coverage_summary() -> Optional[str]:
9
+ """
10
+ Parses a coverage.xml file and returns a formatted summary.
11
+ """
12
+ cov = Path("coverage.xml")
13
+ if not cov.exists():
14
+ print("coverage.xml not found; nothing to summarize.")
15
+ return None
16
+
17
+ try:
18
+ tree = ET.parse(cov)
19
+ root = tree.getroot()
20
+
21
+ lines_valid_str = root.get("lines-valid", "0")
22
+ lines_covered_str = root.get("lines-covered", "0")
23
+ branches_valid_str = root.get("branches-valid", "0")
24
+ branches_covered_str = root.get("branches-covered", "0")
25
+
26
+ lines_valid = int(lines_valid_str) if lines_valid_str else 0
27
+ lines_covered = int(lines_covered_str) if lines_covered_str else 0
28
+ branches_valid = int(branches_valid_str) if branches_valid_str else 0
29
+ branches_covered = int(branches_covered_str) if branches_covered_str else 0
30
+
31
+ pct = (100.0 * lines_covered / lines_valid) if lines_valid else 0.0
32
+ bpct = (100.0 * branches_covered / branches_valid) if branches_valid else 0.0
33
+
34
+ return f"""### Coverage Summary
35
+ - Lines: **{lines_covered}/{lines_valid}** ({pct:.1f}%)
36
+ - Branches: **{branches_covered}/{branches_valid}** ({bpct:.1f}%)
37
+ """
38
+ except (ET.ParseError, ValueError) as e:
39
+ print(f"Error parsing coverage.xml: {e}")
40
+ return None
41
+
42
+
43
+ def main() -> None:
44
+ """
45
+ Main function to run the script.
46
+ """
47
+ summary = get_coverage_summary()
48
+
49
+ if summary:
50
+ out = os.environ.get("GITHUB_STEP_SUMMARY")
51
+ if out:
52
+ with open(out, "a", encoding="utf-8") as f:
53
+ f.write(summary)
54
+ else:
55
+ print(summary)
56
+
57
+
58
+ if __name__ == "__main__":
59
+ main()
@@ -0,0 +1,41 @@
1
+ # .github/scripts/list_artifacts.py
2
+ from __future__ import annotations
3
+
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ DIST = Path("dist")
8
+
9
+
10
+ def main() -> int:
11
+ """
12
+ List the distribution artifacts created by the build process.
13
+ """
14
+ if not DIST.exists():
15
+ print("ERROR: dist/ does not exist")
16
+ return 1
17
+
18
+ files = sorted(DIST.glob("*"))
19
+ if not files:
20
+ print("ERROR: dist/ is empty")
21
+ return 1
22
+
23
+ print("Dist files:")
24
+ for f in files:
25
+ print(" -", f)
26
+
27
+ wheels = sorted(DIST.glob("*.whl"))
28
+ sdists = sorted(DIST.glob("*.tar.gz"))
29
+
30
+ if not wheels:
31
+ print("ERROR: No wheel (*.whl) found in dist/")
32
+ return 1
33
+ if not sdists:
34
+ print("ERROR: No sdist (*.tar.gz) found in dist/")
35
+ return 1
36
+
37
+ return 0
38
+
39
+
40
+ if __name__ == "__main__":
41
+ sys.exit(main())
@@ -0,0 +1,63 @@
1
+ # .github/workflows/ci.yml
2
+ name: Civic Transparency SDK CI (Build, Lint, Test, Coverage)
3
+ # Runs on every push to the main branch and on pull requests.
4
+ # First line of defense, catches issues before they reach release.
5
+ # Designed to fail fast, run all tests, and generate coverage reports.
6
+ # It does not fix issues, only checks them.
7
+
8
+ on:
9
+ push:
10
+ branches: [ main ]
11
+ pull_request:
12
+ branches: [ main ]
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ ci:
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ matrix:
20
+ python-version: ["3.11", "3.12"]
21
+
22
+ steps:
23
+ - name: Checkout (full history for tags)
24
+ uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+
28
+ - name: Setup Python and cache ${{ matrix.python-version }}
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ cache: "pip"
33
+
34
+ - name: Assemble. Install all dev dependencies (non-editable)
35
+ run: |
36
+ pip install ".[dev]"
37
+
38
+ - name: Baseline. Ruff lint (fail fast, check only, no format or auto-fix in CI)
39
+ run: ruff check .
40
+
41
+ - name: Baseline. Run tests (include any validation and coverage)
42
+ run: pytest -q
43
+
44
+ - name: Coverage. Generate summary
45
+ run: python .github/scripts/coverage_summary.py
46
+
47
+ - name: Coverage. Build HTML
48
+ run: coverage html
49
+
50
+ - name: Coverage. Combine and Upload Reports
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: coverage-reports-${{ matrix.python-version }}
54
+ path: |
55
+ coverage.xml
56
+ htmlcov/
57
+ overwrite: true
58
+
59
+ - name: Deploy. Build package (sanity check)
60
+ run: python -m build
61
+
62
+ - name: Deploy. Build docs (sanity check)
63
+ run: mkdocs build
@@ -0,0 +1,44 @@
1
+ # .github/workflows/deploy-docs.yml
2
+ name: Deploy CT SDK Docs (always latest main)
3
+ # Designed to run on every push to the main branch.
4
+ # It builds and deploys the latest version of the documentation to GitHub Pages.
5
+
6
+ on:
7
+ push:
8
+ branches: [ main ]
9
+
10
+ jobs:
11
+ deploy:
12
+ runs-on: ubuntu-latest
13
+
14
+ permissions:
15
+ contents: write # gh-pages in docs job
16
+
17
+ steps:
18
+ - name: Checkout (full history) # so setuptools_scm can see tags
19
+ uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Setup Python and cache
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.11"
27
+ cache: "pip"
28
+
29
+ - name: Assemble. Install all dev dependencies (non-editable)
30
+ run: |
31
+ pip install ".[dev]"
32
+
33
+ - name: Deploy. Build docs
34
+ run: mkdocs build
35
+
36
+ - name: Deploy. Deploy docs with Mike and set latest
37
+ run: |
38
+ git config user.name "github-actions[bot]"
39
+ git config user.email "github-actions[bot]@users.noreply.github.com"
40
+ mike deploy --push --update-aliases latest main
41
+ mike set-default --push latest
42
+
43
+
44
+
@@ -0,0 +1,70 @@
1
+ # .github/workflows/release.yml
2
+ name: CT SDK Release (GH Release + PyPI + versioned docs)
3
+ # Designed to run only on version tags (e.g., v0.1.4).
4
+ # Final step before distribution.
5
+ # It builds distribution files, runs tests, prepares release, and publishes.
6
+
7
+ on:
8
+ push:
9
+ tags:
10
+ - "v*.*.*" # trigger only on version tags like v0.1.4
11
+
12
+ permissions:
13
+ contents: write # create the GitHub Release
14
+ id-token: write # PyPI Trusted Publishing (OIDC)
15
+
16
+ jobs:
17
+ build-and-release:
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - name: Checkout (full history) # so setuptools_scm can see tags
22
+ uses: actions/checkout@v4
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Setup Python and cache
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.11"
30
+ cache: "pip"
31
+
32
+ - name: Versioning. Extract plain version from tag (no leading `v`)
33
+ id: ver
34
+ shell: bash
35
+ run: echo "plain=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
36
+
37
+ - name: Versioning. Print build version for logs
38
+ run: echo "Building version ${{ steps.ver.outputs.plain }}"
39
+
40
+ - name: Assemble. Install all dev dependencies (non-editable)
41
+ run: |
42
+ pip install ".[dev]"
43
+
44
+ - name: Baseline. Run tests (include any validation and coverage)
45
+ run: pytest -q
46
+
47
+ - name: Deploy. Build sdist + wheel (exact version)
48
+ env:
49
+ SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.ver.outputs.plain }}
50
+ run: python -m build
51
+
52
+ - name: Deploy. List artifacts
53
+ run: python .github/scripts/list_artifacts.py
54
+
55
+ - name: Deploy. Create GitHub Release, upload artifacts and set as latest
56
+ uses: softprops/action-gh-release@v2
57
+ with:
58
+ tag_name: ${{ github.ref_name }} # e.g., v0.1.4
59
+ name: ${{ github.ref_name }}
60
+ generate_release_notes: true
61
+ files: |
62
+ dist/*.whl
63
+ dist/*.tar.gz
64
+ draft: false
65
+ prerelease: false
66
+ make_latest: true
67
+
68
+ - name: Deploy. Publish to PyPI (Trusted Publishing)
69
+ uses: pypa/gh-action-pypi-publish@release/v1
70
+
@@ -0,0 +1,78 @@
1
+ # This .gitignore file lists content that does NOT need to be tracked in the project history
2
+
3
+ # ----------------------------------------
4
+ # macOS system files (always ignore)
5
+ # ----------------------------------------
6
+ .DS_Store
7
+
8
+ # ----------------------------------------
9
+ # Visual Studio Code (always ignore)
10
+ # ----------------------------------------
11
+ .vscode/
12
+
13
+ # ----------------------------------------
14
+ # Environment variables and secrets (always ignore)
15
+ # ----------------------------------------
16
+ .env
17
+ .env.*
18
+
19
+ # ----------------------------------------
20
+ # Python (ignore for all Python projects)
21
+ # ----------------------------------------
22
+ .venv/
23
+ __pycache__/
24
+ *.pyc
25
+ *.pyo
26
+ *.pyd
27
+ *.egg-info/
28
+ dist/
29
+ build/
30
+
31
+ # ----------------------------------------
32
+ # Testing & coverage
33
+ # ----------------------------------------
34
+ .coveragerc # Put info in pyproject.toml
35
+ coveragerc # Put info in pyproject.toml
36
+ pytest.ini # Put info in pyproject.toml
37
+ .coverage
38
+ coverage.xml
39
+ htmlcov/
40
+ .pytest_cache/
41
+ .tox/
42
+ .nox/
43
+
44
+ # ----------------------------------------
45
+ # Packaging tools
46
+ # ----------------------------------------
47
+ *.manifest
48
+ *.spec
49
+
50
+ # ----------------------------------------
51
+ # Jupyter Notebook checkpoints
52
+ # ----------------------------------------
53
+ .ipynb_checkpoints/
54
+
55
+ # ----------------------------------------
56
+ # Local tools & cache
57
+ # ----------------------------------------
58
+ .mypy_cache/
59
+ .ruff_cache/
60
+ .cache/
61
+
62
+ # ----------------------------------------
63
+ # Generated version files
64
+ # ----------------------------------------
65
+ src/ci/transparency/types/_version.py
66
+
67
+ # ----------------------------------------
68
+ # Generated data files
69
+ # ----------------------------------------
70
+ data/
71
+ *.duckdb
72
+ *.jsonl
73
+
74
+ # ----------------------------------------
75
+ # setuptools-scm recreates _version.py from Git tags
76
+ # on every build or install, so ignore it here.
77
+ # ----------------------------------------
78
+ *_version.py
@@ -0,0 +1,11 @@
1
+ # .pre-commit-config.yaml
2
+ # Only format or fix in pre-commit, not in CI.
3
+ # CI should only check for issues, not fix them.
4
+ repos:
5
+ - repo: https://github.com/astral-sh/ruff-pre-commit
6
+ rev: v0.12.8
7
+ hooks:
8
+ - id: ruff-format
9
+ - id: ruff
10
+ args: [--fix]
11
+
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format follows **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/)**
6
+ and this project adheres to **[Semantic Versioning](https://semver.org/spec/v2.0.0.html)**.
7
+
8
+ ---
9
+
10
+ ## [Unreleased]
11
+
12
+ ### Added
13
+ - (placeholder) Notes for the next release.
14
+
15
+ ---
16
+
17
+ ## [0.1.0] - 2025-09-11
18
+
19
+ ### Added
20
+ - **Initial release** of the **Civic Transparency SDK**.
21
+ - Generators for simple civic transparency worlds producing JSONL windows.
22
+ - Utilities to convert JSONL worlds into DuckDB (`jsonl_to_duckdb`).
23
+ - Initial README with reproducible commands and seed values.
24
+ - Packaged schemas and OpenAPI reference (mirrors `civic-transparency-spec`) for downstream private verification work.
25
+
26
+ ---
27
+
28
+ ## Notes on versioning and releases
29
+
30
+ - **SemVer policy**
31
+ - **MAJOR** – breaking API/schema or CLI changes.
32
+ - **MINOR** – backward-compatible additions and enhancements.
33
+ - **PATCH** – documentation, tooling, or non-breaking fixes.
34
+ - Versions are driven by git tags via `setuptools_scm`.
35
+ Tag the repository with `vX.Y.Z` to publish a release.
36
+ - Documentation and badges are updated per tag and aliased to **latest**.
37
+
38
+ [Unreleased]: https://github.com/civic-interconnect/civic-transparency-sdk/compare/v0.1.0...HEAD
39
+ [0.1.0]: https://github.com/civic-interconnect/civic-transparency-sdk/releases/tag/v0.1.0
@@ -0,0 +1,9 @@
1
+ cff-version: 1.2.0
2
+ title: Civic Transparency SDK
3
+ message: If you use this software, please cite it as below.
4
+ type: software
5
+ authors:
6
+ - name: Civic Interconnect
7
+ repository-code: https://github.com/civic-interconnect/civic-transparency-sdk
8
+ license: MIT
9
+
@@ -0,0 +1,48 @@
1
+ # Civic Transparency Code of Conduct
2
+
3
+ ## Our Commitment
4
+
5
+ We are committed to a respectful, inclusive, and collaborative environment for everyone, regardless of:
6
+ age, culture, ethnicity, gender identity or expression, language, national origin, neurotype, physical or mental ability, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, or technical background.
7
+
8
+ We welcome global participation. While we may not be able to meet every request, we will always work to treat each other well.
9
+
10
+ ## Expected Behavior
11
+
12
+ - **Be respectful and kind.** Treat others as you would wish to be treated.
13
+ - **Be collaborative.** Share knowledge freely, give credit, and help others succeed.
14
+ - **Be constructive.** Focus on ideas and solutions, not personal attacks.
15
+ - **Be concise and clear.** Communicate in ways that make participation easier for everyone, especially across languages.
16
+ - **Use public channels** for project-related communication whenever possible, so everyone can benefit from shared knowledge.
17
+ - **Respect privacy** and avoid sharing personal information without consent.
18
+
19
+ ## Unacceptable Behavior
20
+
21
+ Harassment, discrimination, or abusive conduct of any kind is not acceptable. Examples include:
22
+
23
+ - Threats or violent language
24
+ - Sexist, racist, or discriminatory jokes or comments
25
+ - Posting sexual or violent material
26
+ - Sharing private communications without permission
27
+ - Personal insults or name-calling
28
+ - Unwelcome sexual attention
29
+ - Persistent disruption or hostility after being asked to stop
30
+
31
+ ## Scope
32
+
33
+ This Code applies to all project spaces, both online and offline, and in all interactions where you represent the project.
34
+
35
+ ## Reporting
36
+
37
+ If you experience or witness behavior that violates this Code:
38
+
39
+ - You may report it privately to the maintainers at: **info@civicinterconnect.org**
40
+ - Reports will be handled respectfully and confidentially.
41
+ - The project team is committed to fair review and, when necessary, taking appropriate action.
42
+
43
+ ## Attribution
44
+
45
+ This Code of Conduct is adapted from:
46
+
47
+ - [Apache Software Foundation Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)
48
+ - [Contributor Covenant v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html)
@@ -0,0 +1,91 @@
1
+ # CONTRIBUTING.md
2
+
3
+ ## Ground Rules
4
+
5
+ - **Code of Conduct**: Be respectful and constructive. Reports: `info@civicinterconnect.org`.
6
+ - **License**: All contributions are accepted under the repo's **MIT License**.
7
+
8
+ ---
9
+
10
+ ## DEV 1. Start Locally
11
+
12
+ Setup development environment (commands are for cross-platform PowerShell. Install on macOS/Linux as needed):
13
+
14
+ ```pwsh
15
+ uv venv
16
+ .\.venv\Scripts\activate
17
+ uv pip install --upgrade pip setuptools wheel
18
+ uv pip install --only-binary=:all: -e ".[dev]"
19
+ pre-commit install
20
+ pytest -q
21
+ ```
22
+
23
+ ## DEV 2. Validate Changes
24
+
25
+ Run all checks and build verification:
26
+
27
+ ```pwsh
28
+ ruff format .
29
+ ruff check --fix
30
+ ruff check
31
+ mkdocs build
32
+ pre-commit run --all-files
33
+ pytest -q
34
+ ```
35
+
36
+ ## DEV 3. Build and Inspect Package
37
+
38
+ ```pwsh
39
+ py -m build
40
+
41
+ $TMP = New-Item -ItemType Directory -Path ([System.IO.Path]::GetTempPath()) -Name ("wheel_" + [System.Guid]::NewGuid())
42
+ Expand-Archive dist\*.whl -DestinationPath $TMP.FullName
43
+ Get-ChildItem -Recurse $TMP.FullName | ForEach-Object { $_.FullName.Replace($TMP.FullName + '\','') }
44
+ Remove-Item -Recurse -Force $TMP
45
+ ```
46
+
47
+ ## DEV 4. Preview Docs
48
+
49
+ ```pwsh
50
+ mkdocs serve
51
+ ```
52
+
53
+ Open: <http://127.0.0.1:8000/>
54
+
55
+ ## DEV 5. Clean Artifacts
56
+
57
+ ```pwsh
58
+ Get-ChildItem -Path . -Recurse -Directory -Filter "*__pycache__*" | Remove-Item -Recurse -Force
59
+ Get-ChildItem -Path . -Recurse -Directory -Filter ".*_cache" | Remove-Item -Recurse -Force
60
+ Get-ChildItem -Path "src" -Recurse -Directory -Name "*.egg-info" | Remove-Item -Recurse -Force
61
+ Remove-Item -Path "build", "dist", "site" -Recurse -Force
62
+ ```
63
+
64
+ ## DEV 6. Update Docs & Verify
65
+
66
+ Update `CHANGELOG.md` and `pyproject`.toml dependencies.
67
+ Ensure CI passes:
68
+
69
+ ```shell
70
+ pre-commit run --all-files
71
+ pytest -q
72
+ ```
73
+
74
+ ## DEV 7. Git add-commit-push Changes
75
+
76
+ ```shell
77
+ git add .
78
+ git commit -m "Prep vx.y.z"
79
+ git push origin main
80
+ ```
81
+
82
+ ## DEV 8. Git tag and Push tag
83
+
84
+ ```shell
85
+ git tag vx.y.z -m "x.y.z"
86
+ git push origin vx.y.z
87
+ ```
88
+
89
+ > A GitHub Action will **build**, **publish to PyPI** (Trusted Publishing), **create a GitHub Release** with artifacts, and **deploy versioned docs** with `mike`.
90
+
91
+ > You do **not** need to run `gh release create` or upload files manually.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Civic Interconnect
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the “Software”), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.