Skip to content

Commit

Permalink
chore(pre-commit): update Ruff hook to include custom config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlaloc-Es committed Dec 1, 2024
1 parent 61a9d45 commit d27d21f
Show file tree
Hide file tree
Showing 19 changed files with 165 additions and 106 deletions.
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
______________________________________________________________________

name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: Tlaloc-Es

---
______________________________________________________________________

**Issue description**
Describe the issue you are experiencing in detail.
Expand All @@ -20,9 +21,10 @@ Explain what you expected to happen when you encountered the issue.
Explain what actually happened when you encountered the issue.

**Environment**
- Python version:
- Library version:
- Operating system:

- Python version:
- Library version:
- Operating system:

**Additional context**
Provide any additional context or information that may be relevant to the issue, such as relevant documentation links, screenshots, or error logs.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
______________________________________________________________________

name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: Tlaloc-Es

---
______________________________________________________________________

**Feature description**
Describe the feature you are requesting in detail.
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
______________________________________________________________________

name: Question
about: Ask a question
title: "[QUESTION]"
labels: question
assignees: Tlaloc-Es

---
______________________________________________________________________

**Question**
State your question clearly and concisely.
Expand Down
39 changes: 21 additions & 18 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
---
______________________________________________________________________

name: Task
about: Use this template to track general tasks, such as improving documentation or minor adjustments
title: "[TASK]"
labels: task
assignees: Tlaloc-Es

---
______________________________________________________________________

**Task description**
**Task description**
Provide a detailed description of the task to be completed. Be clear and concise about the objective.

**Objective**
What is the expected outcome of completing this task?
**Objective**
What is the expected outcome of completing this task?
Example: "Complete the missing sections of the project documentation, focusing on the models module."

**Steps to complete**
List the steps required to complete this task, if applicable.
Example:
1. Review the current documentation structure.
2. Add missing sections for the `models` module.
3. Validate the documentation with `mkdocs serve`.
**Steps to complete**
List the steps required to complete this task, if applicable.
Example:

1. Review the current documentation structure.
1. Add missing sections for the `models` module.
1. Validate the documentation with `mkdocs serve`.

**Priority**

**Priority**
- [ ] Low
- [ ] Medium
- [ ] High
- [ ] Low
- [ ] Medium
- [ ] High

**Relevant links/files**
Include any links to documentation, code, or files that might help complete this task.
**Relevant links/files**
Include any links to documentation, code, or files that might help complete this task.

**Additional context**
**Additional context**
Add any additional information that might be useful, such as dependencies, deadlines, or suggestions.
2 changes: 1 addition & 1 deletion .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
4 changes: 2 additions & 2 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
- name: "build"
env:
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
id: build
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry build
poetry config pypi-token.pypi "$POETRY_PYPI_TOKEN_PYPI"
poetry publish
poetry publish
14 changes: 1 addition & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,11 @@ repos:
repo: https://github.com/commitizen-tools/commitizen
rev: v4.0.0

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3.8

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
hooks:
- id: ruff
args: [ --fix ]
args: [ --fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ mkdocs:

python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
64 changes: 64 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"src/interface",
"tests"
]

# Same as Black.
line-length = 88
indent-width = 4

# Assume Python 3.10
target-version = "py310"

[lint.mccabe]
max-complexity = 10

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
select = ["E", "F", "I", "N", "C", "W", "C90", "UP", "N", "PLC", "PLE", "PLR", "PLW"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[lint.pydocstyle]
convention = "pep257"

[format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
28 changes: 14 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

Expand All @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand All @@ -121,8 +121,8 @@ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

[homepage]: https://www.contributor-covenant.org
6 changes: 3 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Fair Source License, version 1.0

Permission is hereby granted to any person or entity that obtains a copy of the aipose software and associated documentation to use, modify, and distribute the software, provided that this license is retained with the software.

For any use of the software by a company or organization that generates more than $10,000 USD in annual revenue, a license fee of $100 USD per year is required.
For any use of the software by a company or organization that generates more than $10,000 USD in annual revenue, a license fee of $100 USD per year is required.

For any use of the software by a company or organization that generates more than $100,000 USD in annual revenue, a license fee of $1,000 USD per year is required.
For any use of the software by a company or organization that generates more than $100,000 USD in annual revenue, a license fee of $1,000 USD per year is required.

In addition, if you create a derivative work based on the aipose software, you must pay the original author a royalty of 1% of the gross revenue generated from the sale, distribution, or use of the derivative work.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This license applies to all versions previous and future.
This license applies to all versions previous and future.
Loading

0 comments on commit d27d21f

Please sign in to comment.