Skip to content

Commit 02afa82

Browse files
chore: Repo maintainence (#92)
* chore(labels): Remove scoped labels Ref: #88 Ref: #89 * chore(labels): Add gfi label Ref: #88 * ci(labeler): Remove .github/* and .github/workflows/* from doc label Ref: #88 * chore(dependabot): Add dependabot for GHactions Ref: #88 * chore(dependabot): Add dependabot for pip Ref: #88 * chore(contributing): Update CONTRIBUTING Ref: #88 * chore(codestyle): Update CODESTYLE Ref: #88 Signed-off-by: AlexNg <contact@ngjx.org>
1 parent cc2de51 commit 02afa82

File tree

6 files changed

+137
-93
lines changed

6 files changed

+137
-93
lines changed

.github/CODESTYLE.md

+17-38
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Code Style
2+
23
The following is a general guide on how to style your work so that the project
34
remains consistent throughout all files. Please read this document in it's entirety
45
and refer to it throughout the development of your contribution.
56

67
1. [General Guidelines](#general-guidelines)
7-
2. [Commit Message Guidelines](#commit-message-guidelines)
8-
3. [Markdown Guidelines](#markdown-guidelines)
9-
10-
8+
2. [Markdown Guidelines](#markdown-guidelines)
119

1210
## General Guidelines
13-
Listed is a example class used demonstrate general rules you should follow throughout the development of your contribution.
1411

15-
- Docstrings are to follow reST (reStructuredText Docstring Format) as specified in [PEP 287](https://peps.python.org/pep-0287/)
12+
Listed is a example class used demonstrate general rules you should
13+
follow throughout the development of your contribution.
14+
15+
- Docstrings are to follow reST (reStructuredText Docstring Format)
16+
as specified in [PEP 287](https://peps.python.org/pep-0287/)
1617
- Private attributes are to be prefixed with an underscore
1718
- Use of [typing](https://docs.python.org/3/library/typing.html) type hints
1819
- All files are to use 2 space indenting
@@ -54,40 +55,16 @@ class ExampleClass:
5455
return value**2
5556
```
5657

57-
58-
59-
## Commit Message Guidelines
60-
When committing, commit messages are prefixed with one of the following depending on the type of change made.
61-
62-
- `feat:` when a new feature is introduced with the changes.
63-
- `fix:` when a bug fix has occurred.
64-
- `chore:` for changes that do not relate to a fix or feature and do not modify *source* or *tests*. (like updating dependencies)
65-
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
66-
- `docs:` when changes are made to documentation.
67-
- `style:` when changes that do not affect the code, but modify formatting.
68-
- `test:` when changes to tests are made.
69-
- `perf:` for changes that improve performance.
70-
- `ci:` for changes that affect CI.
71-
- `build:` for changes that affect the build system or external dependencies.
72-
- `revert:` when reverting changes.
73-
74-
Commit messages are also to begin with an uppercase character. Below list some example commit messages.
75-
76-
```sh
77-
git commit -m "docs: Added README.md"
78-
git commit -m "revert: Removed README.md"
79-
git commit -m "docs: Moved README.md"
80-
```
81-
82-
8358
## Markdown Guidelines
59+
8460
Currently, documentation for this project resides in markdown files.
85-
- Headings are to be separated with 3 lines
86-
- Use of HTML comments is appreciated
87-
- Use of HTML is permitted
88-
- [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated
89-
- Exceedingly long lines are to be broken
90-
- The indents are to be 4 spaces
61+
62+
- Headings are to be separated with 3 lines
63+
- Use of HTML comments is appreciated
64+
- Use of HTML is permitted
65+
- [Reference style links][reference-style-links] are not required by are appreciated
66+
- Exceedingly long lines are to be broken
67+
- The indents are to be 4 spaces
9168

9269
```markdown
9370
<!--example markdown document-->
@@ -115,3 +92,5 @@ anim id est laborum. found [Lorem Ipsum Generator]
11592

11693
[Lorem Ipsum Generator]: https://loremipsum.io/generator/
11794
```
95+
96+
[reference-style-links]: https://www.markdownguide.org/basic-syntax/#reference-style-links

.github/CONTRIBUTING.md

-27
This file was deleted.

.github/dependabot.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
18+
# - package-ecosystem: "npm" # See documentation for possible values
19+
# directory: "/" # Location of package manifests
20+
# schedule:
21+
# interval: "weekly"

.github/labeler.yml

+1-16
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
Documentation:
55
- changed-files:
6-
- any-glob-to-any-file: [docs/**, .github/**, "./*.{md,mdx}"]
7-
- all-globs-to-all-files: "!.github/workflows/*"
6+
- any-glob-to-any-file: [docs/**, "./*.{md,mdx}"]
87

98
"Type: Test":
109
- changed-files:
@@ -13,17 +12,3 @@ Documentation:
1312
"Type: CI":
1413
- changed-files:
1514
- any-glob-to-any-file: [.github/workflows/**]
16-
17-
"Scope: Core":
18-
- changed-files:
19-
- any-glob-to-any-file: [src/**]
20-
all-globs-to-all-files:
21-
["!src/thread/decorators/*", "!src/thread/utils/*"]
22-
23-
"Scope: Utils":
24-
- changed-files:
25-
- any-glob-to-any-file: ["src/thread/utils/*"]
26-
27-
"Scope: Decorator":
28-
- changed-files:
29-
- any-glob-to-any-file: ["src/thread/decorators/*"]

.github/settings.yml

+3-12
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ labels:
9999
color: AEB1C2
100100
description: Sync with upstream template
101101

102-
- name: "Scope: Core"
103-
color: F9D0C4
104-
description: A change that affects the core of thread
105-
106-
- name: "Scope: Decorator"
107-
color: F9D0C4
108-
description: A change that affects decorators
109-
110-
- name: "Scope: Utils"
111-
color: 9BD0E6
112-
description: A change that affects utilities or configuration
113-
102+
- name: "good first issue"
103+
color: 008672
104+
description: Good first issue

CONTRIBUTING.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# **Contributing**
2+
3+
When contributing to this repository,
4+
please first discuss the change you wish to make via issue, email, or any other method
5+
with the owners of this repository before making a change.
6+
7+
Please note we have a [code of conduct](./.github/CODE_OF_CONDUCT.md);
8+
please follow it in all your interactions with the project.
9+
10+
## Table of Contents
11+
12+
<!-- prettier-ignore-start -->
13+
<!--toc:start-->
14+
15+
1. [Pull Request Process](#pull-request-process)
16+
2. [Issue Report Process](#issue-report-process)
17+
3. [Commit Message Guidelines](#commit-message-guidelines)
18+
4. [Code Quality](#code-quality)
19+
- [Testing](#testing)
20+
- [Linting](#linting)
21+
22+
<!--toc:end-->
23+
<!-- prettier-ignore-end -->
24+
25+
## Pull Request Process
26+
27+
1. Ensure any install or build dependencies are removed before the end of the layer
28+
when doing a build.
29+
2. Ensure that tests and linting pass.
30+
3. Increase the version numbers in any examples files and the README.md
31+
that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
32+
4. You may merge the Pull Request once you have the sign-off of two other developers,
33+
or if you do not have permission to do that, you may request the second reviewer
34+
to merge it for you.
35+
36+
## Issue Report Process
37+
38+
1. Go to the project's issues.
39+
2. Select the template that better fits your issue.
40+
3. Read the instructions carefully and write within the template guidelines.
41+
4. Submit it and wait for support.
42+
43+
## Commit Message Guidelines
44+
45+
When committing, commit messages are prefixed with one of the
46+
following depending on the type of change made,
47+
adhering to the [Conventional Commits](https://www.conventionalcommits.org/) standard.
48+
49+
- `feat:` when a new feature is introduced with the changes.
50+
- `fix:` when a bug fix has occurred.
51+
- `chore:` for changes that do not relate to a fix or feature and do not modify
52+
_source_ or _tests_. (like updating dependencies)
53+
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
54+
- `docs:` when changes are made to documentation.
55+
- `style:` when changes that do not affect the code, but modify formatting.
56+
- `test:` when changes to tests are made.
57+
- `perf:` for changes that improve performance.
58+
- `ci:` for changes that affect CI.
59+
- `build:` for changes that affect the build system or external dependencies.
60+
- `revert:` when reverting changes.
61+
62+
Commit messages are also to begin with an uppercase character.
63+
Below list some example commit messages.
64+
65+
```sh
66+
git commit -m "docs: Added README.md"
67+
git commit -m "revert: Removed README.md"
68+
git commit -m "docs: Moved README.md"
69+
```
70+
71+
## Code Quality
72+
73+
### Testing
74+
75+
We use [Pytest](https://docs.pytest.org) to test our code.
76+
Please ensure that tests are updated and pass before merging a Pull Request.
77+
78+
```sh
79+
# To test your code, run:
80+
pytest
81+
```
82+
83+
### Linting
84+
85+
We use [Ruff](https://docs.astral.sh/ruff/)
86+
to ensure that code is consistent and follows our [code style](./.github/CODESTYLE.md).
87+
Please ensure that your code passes linting before merging a Pull Request.
88+
89+
```sh
90+
# To lint your code, run:
91+
ruff check
92+
93+
# To fix any linting errors, run:
94+
ruff format
95+
```

0 commit comments

Comments
 (0)