schema-sentinel 3.0.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.
- schema_sentinel-3.0.0/.github/FUNDING.yml +11 -0
- schema_sentinel-3.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +89 -0
- schema_sentinel-3.0.0/.github/ISSUE_TEMPLATE/feature_request.yml +76 -0
- schema_sentinel-3.0.0/.github/ISSUE_TEMPLATE/question.yml +37 -0
- schema_sentinel-3.0.0/.github/pull_request_template.md +13 -0
- schema_sentinel-3.0.0/.github/rulesets/README.md +100 -0
- schema_sentinel-3.0.0/.github/rulesets/dev-branch-rules.json +37 -0
- schema_sentinel-3.0.0/.github/rulesets/master-branch-protection.json +61 -0
- schema_sentinel-3.0.0/.github/workflows/ci.yml +106 -0
- schema_sentinel-3.0.0/.github/workflows/docs.yml +62 -0
- schema_sentinel-3.0.0/.github/workflows/publish.yml +47 -0
- schema_sentinel-3.0.0/.github/workflows/release.yml +84 -0
- schema_sentinel-3.0.0/.gitignore +226 -0
- schema_sentinel-3.0.0/.pre-commit-config.yaml +52 -0
- schema_sentinel-3.0.0/.vscode/extensions.json +14 -0
- schema_sentinel-3.0.0/.vscode/launch.json +36 -0
- schema_sentinel-3.0.0/.vscode/settings.json +44 -0
- schema_sentinel-3.0.0/BRANCHING.md +177 -0
- schema_sentinel-3.0.0/BRANCH_RULES_SETUP.md +159 -0
- schema_sentinel-3.0.0/CHANGELOG.md +83 -0
- schema_sentinel-3.0.0/CONFIG_IMPLEMENTATION_SUMMARY.md +236 -0
- schema_sentinel-3.0.0/CONFIG_REFACTORING_PLAN.md +477 -0
- schema_sentinel-3.0.0/CONTRIBUTING.md +315 -0
- schema_sentinel-3.0.0/DEVELOPMENT.md +246 -0
- schema_sentinel-3.0.0/LICENSE +201 -0
- schema_sentinel-3.0.0/Makefile +48 -0
- schema_sentinel-3.0.0/NOTEBOOKS.md +25 -0
- schema_sentinel-3.0.0/PKG-INFO +415 -0
- schema_sentinel-3.0.0/PRE_RELEASE_CHECKLIST.md +161 -0
- schema_sentinel-3.0.0/PRODUCTION_CHECKLIST.md +161 -0
- schema_sentinel-3.0.0/README.md +350 -0
- schema_sentinel-3.0.0/SECURITY.md +143 -0
- schema_sentinel-3.0.0/SETUP_SUMMARY.md +147 -0
- schema_sentinel-3.0.0/YAML_SHREDDER_CLI.md +170 -0
- schema_sentinel-3.0.0/conda-forge-recipe/meta.yaml +71 -0
- schema_sentinel-3.0.0/docs/index.html +251 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/markdown_utils/markdown.html +801 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/markdown_utils.html +242 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/changeset.html +628 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/engine.html +1822 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/enums.html +2226 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/lookup/sql_data_type.html +547 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/lookup.html +242 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/metadata.html +1319 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/column.html +687 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/column_constraint.html +617 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/comparison.html +1214 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/constraint.html +537 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/database.html +543 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/function.html +865 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/metadata_container.html +2599 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/metadata_utils.html +1240 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/pipe.html +555 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/procedure.html +673 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/referential_constraint.html +570 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/schema.html +523 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/stage.html +601 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/stream.html +617 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/table.html +715 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/table_constraint.html +569 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/task.html +681 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model/view.html +569 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/model.html +817 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager/utils.html +757 -0
- schema_sentinel-3.0.0/docs/schema_sentinel/metadata_manager.html +248 -0
- schema_sentinel-3.0.0/docs/schema_sentinel.html +838 -0
- schema_sentinel-3.0.0/docs/search.js +46 -0
- schema_sentinel-3.0.0/docs/yaml_shredder/data_loader.html +1168 -0
- schema_sentinel-3.0.0/docs/yaml_shredder/ddl_generator.html +1085 -0
- schema_sentinel-3.0.0/docs/yaml_shredder/schema_generator.html +903 -0
- schema_sentinel-3.0.0/docs/yaml_shredder/structure_analyzer.html +879 -0
- schema_sentinel-3.0.0/docs/yaml_shredder/table_generator.html +874 -0
- schema_sentinel-3.0.0/docs/yaml_shredder.html +256 -0
- schema_sentinel-3.0.0/environment.yml +23 -0
- schema_sentinel-3.0.0/notebooks/MPM Comparison and Migration.ipynb +1347 -0
- schema_sentinel-3.0.0/notebooks/MPM Test Data Loading.ipynb +624 -0
- schema_sentinel-3.0.0/notebooks/Object Comparison.ipynb +106 -0
- schema_sentinel-3.0.0/notebooks/Pandas Diff.ipynb +446 -0
- schema_sentinel-3.0.0/notebooks/SQLLite + SQLAlchemy.ipynb +1166 -0
- schema_sentinel-3.0.0/pyproject.toml +139 -0
- schema_sentinel-3.0.0/requirements.txt +14 -0
- schema_sentinel-3.0.0/resources/bootstrap-theme.css +587 -0
- schema_sentinel-3.0.0/resources/bootstrap.css +6834 -0
- schema_sentinel-3.0.0/resources/bs-mpm-schema.json +74 -0
- schema_sentinel-3.0.0/resources/datacompy/templates/column_comparison.md +7 -0
- schema_sentinel-3.0.0/resources/datacompy/templates/column_summary.md +6 -0
- schema_sentinel-3.0.0/resources/datacompy/templates/fav_column_summary.md +6 -0
- schema_sentinel-3.0.0/resources/datacompy/templates/header.md +6 -0
- schema_sentinel-3.0.0/resources/datacompy/templates/row_summary.md +15 -0
- schema_sentinel-3.0.0/resources/example-schema-generated.json +230 -0
- schema_sentinel-3.0.0/resources/examples/.env.example +38 -0
- schema_sentinel-3.0.0/resources/examples/db.properties.example +49 -0
- schema_sentinel-3.0.0/resources/examples/example-data.yaml +88 -0
- schema_sentinel-3.0.0/resources/examples/example-postgres-ddl.sql +37 -0
- schema_sentinel-3.0.0/resources/examples/example-schema.json +220 -0
- schema_sentinel-3.0.0/resources/examples/example-snowflake-ddl.sql +37 -0
- schema_sentinel-3.0.0/resources/examples/example_ddl_generation.py +94 -0
- schema_sentinel-3.0.0/resources/examples/example_sqlite_workflow.py +182 -0
- schema_sentinel-3.0.0/resources/examples/generate_test_schema.py +42 -0
- schema_sentinel-3.0.0/resources/examples/load-env.sh.example +53 -0
- schema_sentinel-3.0.0/resources/examples/metadata-template.html +76 -0
- schema_sentinel-3.0.0/resources/examples/mpm-schema.sql +52 -0
- schema_sentinel-3.0.0/resources/examples/pandas-test.py +9 -0
- schema_sentinel-3.0.0/resources/examples/schema_sentinel_config.example.yaml +92 -0
- schema_sentinel-3.0.0/resources/examples/test-data.yaml +20 -0
- schema_sentinel-3.0.0/resources/examples/test-ddl.sql +14 -0
- schema_sentinel-3.0.0/resources/examples/test_ddl_simple.py +28 -0
- schema_sentinel-3.0.0/resources/examples/test_mpm_parser.py +313 -0
- schema_sentinel-3.0.0/resources/examples/test_mpm_schema.py +275 -0
- schema_sentinel-3.0.0/resources/examples/test_mpm_snowpark.py +391 -0
- schema_sentinel-3.0.0/resources/examples/test_schema_generation.py +33 -0
- schema_sentinel-3.0.0/resources/examples/test_sqlite_simple.py +39 -0
- schema_sentinel-3.0.0/resources/examples/test_yaml_shredder.py +90 -0
- schema_sentinel-3.0.0/resources/meta-db/.gitkeep +2 -0
- schema_sentinel-3.0.0/resources/migrations-ddl/table/migrations.db_change_log.sql +19 -0
- schema_sentinel-3.0.0/resources/migrations-ddl/table/migrations.migration_object.sql +12 -0
- schema_sentinel-3.0.0/resources/migrations-ddl/table/migrations.object_dependencies.sql +13 -0
- schema_sentinel-3.0.0/resources/migrations-ddl/table/migrations.schema_discrepancy.sql +18 -0
- schema_sentinel-3.0.0/resources/script/snowflake/constraints.sql +48 -0
- schema_sentinel-3.0.0/resources/test-ddl.sql +14 -0
- schema_sentinel-3.0.0/resources/test-schema.json +230 -0
- schema_sentinel-3.0.0/schema_sentinel/__init__.py +167 -0
- schema_sentinel-3.0.0/schema_sentinel/cli.py +36 -0
- schema_sentinel-3.0.0/schema_sentinel/config/__init__.py +34 -0
- schema_sentinel-3.0.0/schema_sentinel/config/manager.py +261 -0
- schema_sentinel-3.0.0/schema_sentinel/markdown_utils/__init__.py +0 -0
- schema_sentinel-3.0.0/schema_sentinel/markdown_utils/markdown.py +264 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/__init__.py +0 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/changeset.py +40 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/engine.py +308 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/enums.py +274 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/lookup/__init__.py +0 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/lookup/sql_data_type.py +104 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/metadata.py +482 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/__init__.py +136 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/column.py +52 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/column_constraint.py +45 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/comparison.py +252 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/constraint.py +33 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/database.py +36 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/function.py +64 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/metadata_container.py +528 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/metadata_utils.py +342 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/pipe.py +35 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/procedure.py +52 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/referential_constraint.py +41 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/schema.py +33 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/stage.py +37 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/stream.py +38 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/table.py +45 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/table_constraint.py +35 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/task.py +42 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/model/view.py +35 -0
- schema_sentinel-3.0.0/schema_sentinel/metadata_manager/utils.py +171 -0
- schema_sentinel-3.0.0/schema_sentinel_cli.py +136 -0
- schema_sentinel-3.0.0/setup.py +28 -0
- schema_sentinel-3.0.0/setup.sh +43 -0
- schema_sentinel-3.0.0/snowflake_local_testing/__init__.py +41 -0
- schema_sentinel-3.0.0/snowflake_local_testing/connection.py +244 -0
- schema_sentinel-3.0.0/snowflake_local_testing/mock.py +166 -0
- schema_sentinel-3.0.0/snowflake_local_testing/mpm_parser.py +237 -0
- schema_sentinel-3.0.0/snowflake_local_testing/mpm_snowpark.py +560 -0
- schema_sentinel-3.0.0/snowflake_local_testing/schema.py +135 -0
- schema_sentinel-3.0.0/tests/README.md +46 -0
- schema_sentinel-3.0.0/tests/__init__.py +1 -0
- schema_sentinel-3.0.0/tests/conftest.py +17 -0
- schema_sentinel-3.0.0/tests/test_config.py +185 -0
- schema_sentinel-3.0.0/tests/test_imports.py +41 -0
- schema_sentinel-3.0.0/tests/test_single_schema.py +46 -0
- schema_sentinel-3.0.0/wiki/Architecture.md +317 -0
- schema_sentinel-3.0.0/wiki/Contributing.md +352 -0
- schema_sentinel-3.0.0/wiki/Development.md +465 -0
- schema_sentinel-3.0.0/wiki/Future-Development-Plan.md +439 -0
- schema_sentinel-3.0.0/wiki/Getting-Started.md +201 -0
- schema_sentinel-3.0.0/wiki/Home.md +83 -0
- schema_sentinel-3.0.0/wiki/README.md +81 -0
- schema_sentinel-3.0.0/wiki/Security.md +427 -0
- schema_sentinel-3.0.0/yaml_shredder/__init__.py +17 -0
- schema_sentinel-3.0.0/yaml_shredder/data_loader.py +231 -0
- schema_sentinel-3.0.0/yaml_shredder/ddl_generator.py +296 -0
- schema_sentinel-3.0.0/yaml_shredder/schema_generator.py +160 -0
- schema_sentinel-3.0.0/yaml_shredder/structure_analyzer.py +193 -0
- schema_sentinel-3.0.0/yaml_shredder/table_generator.py +214 -0
- schema_sentinel-3.0.0/yaml_shredder_cli.py +342 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [Igladyshev]
|
|
4
|
+
# patreon: # your_patreon_username
|
|
5
|
+
# open_collective: # your_open_collective_username
|
|
6
|
+
# ko_fi: # your_ko_fi_username
|
|
7
|
+
# tidelift: # your_tidelift_package_name
|
|
8
|
+
# community_bridge: # your_community_bridge_project_name
|
|
9
|
+
# liberapay: # your_liberapay_username
|
|
10
|
+
# issuehunt: # your_issuehunt_username
|
|
11
|
+
# custom: # your_custom_sponsorship_url
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: File a bug report to help us improve
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug", "needs-triage"]
|
|
5
|
+
assignees: []
|
|
6
|
+
|
|
7
|
+
body:
|
|
8
|
+
- type: markdown
|
|
9
|
+
attributes:
|
|
10
|
+
value: |
|
|
11
|
+
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible.
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: description
|
|
15
|
+
attributes:
|
|
16
|
+
label: Bug Description
|
|
17
|
+
description: A clear and concise description of what the bug is
|
|
18
|
+
placeholder: Tell us what you see!
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: reproduction
|
|
24
|
+
attributes:
|
|
25
|
+
label: Steps to Reproduce
|
|
26
|
+
description: Steps to reproduce the behavior
|
|
27
|
+
placeholder: |
|
|
28
|
+
1. Configure connection to '...'
|
|
29
|
+
2. Run command '...'
|
|
30
|
+
3. See error
|
|
31
|
+
validations:
|
|
32
|
+
required: true
|
|
33
|
+
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: expected
|
|
36
|
+
attributes:
|
|
37
|
+
label: Expected Behavior
|
|
38
|
+
description: What did you expect to happen?
|
|
39
|
+
placeholder: I expected to see...
|
|
40
|
+
validations:
|
|
41
|
+
required: true
|
|
42
|
+
|
|
43
|
+
- type: textarea
|
|
44
|
+
id: actual
|
|
45
|
+
attributes:
|
|
46
|
+
label: Actual Behavior
|
|
47
|
+
description: What actually happened? Include error messages and stack traces
|
|
48
|
+
placeholder: |
|
|
49
|
+
Error message:
|
|
50
|
+
```
|
|
51
|
+
Paste error here
|
|
52
|
+
```
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: textarea
|
|
57
|
+
id: environment
|
|
58
|
+
attributes:
|
|
59
|
+
label: Environment
|
|
60
|
+
description: Please provide information about your environment
|
|
61
|
+
placeholder: |
|
|
62
|
+
- OS: [e.g. Ubuntu 22.04, Windows 11, macOS 13]
|
|
63
|
+
- Python version: [e.g. 3.9.10]
|
|
64
|
+
- schema-sentinel version: [e.g. 2.1.0]
|
|
65
|
+
- Database: [e.g. Snowflake 7.8.0]
|
|
66
|
+
value: |
|
|
67
|
+
- OS:
|
|
68
|
+
- Python version:
|
|
69
|
+
- schema-sentinel version:
|
|
70
|
+
- Database:
|
|
71
|
+
validations:
|
|
72
|
+
required: true
|
|
73
|
+
|
|
74
|
+
- type: textarea
|
|
75
|
+
id: additional
|
|
76
|
+
attributes:
|
|
77
|
+
label: Additional Context
|
|
78
|
+
description: Add any other context about the problem here
|
|
79
|
+
placeholder: Any additional information that might be helpful
|
|
80
|
+
|
|
81
|
+
- type: checkboxes
|
|
82
|
+
id: checklist
|
|
83
|
+
attributes:
|
|
84
|
+
label: Checklist
|
|
85
|
+
options:
|
|
86
|
+
- label: I have searched for similar issues before creating this one
|
|
87
|
+
required: true
|
|
88
|
+
- label: I have provided all requested information
|
|
89
|
+
required: true
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or enhancement
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement", "needs-triage"]
|
|
5
|
+
assignees: []
|
|
6
|
+
|
|
7
|
+
body:
|
|
8
|
+
- type: markdown
|
|
9
|
+
attributes:
|
|
10
|
+
value: |
|
|
11
|
+
Thanks for suggesting a feature! Please describe your idea in detail.
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: problem
|
|
15
|
+
attributes:
|
|
16
|
+
label: Problem Statement
|
|
17
|
+
description: Is your feature request related to a problem? Please describe.
|
|
18
|
+
placeholder: I'm always frustrated when...
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: solution
|
|
24
|
+
attributes:
|
|
25
|
+
label: Proposed Solution
|
|
26
|
+
description: Describe the solution you'd like
|
|
27
|
+
placeholder: I would like to see...
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: alternatives
|
|
33
|
+
attributes:
|
|
34
|
+
label: Alternatives Considered
|
|
35
|
+
description: Describe alternatives you've considered
|
|
36
|
+
placeholder: I also thought about...
|
|
37
|
+
|
|
38
|
+
- type: dropdown
|
|
39
|
+
id: database
|
|
40
|
+
attributes:
|
|
41
|
+
label: Database Support
|
|
42
|
+
description: Is this feature specific to a database?
|
|
43
|
+
options:
|
|
44
|
+
- All databases
|
|
45
|
+
- Snowflake
|
|
46
|
+
- PostgreSQL
|
|
47
|
+
- MySQL
|
|
48
|
+
- Oracle
|
|
49
|
+
- SQL Server
|
|
50
|
+
- Other
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
|
|
54
|
+
- type: textarea
|
|
55
|
+
id: use-case
|
|
56
|
+
attributes:
|
|
57
|
+
label: Use Case
|
|
58
|
+
description: Describe your use case and how this feature would help
|
|
59
|
+
placeholder: This would help me...
|
|
60
|
+
validations:
|
|
61
|
+
required: true
|
|
62
|
+
|
|
63
|
+
- type: textarea
|
|
64
|
+
id: additional
|
|
65
|
+
attributes:
|
|
66
|
+
label: Additional Context
|
|
67
|
+
description: Add any other context, screenshots, or examples
|
|
68
|
+
placeholder: Here's an example of how this might work...
|
|
69
|
+
|
|
70
|
+
- type: checkboxes
|
|
71
|
+
id: contribution
|
|
72
|
+
attributes:
|
|
73
|
+
label: Contribution
|
|
74
|
+
options:
|
|
75
|
+
- label: I would be willing to implement this feature
|
|
76
|
+
- label: I would be willing to help test this feature
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Question
|
|
2
|
+
description: Ask a question about the project
|
|
3
|
+
title: "[Question]: "
|
|
4
|
+
labels: ["question"]
|
|
5
|
+
assignees: []
|
|
6
|
+
|
|
7
|
+
body:
|
|
8
|
+
- type: markdown
|
|
9
|
+
attributes:
|
|
10
|
+
value: |
|
|
11
|
+
Have a question? We're here to help!
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: question
|
|
15
|
+
attributes:
|
|
16
|
+
label: Your Question
|
|
17
|
+
description: What would you like to know?
|
|
18
|
+
placeholder: How do I...?
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: context
|
|
24
|
+
attributes:
|
|
25
|
+
label: Context
|
|
26
|
+
description: Provide any relevant context or what you've already tried
|
|
27
|
+
placeholder: I tried...
|
|
28
|
+
|
|
29
|
+
- type: checkboxes
|
|
30
|
+
id: checklist
|
|
31
|
+
attributes:
|
|
32
|
+
label: Checklist
|
|
33
|
+
options:
|
|
34
|
+
- label: I have checked the documentation
|
|
35
|
+
required: true
|
|
36
|
+
- label: I have searched existing issues
|
|
37
|
+
required: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## What does this PR do?
|
|
2
|
+
<!-- Brief description of your changes -->
|
|
3
|
+
|
|
4
|
+
## Why?
|
|
5
|
+
<!-- What problem does this solve? Link to issue if applicable -->
|
|
6
|
+
|
|
7
|
+
Closes #
|
|
8
|
+
|
|
9
|
+
## How to test?
|
|
10
|
+
<!-- Quick steps to verify the changes work -->
|
|
11
|
+
|
|
12
|
+
## Notes
|
|
13
|
+
<!-- Anything reviewers should know? Breaking changes? Database affected? -->
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# GitHub Branch Rulesets
|
|
2
|
+
|
|
3
|
+
This directory contains branch protection rules defined as JSON files that can be imported into GitHub.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `master-branch-protection.json` - Protection rules for the master branch
|
|
8
|
+
- `dev-branch-rules.json` - Rules for the dev branch
|
|
9
|
+
|
|
10
|
+
## How to Apply These Rules
|
|
11
|
+
|
|
12
|
+
### Method 1: Using GitHub Web Interface (Recommended)
|
|
13
|
+
|
|
14
|
+
1. Go to your repository on GitHub
|
|
15
|
+
2. Navigate to **Settings** → **Rules** → **Rulesets**
|
|
16
|
+
3. Click **New ruleset** → **New branch ruleset**
|
|
17
|
+
4. Click **Import a ruleset**
|
|
18
|
+
5. Copy the content from the appropriate JSON file
|
|
19
|
+
6. Paste it into the import dialog
|
|
20
|
+
7. Review and save
|
|
21
|
+
|
|
22
|
+
### Method 2: Using GitHub API
|
|
23
|
+
|
|
24
|
+
You can also apply these rules using the GitHub REST API:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Apply master branch protection
|
|
28
|
+
curl -X POST \
|
|
29
|
+
-H "Authorization: token YOUR_TOKEN" \
|
|
30
|
+
-H "Accept: application/vnd.github+json" \
|
|
31
|
+
https://api.github.com/repos/OWNER/REPO/rulesets \
|
|
32
|
+
-d @master-branch-protection.json
|
|
33
|
+
|
|
34
|
+
# Apply dev branch rules
|
|
35
|
+
curl -X POST \
|
|
36
|
+
-H "Authorization: token YOUR_TOKEN" \
|
|
37
|
+
-H "Accept: application/vnd.github+json" \
|
|
38
|
+
https://api.github.com/repos/OWNER/REPO/rulesets \
|
|
39
|
+
-d @dev-branch-rules.json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Rule Customization
|
|
43
|
+
|
|
44
|
+
### Master Branch Protection
|
|
45
|
+
|
|
46
|
+
The master branch has strict protection:
|
|
47
|
+
- Requires 1 pull request approval
|
|
48
|
+
- All CI status checks must pass
|
|
49
|
+
- Prevents branch deletion
|
|
50
|
+
- Prevents force pushes
|
|
51
|
+
- Requires linear history
|
|
52
|
+
|
|
53
|
+
### Dev Branch Rules
|
|
54
|
+
|
|
55
|
+
The dev branch has lighter protection:
|
|
56
|
+
- Requires only lint checks to pass
|
|
57
|
+
- Prevents branch deletion
|
|
58
|
+
- Allows direct pushes for rapid development
|
|
59
|
+
|
|
60
|
+
### Modifying Rules
|
|
61
|
+
|
|
62
|
+
To modify these rules:
|
|
63
|
+
|
|
64
|
+
1. Edit the JSON file with your desired changes
|
|
65
|
+
2. Re-import using Method 1 or 2 above
|
|
66
|
+
3. Commit the changes to version control
|
|
67
|
+
|
|
68
|
+
### Understanding Bypass Actors
|
|
69
|
+
|
|
70
|
+
The `bypass_actors` section specifies who can bypass these rules:
|
|
71
|
+
- `actor_id: 5` with `RepositoryRole` typically refers to repository administrators
|
|
72
|
+
- `bypass_mode: always` means they can always bypass
|
|
73
|
+
|
|
74
|
+
**Important**: The `actor_id: 5` is a common default for repository admin role, but this may vary depending on your specific repository configuration. When importing these rulesets:
|
|
75
|
+
|
|
76
|
+
1. GitHub will automatically map the role if it exists
|
|
77
|
+
2. If the role mapping fails, you can adjust it in the GitHub UI after import
|
|
78
|
+
3. Alternatively, remove the `bypass_actors` section entirely if you want no bypasses
|
|
79
|
+
|
|
80
|
+
To find the correct `actor_id` for your repository:
|
|
81
|
+
- Navigate to Settings → Collaborators and teams
|
|
82
|
+
- Use the GitHub API: `GET /repos/{owner}/{repo}/collaborators` to see role IDs
|
|
83
|
+
- Or simply let GitHub handle the mapping during import
|
|
84
|
+
|
|
85
|
+
## Common Rule Types
|
|
86
|
+
|
|
87
|
+
Available rule types include:
|
|
88
|
+
- `pull_request` - Require pull request reviews
|
|
89
|
+
- `required_status_checks` - Require specific CI checks to pass
|
|
90
|
+
- `deletion` - Prevent branch deletion
|
|
91
|
+
- `non_fast_forward` - Prevent force pushes
|
|
92
|
+
- `required_linear_history` - Require linear history
|
|
93
|
+
- `required_signatures` - Require signed commits
|
|
94
|
+
|
|
95
|
+
## Documentation
|
|
96
|
+
|
|
97
|
+
For more information about the branching strategy, see [BRANCHING.md](../../BRANCHING.md) in the repository root.
|
|
98
|
+
|
|
99
|
+
For GitHub Rulesets documentation, visit:
|
|
100
|
+
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Dev Branch Rules",
|
|
3
|
+
"target": "branch",
|
|
4
|
+
"enforcement": "active",
|
|
5
|
+
"conditions": {
|
|
6
|
+
"ref_name": {
|
|
7
|
+
"include": [
|
|
8
|
+
"refs/heads/dev"
|
|
9
|
+
],
|
|
10
|
+
"exclude": []
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"rules": [
|
|
14
|
+
{
|
|
15
|
+
"type": "required_status_checks",
|
|
16
|
+
"parameters": {
|
|
17
|
+
"strict_required_status_checks_policy": false,
|
|
18
|
+
"required_status_checks": [
|
|
19
|
+
{
|
|
20
|
+
"context": "Lint and Format Check",
|
|
21
|
+
"integration_id": null
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "deletion"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"bypass_actors": [
|
|
31
|
+
{
|
|
32
|
+
"actor_id": 5,
|
|
33
|
+
"actor_type": "RepositoryRole",
|
|
34
|
+
"bypass_mode": "always"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Master Branch Protection",
|
|
3
|
+
"target": "branch",
|
|
4
|
+
"enforcement": "active",
|
|
5
|
+
"conditions": {
|
|
6
|
+
"ref_name": {
|
|
7
|
+
"include": [
|
|
8
|
+
"refs/heads/master"
|
|
9
|
+
],
|
|
10
|
+
"exclude": []
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"rules": [
|
|
14
|
+
{
|
|
15
|
+
"type": "pull_request",
|
|
16
|
+
"parameters": {
|
|
17
|
+
"required_approving_review_count": 1,
|
|
18
|
+
"dismiss_stale_reviews_on_push": true,
|
|
19
|
+
"require_code_owner_review": false,
|
|
20
|
+
"require_last_push_approval": false,
|
|
21
|
+
"required_review_thread_resolution": false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "required_status_checks",
|
|
26
|
+
"parameters": {
|
|
27
|
+
"strict_required_status_checks_policy": true,
|
|
28
|
+
"required_status_checks": [
|
|
29
|
+
{
|
|
30
|
+
"context": "Test Python 3.13",
|
|
31
|
+
"integration_id": null
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"context": "Lint and Format Check",
|
|
35
|
+
"integration_id": null
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"context": "Type Checking",
|
|
39
|
+
"integration_id": null
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "deletion"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "non_fast_forward"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "required_linear_history"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"bypass_actors": [
|
|
55
|
+
{
|
|
56
|
+
"actor_id": 5,
|
|
57
|
+
"actor_type": "RepositoryRole",
|
|
58
|
+
"bypass_mode": "always"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master, dev ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ master, dev ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Test Python ${{ matrix.python-version }}
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v5
|
|
22
|
+
with:
|
|
23
|
+
version: "latest"
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
run: uv python install ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Create virtual environment
|
|
29
|
+
run: uv venv
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
uv pip install -e ".[dev]"
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: |
|
|
37
|
+
source .venv/bin/activate
|
|
38
|
+
pytest --cov=schema_sentinel --cov-report=xml --cov-report=term-missing
|
|
39
|
+
|
|
40
|
+
- name: Upload coverage to Codecov
|
|
41
|
+
uses: codecov/codecov-action@v4
|
|
42
|
+
with:
|
|
43
|
+
file: ./coverage.xml
|
|
44
|
+
flags: unittests
|
|
45
|
+
name: codecov-umbrella
|
|
46
|
+
fail_ci_if_error: false
|
|
47
|
+
|
|
48
|
+
lint:
|
|
49
|
+
name: Lint and Format Check
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
|
|
55
|
+
- name: Install uv
|
|
56
|
+
uses: astral-sh/setup-uv@v5
|
|
57
|
+
with:
|
|
58
|
+
version: "latest"
|
|
59
|
+
|
|
60
|
+
- name: Set up Python
|
|
61
|
+
run: uv python install 3.13
|
|
62
|
+
|
|
63
|
+
- name: Create virtual environment
|
|
64
|
+
run: uv venv
|
|
65
|
+
|
|
66
|
+
- name: Install dependencies
|
|
67
|
+
run: |
|
|
68
|
+
uv pip install -e ".[dev]"
|
|
69
|
+
|
|
70
|
+
- name: Check code formatting with Ruff
|
|
71
|
+
run: |
|
|
72
|
+
source .venv/bin/activate
|
|
73
|
+
ruff format --check .
|
|
74
|
+
|
|
75
|
+
- name: Lint with Ruff
|
|
76
|
+
run: |
|
|
77
|
+
source .venv/bin/activate
|
|
78
|
+
ruff check .
|
|
79
|
+
|
|
80
|
+
type-check:
|
|
81
|
+
name: Type Checking
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v4
|
|
86
|
+
|
|
87
|
+
- name: Install uv
|
|
88
|
+
uses: astral-sh/setup-uv@v5
|
|
89
|
+
with:
|
|
90
|
+
version: "latest"
|
|
91
|
+
|
|
92
|
+
- name: Set up Python
|
|
93
|
+
run: uv python install 3.13
|
|
94
|
+
|
|
95
|
+
- name: Create virtual environment
|
|
96
|
+
run: uv venv
|
|
97
|
+
|
|
98
|
+
- name: Install dependencies
|
|
99
|
+
run: |
|
|
100
|
+
uv pip install -e ".[dev]"
|
|
101
|
+
|
|
102
|
+
- name: Type check with mypy
|
|
103
|
+
run: |
|
|
104
|
+
source .venv/bin/activate
|
|
105
|
+
mypy schema_sentinel/ --ignore-missing-imports
|
|
106
|
+
continue-on-error: true
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "pages"
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: '3.13'
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
run: |
|
|
31
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
32
|
+
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: |
|
|
36
|
+
uv venv
|
|
37
|
+
source .venv/bin/activate
|
|
38
|
+
uv pip install -e ".[dev]"
|
|
39
|
+
|
|
40
|
+
- name: Generate documentation
|
|
41
|
+
run: |
|
|
42
|
+
source .venv/bin/activate
|
|
43
|
+
pdoc schema_sentinel -o docs
|
|
44
|
+
|
|
45
|
+
- name: Setup Pages
|
|
46
|
+
uses: actions/configure-pages@v4
|
|
47
|
+
|
|
48
|
+
- name: Upload artifact
|
|
49
|
+
uses: actions/upload-pages-artifact@v3
|
|
50
|
+
with:
|
|
51
|
+
path: ./docs
|
|
52
|
+
|
|
53
|
+
deploy:
|
|
54
|
+
environment:
|
|
55
|
+
name: github-pages
|
|
56
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
needs: build
|
|
59
|
+
steps:
|
|
60
|
+
- name: Deploy to GitHub Pages
|
|
61
|
+
id: deployment
|
|
62
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- name: Set up Python
|
|
14
|
+
uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: '3.13'
|
|
17
|
+
|
|
18
|
+
- name: Install build dependencies
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade pip
|
|
21
|
+
pip install build twine
|
|
22
|
+
|
|
23
|
+
- name: Build package
|
|
24
|
+
run: python -m build
|
|
25
|
+
|
|
26
|
+
- name: Upload artifacts
|
|
27
|
+
uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: dist
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment: pypi
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write # Required for trusted publishing
|
|
38
|
+
steps:
|
|
39
|
+
- name: Download artifacts
|
|
40
|
+
uses: actions/download-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
|
|
45
|
+
- name: Publish to PyPI
|
|
46
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
47
|
+
# Uses trusted publishing - configure at pypi.org
|