data-gantry 0.5.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 (99) hide show
  1. data_gantry-0.5.0/.github/workflows/ci.yml +23 -0
  2. data_gantry-0.5.0/.github/workflows/release.yml +52 -0
  3. data_gantry-0.5.0/.gitignore +16 -0
  4. data_gantry-0.5.0/.pre-commit-config.yaml +26 -0
  5. data_gantry-0.5.0/CHANGELOG.md +46 -0
  6. data_gantry-0.5.0/CONTRIBUTING.md +35 -0
  7. data_gantry-0.5.0/LICENSE +201 -0
  8. data_gantry-0.5.0/Makefile +31 -0
  9. data_gantry-0.5.0/NOTICE +7 -0
  10. data_gantry-0.5.0/PKG-INFO +671 -0
  11. data_gantry-0.5.0/README.md +635 -0
  12. data_gantry-0.5.0/SECURITY.md +40 -0
  13. data_gantry-0.5.0/docs/adapters.md +336 -0
  14. data_gantry-0.5.0/docs/assets/gantry-logo-512.jpg +0 -0
  15. data_gantry-0.5.0/docs/flink.md +160 -0
  16. data_gantry-0.5.0/docs/materialization.md +169 -0
  17. data_gantry-0.5.0/docs/policy.md +170 -0
  18. data_gantry-0.5.0/docs/sql.md +148 -0
  19. data_gantry-0.5.0/examples/README.md +177 -0
  20. data_gantry-0.5.0/examples/agent_sql.py +182 -0
  21. data_gantry-0.5.0/examples/batch_flink.py +97 -0
  22. data_gantry-0.5.0/examples/flink/Dockerfile +14 -0
  23. data_gantry-0.5.0/examples/flink/docker-compose.yml +60 -0
  24. data_gantry-0.5.0/examples/local_duckdb.py +114 -0
  25. data_gantry-0.5.0/examples/long_running_query.py +105 -0
  26. data_gantry-0.5.0/examples/materialize_and_verify.py +138 -0
  27. data_gantry-0.5.0/examples/seed.sql +103 -0
  28. data_gantry-0.5.0/examples/stack/docker-compose.yml +138 -0
  29. data_gantry-0.5.0/examples/streaming_flink.py +111 -0
  30. data_gantry-0.5.0/examples/warehouse_rollup.py +137 -0
  31. data_gantry-0.5.0/gantry/__init__.py +77 -0
  32. data_gantry-0.5.0/gantry/adapter.py +41 -0
  33. data_gantry-0.5.0/gantry/admission.py +92 -0
  34. data_gantry-0.5.0/gantry/artifact.py +23 -0
  35. data_gantry-0.5.0/gantry/batch/__init__.py +7 -0
  36. data_gantry-0.5.0/gantry/batch/api.py +66 -0
  37. data_gantry-0.5.0/gantry/batch/capabilities.py +14 -0
  38. data_gantry-0.5.0/gantry/capabilities.py +24 -0
  39. data_gantry-0.5.0/gantry/context.py +15 -0
  40. data_gantry-0.5.0/gantry/execution.py +100 -0
  41. data_gantry-0.5.0/gantry/failure.py +45 -0
  42. data_gantry-0.5.0/gantry/flink/__init__.py +2 -0
  43. data_gantry-0.5.0/gantry/flink/adapter.py +926 -0
  44. data_gantry-0.5.0/gantry/flink/api.py +388 -0
  45. data_gantry-0.5.0/gantry/flink/artifact.py +58 -0
  46. data_gantry-0.5.0/gantry/flink/client.py +318 -0
  47. data_gantry-0.5.0/gantry/flink/execution.py +51 -0
  48. data_gantry-0.5.0/gantry/flink/metrics.py +48 -0
  49. data_gantry-0.5.0/gantry/flink/operation.py +470 -0
  50. data_gantry-0.5.0/gantry/flink/target.py +111 -0
  51. data_gantry-0.5.0/gantry/flink/verification.py +154 -0
  52. data_gantry-0.5.0/gantry/handle.py +31 -0
  53. data_gantry-0.5.0/gantry/metrics.py +19 -0
  54. data_gantry-0.5.0/gantry/output.py +29 -0
  55. data_gantry-0.5.0/gantry/policy.py +30 -0
  56. data_gantry-0.5.0/gantry/result.py +110 -0
  57. data_gantry-0.5.0/gantry/runtime.py +495 -0
  58. data_gantry-0.5.0/gantry/sql/__init__.py +69 -0
  59. data_gantry-0.5.0/gantry/sql/adapter.py +37 -0
  60. data_gantry-0.5.0/gantry/sql/adapters/__init__.py +4 -0
  61. data_gantry-0.5.0/gantry/sql/adapters/bigquery.py +451 -0
  62. data_gantry-0.5.0/gantry/sql/adapters/duckdb.py +333 -0
  63. data_gantry-0.5.0/gantry/sql/adapters/postgres.py +354 -0
  64. data_gantry-0.5.0/gantry/sql/adapters/snowflake.py +335 -0
  65. data_gantry-0.5.0/gantry/sql/api.py +362 -0
  66. data_gantry-0.5.0/gantry/sql/bridge.py +109 -0
  67. data_gantry-0.5.0/gantry/sql/capabilities.py +56 -0
  68. data_gantry-0.5.0/gantry/sql/classification.py +42 -0
  69. data_gantry-0.5.0/gantry/sql/dialect.py +146 -0
  70. data_gantry-0.5.0/gantry/sql/enforcement.py +62 -0
  71. data_gantry-0.5.0/gantry/sql/explain.py +18 -0
  72. data_gantry-0.5.0/gantry/sql/materialization.py +878 -0
  73. data_gantry-0.5.0/gantry/sql/output.py +16 -0
  74. data_gantry-0.5.0/gantry/sql/policy.py +55 -0
  75. data_gantry-0.5.0/gantry/sql/providers.py +116 -0
  76. data_gantry-0.5.0/gantry/sql/query.py +72 -0
  77. data_gantry-0.5.0/gantry/sql/registry.py +104 -0
  78. data_gantry-0.5.0/gantry/sql/result.py +36 -0
  79. data_gantry-0.5.0/gantry/sql/schema.py +32 -0
  80. data_gantry-0.5.0/gantry/sql/target.py +23 -0
  81. data_gantry-0.5.0/gantry/store.py +43 -0
  82. data_gantry-0.5.0/gantry/stream/__init__.py +7 -0
  83. data_gantry-0.5.0/gantry/stream/api.py +65 -0
  84. data_gantry-0.5.0/gantry/stream/capabilities.py +14 -0
  85. data_gantry-0.5.0/gantry/target.py +19 -0
  86. data_gantry-0.5.0/gantry/tool.py +30 -0
  87. data_gantry-0.5.0/gantry/verifier.py +66 -0
  88. data_gantry-0.5.0/gantry/verify.py +181 -0
  89. data_gantry-0.5.0/pyproject.toml +75 -0
  90. data_gantry-0.5.0/tests/test_admission.py +92 -0
  91. data_gantry-0.5.0/tests/test_flink.py +458 -0
  92. data_gantry-0.5.0/tests/test_flink_live.py +277 -0
  93. data_gantry-0.5.0/tests/test_flink_parsing.py +201 -0
  94. data_gantry-0.5.0/tests/test_materialization.py +331 -0
  95. data_gantry-0.5.0/tests/test_models.py +79 -0
  96. data_gantry-0.5.0/tests/test_postgres_live.py +137 -0
  97. data_gantry-0.5.0/tests/test_runtime.py +618 -0
  98. data_gantry-0.5.0/tests/test_sql.py +310 -0
  99. data_gantry-0.5.0/uv.lock +1362 -0
