Skip to content

chore: Repo maintainence #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 17 additions & 38 deletions .github/CODESTYLE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Code Style

The following is a general guide on how to style your work so that the project
remains consistent throughout all files. Please read this document in it's entirety
and refer to it throughout the development of your contribution.

1. [General Guidelines](#general-guidelines)
2. [Commit Message Guidelines](#commit-message-guidelines)
3. [Markdown Guidelines](#markdown-guidelines)


2. [Markdown Guidelines](#markdown-guidelines)

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

- Docstrings are to follow reST (reStructuredText Docstring Format) as specified in [PEP 287](https://peps.python.org/pep-0287/)
Listed is a example class used demonstrate general rules you should
follow throughout the development of your contribution.

- Docstrings are to follow reST (reStructuredText Docstring Format)
as specified in [PEP 287](https://peps.python.org/pep-0287/)
- Private attributes are to be prefixed with an underscore
- Use of [typing](https://docs.python.org/3/library/typing.html) type hints
- All files are to use 2 space indenting
Expand Down Expand Up @@ -54,40 +55,16 @@ class ExampleClass:
return value**2
```



## Commit Message Guidelines
When committing, commit messages are prefixed with one of the following depending on the type of change made.

- `feat:` when a new feature is introduced with the changes.
- `fix:` when a bug fix has occurred.
- `chore:` for changes that do not relate to a fix or feature and do not modify *source* or *tests*. (like updating dependencies)
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
- `docs:` when changes are made to documentation.
- `style:` when changes that do not affect the code, but modify formatting.
- `test:` when changes to tests are made.
- `perf:` for changes that improve performance.
- `ci:` for changes that affect CI.
- `build:` for changes that affect the build system or external dependencies.
- `revert:` when reverting changes.

Commit messages are also to begin with an uppercase character. Below list some example commit messages.

```sh
git commit -m "docs: Added README.md"
git commit -m "revert: Removed README.md"
git commit -m "docs: Moved README.md"
```


## Markdown Guidelines

Currently, documentation for this project resides in markdown files.
- Headings are to be separated with 3 lines
- Use of HTML comments is appreciated
- Use of HTML is permitted
- [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated
- Exceedingly long lines are to be broken
- The indents are to be 4 spaces

- Headings are to be separated with 3 lines
- Use of HTML comments is appreciated
- Use of HTML is permitted
- [Reference style links][reference-style-links] are not required by are appreciated
- Exceedingly long lines are to be broken
- The indents are to be 4 spaces

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

[Lorem Ipsum Generator]: https://loremipsum.io/generator/
```

[reference-style-links]: https://www.markdownguide.org/basic-syntax/#reference-style-links
27 changes: 0 additions & 27 deletions .github/CONTRIBUTING.md

This file was deleted.

21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"

# - package-ecosystem: "npm" # See documentation for possible values
# directory: "/" # Location of package manifests
# schedule:
# interval: "weekly"
17 changes: 1 addition & 16 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

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

"Type: Test":
- changed-files:
Expand All @@ -13,17 +12,3 @@ Documentation:
"Type: CI":
- changed-files:
- any-glob-to-any-file: [.github/workflows/**]

"Scope: Core":
- changed-files:
- any-glob-to-any-file: [src/**]
all-globs-to-all-files:
["!src/thread/decorators/*", "!src/thread/utils/*"]

"Scope: Utils":
- changed-files:
- any-glob-to-any-file: ["src/thread/utils/*"]

"Scope: Decorator":
- changed-files:
- any-glob-to-any-file: ["src/thread/decorators/*"]
15 changes: 3 additions & 12 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,6 @@ labels:
color: AEB1C2
description: Sync with upstream template

- name: "Scope: Core"
color: F9D0C4
description: A change that affects the core of thread

- name: "Scope: Decorator"
color: F9D0C4
description: A change that affects decorators

- name: "Scope: Utils"
color: 9BD0E6
description: A change that affects utilities or configuration

- name: "good first issue"
color: 008672
description: Good first issue
95 changes: 95 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# **Contributing**

When contributing to this repository,
please first discuss the change you wish to make via issue, email, or any other method
with the owners of this repository before making a change.

Please note we have a [code of conduct](./.github/CODE_OF_CONDUCT.md);
please follow it in all your interactions with the project.

## Table of Contents

<!-- prettier-ignore-start -->
<!--toc:start-->

1. [Pull Request Process](#pull-request-process)
2. [Issue Report Process](#issue-report-process)
3. [Commit Message Guidelines](#commit-message-guidelines)
4. [Code Quality](#code-quality)
- [Testing](#testing)
- [Linting](#linting)

<!--toc:end-->
<!-- prettier-ignore-end -->

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer
when doing a build.
2. Ensure that tests and linting pass.
3. Increase the version numbers in any examples files and the README.md
that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request once you have the sign-off of two other developers,
or if you do not have permission to do that, you may request the second reviewer
to merge it for you.

## Issue Report Process

1. Go to the project's issues.
2. Select the template that better fits your issue.
3. Read the instructions carefully and write within the template guidelines.
4. Submit it and wait for support.

## Commit Message Guidelines

When committing, commit messages are prefixed with one of the
following depending on the type of change made,
adhering to the [Conventional Commits](https://www.conventionalcommits.org/) standard.

- `feat:` when a new feature is introduced with the changes.
- `fix:` when a bug fix has occurred.
- `chore:` for changes that do not relate to a fix or feature and do not modify
_source_ or _tests_. (like updating dependencies)
- `refactor:` for refactoring code that neither fixes a bug nor adds a feature.
- `docs:` when changes are made to documentation.
- `style:` when changes that do not affect the code, but modify formatting.
- `test:` when changes to tests are made.
- `perf:` for changes that improve performance.
- `ci:` for changes that affect CI.
- `build:` for changes that affect the build system or external dependencies.
- `revert:` when reverting changes.

Commit messages are also to begin with an uppercase character.
Below list some example commit messages.

```sh
git commit -m "docs: Added README.md"
git commit -m "revert: Removed README.md"
git commit -m "docs: Moved README.md"
```

## Code Quality

### Testing

We use [Pytest](https://docs.pytest.org) to test our code.
Please ensure that tests are updated and pass before merging a Pull Request.

```sh
# To test your code, run:
pytest
```

### Linting

We use [Ruff](https://docs.astral.sh/ruff/)
to ensure that code is consistent and follows our [code style](./.github/CODESTYLE.md).
Please ensure that your code passes linting before merging a Pull Request.

```sh
# To lint your code, run:
ruff check

# To fix any linting errors, run:
ruff format
```