hexrift 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.
- hexrift-0.1.0/.github/CODEOWNERS +1 -0
- hexrift-0.1.0/.github/CONTRIBUTING.md +104 -0
- hexrift-0.1.0/.github/ISSUE_TEMPLATE/BUG-REPORT.yaml +49 -0
- hexrift-0.1.0/.github/ISSUE_TEMPLATE/FEATURE-REQUEST.yaml +31 -0
- hexrift-0.1.0/.github/ISSUE_TEMPLATE/config.yaml +1 -0
- hexrift-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +75 -0
- hexrift-0.1.0/.github/dependabot.yml +19 -0
- hexrift-0.1.0/.github/labels.yaml +95 -0
- hexrift-0.1.0/.github/release.yaml +49 -0
- hexrift-0.1.0/.github/workflows/check-commit-message-pr.yaml +87 -0
- hexrift-0.1.0/.github/workflows/check-schema-not-modified.yaml +16 -0
- hexrift-0.1.0/.github/workflows/ci-code-quality.yaml +32 -0
- hexrift-0.1.0/.github/workflows/create-tag.yaml +95 -0
- hexrift-0.1.0/.github/workflows/labels.yaml +25 -0
- hexrift-0.1.0/.github/workflows/update-schema.yaml +48 -0
- hexrift-0.1.0/.gitignore +220 -0
- hexrift-0.1.0/.pre-commit-config.yaml +42 -0
- hexrift-0.1.0/CODE_OF_CONDUCT.md +128 -0
- hexrift-0.1.0/LICENSE +7 -0
- hexrift-0.1.0/PKG-INFO +19 -0
- hexrift-0.1.0/README.md +106 -0
- hexrift-0.1.0/hexrift/__init__.py +1 -0
- hexrift-0.1.0/hexrift/__main__.py +23 -0
- hexrift-0.1.0/hexrift/app.py +70 -0
- hexrift-0.1.0/hexrift/components/__init__.py +0 -0
- hexrift-0.1.0/hexrift/components/derive/__init__.py +0 -0
- hexrift-0.1.0/hexrift/components/derive/component.py +276 -0
- hexrift-0.1.0/hexrift/components/derive/controller.py +219 -0
- hexrift-0.1.0/hexrift/components/derive/defaults.py +78 -0
- hexrift-0.1.0/hexrift/components/derive/identity.py +83 -0
- hexrift-0.1.0/hexrift/components/derive/topology.py +416 -0
- hexrift-0.1.0/hexrift/components/keys/__init__.py +0 -0
- hexrift-0.1.0/hexrift/components/keys/component.py +72 -0
- hexrift-0.1.0/hexrift/components/keys/controller.py +70 -0
- hexrift-0.1.0/hexrift/components/keys/decryption.py +69 -0
- hexrift-0.1.0/hexrift/components/keys/reality.py +30 -0
- hexrift-0.1.0/hexrift/components/keys/store.py +49 -0
- hexrift-0.1.0/hexrift/components/render/__init__.py +0 -0
- hexrift-0.1.0/hexrift/components/render/component.py +122 -0
- hexrift-0.1.0/hexrift/components/render/context.py +318 -0
- hexrift-0.1.0/hexrift/components/render/controller.py +83 -0
- hexrift-0.1.0/hexrift/components/render/haproxy.py +40 -0
- hexrift-0.1.0/hexrift/components/render/xray.py +385 -0
- hexrift-0.1.0/hexrift/components/schema/__init__.py +0 -0
- hexrift-0.1.0/hexrift/components/schema/component.py +40 -0
- hexrift-0.1.0/hexrift/components/schema/controller.py +59 -0
- hexrift-0.1.0/hexrift/components/schema/models/__init__.py +44 -0
- hexrift-0.1.0/hexrift/components/schema/models/defaults.py +46 -0
- hexrift-0.1.0/hexrift/components/schema/models/global_.py +13 -0
- hexrift-0.1.0/hexrift/components/schema/models/groups.py +6 -0
- hexrift-0.1.0/hexrift/components/schema/models/regions.py +53 -0
- hexrift-0.1.0/hexrift/components/schema/models/root.py +103 -0
- hexrift-0.1.0/hexrift/components/schema/models/routing.py +15 -0
- hexrift-0.1.0/hexrift/components/schema/models/shared.py +8 -0
- hexrift-0.1.0/hexrift/components/schema/models/users.py +24 -0
- hexrift-0.1.0/hexrift/constants.py +130 -0
- hexrift-0.1.0/hexrift/core/__init__.py +21 -0
- hexrift-0.1.0/hexrift/core/application.py +41 -0
- hexrift-0.1.0/hexrift/core/component.py +29 -0
- hexrift-0.1.0/hexrift/core/controller.py +12 -0
- hexrift-0.1.0/hexrift/core/model.py +26 -0
- hexrift-0.1.0/hexrift/core/types.py +13 -0
- hexrift-0.1.0/hexrift/errors.py +46 -0
- hexrift-0.1.0/hexrift/templates/haproxy/haproxy.cfg.j2 +125 -0
- hexrift-0.1.0/pyproject.toml +42 -0
- hexrift-0.1.0/uv.lock +547 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @wlix13
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Contribution Guidelines
|
|
2
|
+
|
|
3
|
+
First of all, thank you for your interest in the project.
|
|
4
|
+
|
|
5
|
+
Regardless of whether you are thinking about creating an issue or opening a pull request, I truly appreciate the help.
|
|
6
|
+
Without communication, I cannot know what the community wants, what they use or how they use it.
|
|
7
|
+
Pull requests and issues are exactly what gives me the visibility I need, so thank you.
|
|
8
|
+
|
|
9
|
+
## Getting started
|
|
10
|
+
|
|
11
|
+
While following the exact process is neither mandatory nor enforced, it is recommended to try following it as it may help avoid wasted efforts.
|
|
12
|
+
|
|
13
|
+
### Creating an issue
|
|
14
|
+
|
|
15
|
+
Whether you have a **question**, found a **bug**, would like to see a **new feature** added or anything along those lines, creating an issue is
|
|
16
|
+
going to be the first step. The issue templates will help guide you, but simply creating an issue with the reason for the creation
|
|
17
|
+
of said issue is perfectly fine.
|
|
18
|
+
|
|
19
|
+
Furthermore, if you don't want to fix the problem or implement the feature yourself, that's completely fine.
|
|
20
|
+
Creating an issue alone will give both the maintainers as well as the other members of the community visibility on said issue,
|
|
21
|
+
which is a lot more likely to get the issue resolved than if the problem/request was left untold.
|
|
22
|
+
|
|
23
|
+
### Solving an issue
|
|
24
|
+
|
|
25
|
+
Looking to contribute? Awesome! Look through the open issues in the repository, preferably those that are already labelled.
|
|
26
|
+
|
|
27
|
+
If you found one that interests you, try to make sure nobody's already working on it.
|
|
28
|
+
Adding a comment to the issue asking the maintainer if you can tackle it is a perfectly acceptable way of doing that!
|
|
29
|
+
|
|
30
|
+
If there's no issue yet for what you want to solve, start by [Creating an issue](#creating-an-issue), specify
|
|
31
|
+
you'd like to take a shot at solving it, and finally, wait for the maintainer to comment on the issue.
|
|
32
|
+
|
|
33
|
+
You don't _have_ to wait for the maintainer to comment on the issue before starting to work on it if you're sure that there's no other
|
|
34
|
+
similar existing issues, open or closed, but if the maintainer has commented, it means the maintainer has, based on the comment itself,
|
|
35
|
+
acknowledged the issue.
|
|
36
|
+
|
|
37
|
+
## Development Setup
|
|
38
|
+
|
|
39
|
+
### Package Management
|
|
40
|
+
|
|
41
|
+
This project **only** supports the `uv` installation method. Other tools, such as `conda`
|
|
42
|
+
or `pip`, don't provide any guarantees that they will install the correct
|
|
43
|
+
dependency versions. You will almost certainly have _random bugs, error messages,_, and other problems if you don't use `uv`.
|
|
44
|
+
Please _do not report any issues_ if you use non-standard installations, since almost all such issues are invalid.
|
|
45
|
+
|
|
46
|
+
Furthermore, `uv` is [up to 115x faster](https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md)
|
|
47
|
+
than `pip`, which is another _great_ reason to embrace the new industry-standard
|
|
48
|
+
for Python project management.
|
|
49
|
+
|
|
50
|
+
**Quick & Easy Installation Method:**
|
|
51
|
+
|
|
52
|
+
There are many convenient ways to install the uv command on your computer. Please check the link below to see all options.
|
|
53
|
+
|
|
54
|
+
[Installation Guide](https://docs.astral.sh/uv/getting-started/installation/)
|
|
55
|
+
|
|
56
|
+
Alternatively, if you want a very quick and easy method, you can install it as follows:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install -U uv
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Pre-commit Hooks (via prek)
|
|
63
|
+
|
|
64
|
+
This project uses pre-commit hooks to ensure code quality and consistency. Before making any commits, please install and set up prek:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Install prek (if not already installed)
|
|
68
|
+
uv tool install prek
|
|
69
|
+
# or use with uv run (as dev environment already has it covered)
|
|
70
|
+
uv run prek
|
|
71
|
+
|
|
72
|
+
# Install the pre-commit hooks
|
|
73
|
+
prek install
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The pre-commit hooks will automatically run on each commit to check for:
|
|
77
|
+
|
|
78
|
+
- Code formatting
|
|
79
|
+
- Linting issues
|
|
80
|
+
- Other quality checks
|
|
81
|
+
|
|
82
|
+
If any hooks fail, please fix the issues before committing. You can manually run all hooks with:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
prek run --all-files
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Commits
|
|
89
|
+
|
|
90
|
+
All commits are expected to follow the conventional commits specification.
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
<type>[scope]: <description>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
It's not a really big deal if you don't, but the commits in your PR might be squashed into a single commit
|
|
97
|
+
with the appropriate format at the reviewer's discretion.
|
|
98
|
+
|
|
99
|
+
Here's a few examples of good commit messages:
|
|
100
|
+
|
|
101
|
+
- `feat(api): Add endpoint to retrieve images`
|
|
102
|
+
- `fix(alerting): Remove bad parameter from Slack alerting provider`
|
|
103
|
+
- `test(security): Add tests for basic auth with bcrypt`
|
|
104
|
+
- `docs: Add paragraph on running the application locally`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: "Bug report"
|
|
2
|
+
description: "Found something that's not working as expected? Provide detailed information about the issue to help get it resolved."
|
|
3
|
+
labels:
|
|
4
|
+
- bug
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- id: description
|
|
8
|
+
type: textarea
|
|
9
|
+
validations:
|
|
10
|
+
required: true
|
|
11
|
+
attributes:
|
|
12
|
+
label: "Describe the bug"
|
|
13
|
+
description: "Tell what went wrong and how it's affecting your work."
|
|
14
|
+
|
|
15
|
+
- id: what-you-see
|
|
16
|
+
type: textarea
|
|
17
|
+
attributes:
|
|
18
|
+
label: "What do you see?"
|
|
19
|
+
description: "Share what's actually happening - error messages, unexpected behavior, or missing functionality. Screenshots are welcome!"
|
|
20
|
+
|
|
21
|
+
- id: what-you-expect
|
|
22
|
+
type: textarea
|
|
23
|
+
attributes:
|
|
24
|
+
label: "What do you expect to see?"
|
|
25
|
+
description: "Describe the intended behavior - what should have happened instead?"
|
|
26
|
+
|
|
27
|
+
- id: steps-to-reproduce
|
|
28
|
+
type: textarea
|
|
29
|
+
validations:
|
|
30
|
+
required: false
|
|
31
|
+
attributes:
|
|
32
|
+
label: "List the steps that must be taken to reproduce this issue"
|
|
33
|
+
description: "Provide exact steps to recreate this bug. Include any code snippets, configuration files, or commands used. The easier it is to reproduce, the quicker it can be fixed!"
|
|
34
|
+
placeholder: |
|
|
35
|
+
1. Start the application
|
|
36
|
+
2. Navigate to localhost:8080/metrics
|
|
37
|
+
3. No metrics are displayed
|
|
38
|
+
|
|
39
|
+
- id: version
|
|
40
|
+
type: input
|
|
41
|
+
attributes:
|
|
42
|
+
label: "Version"
|
|
43
|
+
description: "Which version of the project are you using? (check package.json, tags, or release notes if unsure)"
|
|
44
|
+
|
|
45
|
+
- id: additional-information
|
|
46
|
+
type: textarea
|
|
47
|
+
attributes:
|
|
48
|
+
label: "Additional information"
|
|
49
|
+
description: "Anything else that might help solve this? Environment details, related issues, or workarounds you've tried."
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: "Feature request"
|
|
2
|
+
description: "Have an idea that could improve this project? Share your suggestion and help shape the future development."
|
|
3
|
+
labels:
|
|
4
|
+
- feature
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- id: description
|
|
8
|
+
type: textarea
|
|
9
|
+
validations:
|
|
10
|
+
required: true
|
|
11
|
+
attributes:
|
|
12
|
+
label: "Describe the feature request"
|
|
13
|
+
description: "Describe the feature or improvement you'd like to see. Be as specific as possible about what it should do and how it should work."
|
|
14
|
+
|
|
15
|
+
- id: reason
|
|
16
|
+
type: textarea
|
|
17
|
+
attributes:
|
|
18
|
+
label: "Why would this feature be valuable?"
|
|
19
|
+
description: "Explain the problem this feature would solve or the benefit it would provide. Include use cases or scenarios where this would be helpful."
|
|
20
|
+
|
|
21
|
+
- id: usage-duration
|
|
22
|
+
type: input
|
|
23
|
+
attributes:
|
|
24
|
+
label: "How long have you been using this project?"
|
|
25
|
+
description: "This helps provide context for your request. Feel free to skip if you prefer not to answer."
|
|
26
|
+
|
|
27
|
+
- id: additional-information
|
|
28
|
+
type: textarea
|
|
29
|
+
attributes:
|
|
30
|
+
label: "Additional information"
|
|
31
|
+
description: "Any other details that might be relevant? Similar features in other tools, implementation ideas, or potential challenges to consider."
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
## Pull request type
|
|
2
|
+
|
|
3
|
+
<!-- Please check ONE that best describes this PR -->
|
|
4
|
+
|
|
5
|
+
- [ ] 🐛 **Bug fix** (fixes an issue with deployment or configuration)
|
|
6
|
+
- [ ] ✨ **New feature** (adds new deployment capability or server configuration)
|
|
7
|
+
- [ ] 🔄 **Enhancement** (improves existing deployment or infrastructure setup)
|
|
8
|
+
- [ ] 🏗️ **Infrastructure** (changes to server configuration or infrastructure)
|
|
9
|
+
- [ ] 🚀 **Deployment** (updates to deployment automation or processes)
|
|
10
|
+
- [ ] 📝 **Documentation** (updates to deployment guides or configuration docs)
|
|
11
|
+
- [ ] 🔒 **Security** (security improvements to server configuration)
|
|
12
|
+
- [ ] 📦 **Dependencies** (updates to pyinfra or other dependencies)
|
|
13
|
+
|
|
14
|
+
## Description
|
|
15
|
+
|
|
16
|
+
### What does this PR do?
|
|
17
|
+
|
|
18
|
+
<!-- Provide a clear and concise description of what this PR accomplishes -->
|
|
19
|
+
|
|
20
|
+
### Why is this change needed?
|
|
21
|
+
|
|
22
|
+
<!-- Explain the motivation and context for this change -->
|
|
23
|
+
|
|
24
|
+
### Related Issues
|
|
25
|
+
|
|
26
|
+
<!-- Link to related issues using "Fixes #123", "Closes #123", or "Relates to #123" -->
|
|
27
|
+
|
|
28
|
+
## Changes Made
|
|
29
|
+
|
|
30
|
+
<!-- Describe the changes you made. Use bullet points for clarity -->
|
|
31
|
+
|
|
32
|
+
-
|
|
33
|
+
-
|
|
34
|
+
-
|
|
35
|
+
|
|
36
|
+
## Testing
|
|
37
|
+
|
|
38
|
+
<!-- Describe how you tested your changes -->
|
|
39
|
+
|
|
40
|
+
- [ ] Tested deployment on development server
|
|
41
|
+
- [ ] Verified configuration changes work as expected
|
|
42
|
+
- [ ] No testing required (documentation changes only)
|
|
43
|
+
|
|
44
|
+
## Checklist
|
|
45
|
+
|
|
46
|
+
<!-- Ensure all applicable items are completed before requesting review -->
|
|
47
|
+
|
|
48
|
+
- [ ] Code follows project style guidelines
|
|
49
|
+
- [ ] Self-review completed
|
|
50
|
+
- [ ] Deployment tested on development environment
|
|
51
|
+
- [ ] Documentation updated (if applicable)
|
|
52
|
+
- [ ] No linter errors
|
|
53
|
+
|
|
54
|
+
## Security Considerations (if applicable)
|
|
55
|
+
|
|
56
|
+
<!-- Include if your changes have security implications -->
|
|
57
|
+
|
|
58
|
+
- [ ] Security improvement
|
|
59
|
+
- [ ] No security impact
|
|
60
|
+
- [ ] Potential security risk (explain below)
|
|
61
|
+
|
|
62
|
+
## Additional Context
|
|
63
|
+
|
|
64
|
+
<!-- Any other information that might be helpful for reviewers -->
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
<!--
|
|
69
|
+
Reminder: Please ensure your PR:
|
|
70
|
+
- Has a descriptive title
|
|
71
|
+
- Addresses a single concern
|
|
72
|
+
- Is based on the latest main branch
|
|
73
|
+
- Has been tested in a development environment
|
|
74
|
+
- Updates documentation as needed
|
|
75
|
+
-->
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
groups:
|
|
8
|
+
actions:
|
|
9
|
+
patterns:
|
|
10
|
+
- "*"
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "pip"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
groups:
|
|
17
|
+
python-deps:
|
|
18
|
+
patterns:
|
|
19
|
+
- "*"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Core Labels
|
|
2
|
+
- name: "bug"
|
|
3
|
+
description: "Something is not working"
|
|
4
|
+
color: "d73a4a"
|
|
5
|
+
|
|
6
|
+
- name: "feature"
|
|
7
|
+
description: "New feature or request"
|
|
8
|
+
color: "a2eeef"
|
|
9
|
+
|
|
10
|
+
- name: "enhancement"
|
|
11
|
+
description: "Improvement to existing functionality"
|
|
12
|
+
color: "a2eeef"
|
|
13
|
+
|
|
14
|
+
- name: "docs"
|
|
15
|
+
description: "Documentation updates"
|
|
16
|
+
color: "0075ca"
|
|
17
|
+
|
|
18
|
+
- name: "breaking-change"
|
|
19
|
+
description: "Breaking changes"
|
|
20
|
+
color: "b60205"
|
|
21
|
+
|
|
22
|
+
- name: "core"
|
|
23
|
+
description: "Core & Architecture changes"
|
|
24
|
+
color: "006b75"
|
|
25
|
+
|
|
26
|
+
- name: "security"
|
|
27
|
+
description: "Security-related changes"
|
|
28
|
+
color: "ee0701"
|
|
29
|
+
|
|
30
|
+
- name: "refactor"
|
|
31
|
+
description: "Code refactoring"
|
|
32
|
+
color: "cccccc"
|
|
33
|
+
|
|
34
|
+
- name: "cli"
|
|
35
|
+
description: "CLI & Commands"
|
|
36
|
+
color: "f9d0c4"
|
|
37
|
+
|
|
38
|
+
- name: "templates"
|
|
39
|
+
description: "Templates updates"
|
|
40
|
+
color: "c2e0c6"
|
|
41
|
+
|
|
42
|
+
- name: "tests"
|
|
43
|
+
description: "Testing"
|
|
44
|
+
color: "e99695"
|
|
45
|
+
|
|
46
|
+
- name: "ci-cd"
|
|
47
|
+
description: "CI/CD and automation"
|
|
48
|
+
color: "0052cc"
|
|
49
|
+
|
|
50
|
+
- name: "dependencies"
|
|
51
|
+
description: "Changes to dependencies"
|
|
52
|
+
color: "a569bd"
|
|
53
|
+
|
|
54
|
+
# PR Labels
|
|
55
|
+
- name: "duplicate"
|
|
56
|
+
description: "This issue or PR already exists"
|
|
57
|
+
color: "cfd3d7"
|
|
58
|
+
|
|
59
|
+
- name: "invalid"
|
|
60
|
+
description: "This doesn't seem right"
|
|
61
|
+
color: "e4e669"
|
|
62
|
+
|
|
63
|
+
- name: "wontfix"
|
|
64
|
+
description: "This will not be worked on"
|
|
65
|
+
color: "ffffff"
|
|
66
|
+
|
|
67
|
+
- name: "skip-changelog"
|
|
68
|
+
description: "Exclude from changelog"
|
|
69
|
+
color: "d4c5f9"
|
|
70
|
+
|
|
71
|
+
# Status Labels
|
|
72
|
+
- name: "needs review"
|
|
73
|
+
description: "Pull request needs code review"
|
|
74
|
+
color: "fbca04"
|
|
75
|
+
|
|
76
|
+
- name: "ready to merge"
|
|
77
|
+
description: "Pull request is approved and ready to merge"
|
|
78
|
+
color: "0e8a16"
|
|
79
|
+
|
|
80
|
+
- name: "in progress"
|
|
81
|
+
description: "Work is currently in progress"
|
|
82
|
+
color: "ededed"
|
|
83
|
+
|
|
84
|
+
# Priority Labels
|
|
85
|
+
- name: "priority: high"
|
|
86
|
+
description: "High priority issue or PR"
|
|
87
|
+
color: "d93f0b"
|
|
88
|
+
|
|
89
|
+
- name: "priority: medium"
|
|
90
|
+
description: "Medium priority issue or PR"
|
|
91
|
+
color: "fbca04"
|
|
92
|
+
|
|
93
|
+
- name: "priority: low"
|
|
94
|
+
description: "Low priority issue or PR"
|
|
95
|
+
color: "0e8a16"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
exclude:
|
|
3
|
+
labels:
|
|
4
|
+
- duplicate
|
|
5
|
+
- invalid
|
|
6
|
+
- wontfix
|
|
7
|
+
- skip-changelog
|
|
8
|
+
authors:
|
|
9
|
+
- dependabot
|
|
10
|
+
- dependabot[bot]
|
|
11
|
+
- github-actions[bot]
|
|
12
|
+
- renovate[bot]
|
|
13
|
+
|
|
14
|
+
categories:
|
|
15
|
+
- title: 💥 Breaking Changes
|
|
16
|
+
labels:
|
|
17
|
+
- breaking-change
|
|
18
|
+
- title: ✨ Features & Enhancements
|
|
19
|
+
labels:
|
|
20
|
+
- feature
|
|
21
|
+
- enhancement
|
|
22
|
+
- title: 🐛 Bug Fixes
|
|
23
|
+
labels:
|
|
24
|
+
- bug
|
|
25
|
+
- title: 🏗️ Core & Architecture
|
|
26
|
+
labels:
|
|
27
|
+
- core
|
|
28
|
+
- refactor
|
|
29
|
+
- title: ⚙️ CLI & Commands
|
|
30
|
+
labels:
|
|
31
|
+
- cli
|
|
32
|
+
- title: 📝 Templates
|
|
33
|
+
labels:
|
|
34
|
+
- templates
|
|
35
|
+
- title: 🔧 CI
|
|
36
|
+
labels:
|
|
37
|
+
- ci-cd
|
|
38
|
+
- title: 📚 Documentation
|
|
39
|
+
labels:
|
|
40
|
+
- docs
|
|
41
|
+
- title: 📦 Dependencies
|
|
42
|
+
labels:
|
|
43
|
+
- dependencies
|
|
44
|
+
- title: 🧪 Testing
|
|
45
|
+
labels:
|
|
46
|
+
- tests
|
|
47
|
+
- title: 📝 Other
|
|
48
|
+
labels:
|
|
49
|
+
- "*"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: 🔍 Check commit message in PR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- edited
|
|
8
|
+
- reopened
|
|
9
|
+
- synchronize
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
check-commit-message:
|
|
13
|
+
name: 🔍 Check commit message in PR
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
with:
|
|
19
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
20
|
+
|
|
21
|
+
- name: Check for fixup commits
|
|
22
|
+
uses: gsactions/commit-message-checker@v2
|
|
23
|
+
with:
|
|
24
|
+
pattern: "^(?!fixup!).*$"
|
|
25
|
+
flags: "si"
|
|
26
|
+
excludeDescription: "true"
|
|
27
|
+
excludeTitle: "false"
|
|
28
|
+
checkAllCommitMessages: "true"
|
|
29
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
error: |
|
|
31
|
+
Fixup commits are not allowed in pull requests.
|
|
32
|
+
|
|
33
|
+
Found commit message starting with "fixup!" which must be squashed before merging.
|
|
34
|
+
|
|
35
|
+
To squash fixup commits, use:
|
|
36
|
+
git rebase -i --autosquash origin/${{ github.event.pull_request.base.ref }}
|
|
37
|
+
|
|
38
|
+
Or manually squash the fixup commits with their target commits.
|
|
39
|
+
|
|
40
|
+
After squashing, force push the updated branch:
|
|
41
|
+
git push --force-with-lease origin ${{ github.event.pull_request.head.ref }}
|
|
42
|
+
|
|
43
|
+
- name: Check for Cyrillic characters
|
|
44
|
+
uses: gsactions/commit-message-checker@v2
|
|
45
|
+
with:
|
|
46
|
+
pattern: "^[^А-Яа-яёЁ]*$"
|
|
47
|
+
flags: "si"
|
|
48
|
+
excludeDescription: "false"
|
|
49
|
+
excludeTitle: "false"
|
|
50
|
+
checkAllCommitMessages: "true"
|
|
51
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
52
|
+
error: |
|
|
53
|
+
The commit message must contain only Latin characters.
|
|
54
|
+
Ensure there are no Cyrillic characters in the commit title or description.
|
|
55
|
+
|
|
56
|
+
- name: Check for conventional commit message
|
|
57
|
+
uses: gsactions/commit-message-checker@v2
|
|
58
|
+
with:
|
|
59
|
+
pattern: '^((feat|fix|build|chore|ci|docs|refactor|perf|style|test|revert)(\([\w\/-]+\))?!?: [^\n]+(\n\n(BREAKING CHANGE: [^\n]+|.+))?)$'
|
|
60
|
+
flags: "si"
|
|
61
|
+
excludeDescription: "true"
|
|
62
|
+
excludeTitle: "true"
|
|
63
|
+
checkAllCommitMessages: "true"
|
|
64
|
+
accessToken: ${{ secrets.GITHUB_TOKEN }}
|
|
65
|
+
error: |
|
|
66
|
+
The commit message does not follow the conventional commit format.
|
|
67
|
+
|
|
68
|
+
A conventional commit message should be in the format:
|
|
69
|
+
<type>[optional scope]: <description>
|
|
70
|
+
|
|
71
|
+
[optional body]
|
|
72
|
+
|
|
73
|
+
[optional BREAKING CHANGE footer]
|
|
74
|
+
|
|
75
|
+
Example:
|
|
76
|
+
feat(api): add new endpoint
|
|
77
|
+
|
|
78
|
+
Or for a breaking change:
|
|
79
|
+
feat!: send an email to the customer
|
|
80
|
+
|
|
81
|
+
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
|
|
82
|
+
|
|
83
|
+
Allowed types are: feat, fix, build, chore, ci, docs, refactor, perf, style, test, revert.
|
|
84
|
+
A '!' can be added after the type/scope for breaking changes (e.g., feat!:, feat(api)!:).
|
|
85
|
+
Alternatively, a 'BREAKING CHANGE:' footer can be used in the commit body.
|
|
86
|
+
|
|
87
|
+
Please rebase and amend the commit messages.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: 🔒 Schema not manually modified
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- "hexrift/components/schema/schema.json"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
check:
|
|
10
|
+
name: 🚫 Block manual schema.json edits
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Fail — schema.json must not be edited manually
|
|
14
|
+
run: |
|
|
15
|
+
echo "::error file=hexrift/components/schema/schema.json::schema.json is auto-generated. Do not edit it manually — it is updated automatically on push to main."
|
|
16
|
+
exit 1
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: 🔍 Check code quality
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
quality:
|
|
13
|
+
name: 🔍 Code Quality
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
|
|
18
|
+
- uses: astral-sh/setup-uv@v7
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
cache-dependency-glob: uv.lock
|
|
22
|
+
|
|
23
|
+
- run: uv sync --group dev
|
|
24
|
+
|
|
25
|
+
- name: Check formatting
|
|
26
|
+
run: uv run ruff format --check .
|
|
27
|
+
|
|
28
|
+
- name: Lint code
|
|
29
|
+
run: uv run ruff check .
|
|
30
|
+
|
|
31
|
+
- name: Type check
|
|
32
|
+
run: uv run ty check
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: 🚀 Tagged Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*" # Semantic version tags: v1.2.3
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
attestations: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: 📦 Build distribution
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- uses: astral-sh/setup-uv@v7
|
|
22
|
+
|
|
23
|
+
- run: uv build
|
|
24
|
+
|
|
25
|
+
- name: Upload distribution artifacts
|
|
26
|
+
uses: actions/upload-artifact@v5
|
|
27
|
+
with:
|
|
28
|
+
name: python-package-distributions
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
attest-artifacts:
|
|
32
|
+
name: 🔐 Generate artifact attestations
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
- name: Download distribution artifacts
|
|
38
|
+
uses: actions/download-artifact@v8
|
|
39
|
+
with:
|
|
40
|
+
name: python-package-distributions
|
|
41
|
+
path: dist/
|
|
42
|
+
|
|
43
|
+
- name: Generate artifact attestations
|
|
44
|
+
uses: actions/attest-build-provenance@v4
|
|
45
|
+
with:
|
|
46
|
+
subject-path: dist/*
|
|
47
|
+
|
|
48
|
+
publish-pypi:
|
|
49
|
+
name: 📤 Publish to PyPI
|
|
50
|
+
needs: build
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
environment:
|
|
53
|
+
name: pypi
|
|
54
|
+
url: https://pypi.org/project/netloom/
|
|
55
|
+
permissions:
|
|
56
|
+
id-token: write
|
|
57
|
+
|
|
58
|
+
steps:
|
|
59
|
+
- uses: astral-sh/setup-uv@v7
|
|
60
|
+
|
|
61
|
+
- name: Download distribution artifacts
|
|
62
|
+
uses: actions/download-artifact@v8
|
|
63
|
+
with:
|
|
64
|
+
name: python-package-distributions
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- name: Publish to PyPI
|
|
68
|
+
run: uv publish --trusted-publishing always
|
|
69
|
+
|
|
70
|
+
create-release:
|
|
71
|
+
name: 📋 Create GitHub Release
|
|
72
|
+
needs: [publish-pypi, attest-artifacts]
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
permissions:
|
|
75
|
+
contents: write
|
|
76
|
+
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v6
|
|
79
|
+
|
|
80
|
+
- name: Download distribution artifacts
|
|
81
|
+
uses: actions/download-artifact@v8
|
|
82
|
+
with:
|
|
83
|
+
name: python-package-distributions
|
|
84
|
+
path: dist/
|
|
85
|
+
|
|
86
|
+
- name: Create GitHub Release
|
|
87
|
+
env:
|
|
88
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
89
|
+
TAG_NAME: ${{ github.ref_name }}
|
|
90
|
+
run: |
|
|
91
|
+
gh release create $TAG_NAME \
|
|
92
|
+
--title "🚀 Release $TAG_NAME" \
|
|
93
|
+
--verify-tag \
|
|
94
|
+
--generate-notes \
|
|
95
|
+
dist/*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: 🏷️ Sync labels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- .github/labels.yaml
|
|
9
|
+
workflow_dispatch: {}
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
labels:
|
|
13
|
+
name: 🏷️ Sync labels
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
issues: write
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
- uses: micnncim/action-label-syncer@v1.3.0
|
|
22
|
+
env:
|
|
23
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
+
with:
|
|
25
|
+
manifest: .github/labels.yaml
|