@@ -0,0 +1,23 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ check:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: astral-sh/setup-uv@v6
16
+ with:
17
+ enable-cache: true
18
+ - run: uv sync
19
+ - run: uv run ruff check .
20
+ - run: uv run ruff format --check .
21
+ - run: uv run mypy gantry tests
22
+ - run: uv run pytest --cov=gantry --cov-report=term-missing
23
+ - run: uv run python -m build
@@ -0,0 +1,52 @@
1
+ name: release
2
+
3
+ # Publishes to PyPI when a version tag is pushed.
4
+ #
5
+ # Uses trusted publishing (OIDC), so there is no API token in the repository
6
+ # and nothing to leak or rotate. It requires a one-time setup on PyPI: add a
7
+ # trusted publisher for this repository, workflow `release.yml`, environment
8
+ # `pypi`.
9
+ #
10
+ # The distribution is `data-gantry`. The import is `gantry`.
11
+
12
+ on:
13
+ push:
14
+ tags:
15
+ - "v*"
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ check:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ - uses: astral-sh/setup-uv@v6
26
+ with:
27
+ enable-cache: true
28
+ - run: uv sync
29
+ - run: uv run ruff check .
30
+ - run: uv run ruff format --check .
31
+ - run: uv run mypy gantry tests
32
+ - run: uv run pytest
33
+ # A tag that disagrees with pyproject.toml would publish a version nobody
34
+ # asked for, and PyPI uploads cannot be replaced.
35
+ - name: the tag must match the packaged version
36
+ run: |
37
+ packaged=$(uv run python -c "import tomllib,pathlib;print(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']['version'])")
38
+ tagged="${GITHUB_REF_NAME#v}"
39
+ echo "packaged=$packaged tagged=$tagged"
40
+ [ "$packaged" = "$tagged" ] || { echo "::error::tag $tagged != version $packaged"; exit 1; }
41
+
42
+ publish:
43
+ needs: check
44
+ runs-on: ubuntu-latest
45
+ environment: pypi
46
+ permissions:
47
+ id-token: write
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: astral-sh/setup-uv@v6
51
+ - run: uv build
52
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .pytest_cache/
8
+ .mypy_cache/
9
+ .ruff_cache/
10
+ .coverage
11
+ htmlcov/
12
+ .env
13
+ .DS_Store
14
+ .idea/
15
+ .vscode/
16
+ .gantry/
@@ -0,0 +1,26 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.6.9
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/pre-commit/pre-commit-hooks
10
+ rev: v5.0.0
11
+ hooks:
12
+ - id: check-yaml
13
+ - id: check-toml
14
+ - id: check-merge-conflict
15
+ - id: end-of-file-fixer
16
+ - id: trailing-whitespace
17
+ - id: check-added-large-files
18
+
19
+ - repo: local
20
+ hooks:
21
+ - id: mypy
22
+ name: mypy (strict)
23
+ entry: uv run mypy gantry
24
+ language: system
25
+ types: [python]
26
+ pass_filenames: false
@@ -0,0 +1,46 @@
1
+ # Changelog
2
+
3
+ Notable changes. Dates are release dates; the format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+
6
+ ## 0.5.0 — 2026-09-09
7
+
8
+ First release published to PyPI, as `data-gantry`.
9
+
10
+ ### Changed
11
+
12
+ - **The distribution is now `data-gantry`.** The import stays `gantry`. The name
13
+ `gantry` on PyPI belongs to an unrelated project, so `pip install gantry`
14
+ installs someone else's library.
15
+
16
+ ### Added
17
+
18
+ - `gantry.batch` and `gantry.stream` as intent-named entry points for Flink SQL
19
+ jobs; `gantry.flink` is now an implementation detail.
20
+ - Seven runnable examples in `examples/`, indexed by task, with a Docker stack
21
+ (`examples/stack/docker-compose.yml`) that brings up PostgreSQL, Flink, and
22
+ the catalog they read through.
23
+ - Live test suites against real PostgreSQL and a real Flink SQL Gateway. They
24
+ skip when no engine is reachable, so a clone without one still passes.
25
+ - A release workflow that publishes to PyPI on a version tag through trusted
26
+ publishing, and refuses to publish when the tag disagrees with the packaged
27
+ version.
28
+ - `SECURITY.md`, stating that Gantry is an admission boundary rather than a
29
+ replacement for database permissions.
30
+
31
+ ### Fixed
32
+
33
+ - Every statement carried an `executionTimeout` that Flink's SQL Gateway
34
+ rejects outright, so validation, submission and execution all failed against
35
+ a real gateway.
36
+ - Health checks read metrics from an object the adapter never populates, so any
37
+ check needing a restart count or watermark lag could not pass.
38
+ - Query results were read one page deep and positionally, so `COUNT(*)`
39
+ returned `1` for any non-empty table.
40
+ - Identifier normalisation split on dots inside quotes and was applied to a
41
+ job's output but not its inputs, making every table outside `public`
42
+ unusable.
43
+ - `PostgresAdapter.describe()` selected `table_type` from
44
+ `information_schema.columns`, where that column does not exist.
45
+ - Waiting for a streaming job decided its health contract before Flink had
46
+ registered the job's metrics, and did not treat `SUCCEEDED` as terminal.
@@ -0,0 +1,35 @@
1
+ # Contributing
2
+
3
+ Gantry v0 is intentionally small. Changes should preserve the single lifecycle:
4
+
5
+ ```text
6
+ propose → constrain → execute → verify → accept
7
+ ```
8
+
9
+ ## Setup
10
+
11
+ ```bash
12
+ uv sync
13
+ ```
14
+
15
+ ## Checks
16
+
17
+ ```bash
18
+ make check
19
+ ```
20
+
21
+ This runs formatting checks, linting, strict type checking, unit tests, coverage, and a package
22
+ build. Use `make fmt` to apply Ruff's formatter and safe lint fixes.
23
+
24
+ ## Design guidelines
25
+
26
+ - Keep the core free of runtime dependencies and framework-specific behavior.
27
+ - Add integrations as separate packages rather than teaching the runtime about data engines.
28
+ - Treat every artifact as an untrusted proposal.
29
+ - Keep policy descriptive and make executors responsible for enforcement.
30
+ - Do not equate successful execution with a verified result.
31
+ - Fail closed when a plugin raises or violates its result contract.
32
+ - Prefer protocols and plain data objects over inheritance and registration systems.
33
+
34
+ Tests should name the behavior protected by the trust boundary and cover where the lifecycle
35
+ must stop after each failure.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,31 @@
1
+ .DEFAULT_GOAL := help
2
+
3
+ .PHONY: help install check fmt lint type test build clean
4
+
5
+ help: ## Show available targets
6
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "};{printf " \033[36m%-10s\033[0m %s\n",$$1,$$2}'
7
+
8
+ install: ## Install development dependencies
9
+ uv sync
10
+
11
+ check: lint type test build ## Run all local and CI checks
12
+
13
+ fmt: ## Format and autofix source and tests
14
+ uv run ruff format .
15
+ uv run ruff check --fix .
16
+
17
+ lint: ## Check formatting and lint rules
18
+ uv run ruff check .
19
+ uv run ruff format --check .
20
+
21
+ type: ## Run strict static type checking
22
+ uv run mypy gantry tests
23
+
24
+ test: ## Run the test suite
25
+ uv run pytest --cov=gantry --cov-report=term-missing
26
+
27
+ build: ## Build source and wheel distributions
28
+ uv run python -m build
29
+
30
+ clean: ## Remove generated build and cache artifacts
31
+ rm -rf .coverage .pytest_cache .mypy_cache .ruff_cache build dist
@@ -0,0 +1,7 @@
1
+ Gantry
2
+ Copyright 2026 The Gantry Authors
3
+
4
+ This product includes software developed at the Gantry project
5
+ (https://github.com/arvindram03/gantry).
6
+
7
+ Licensed under the Apache License, Version 2.0. See LICENSE for the full text.