Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Nov 22, 2023
1 parent 2db3d7b commit 24e895e
Show file tree
Hide file tree
Showing 92 changed files with 1,596 additions and 1,999 deletions.
22 changes: 9 additions & 13 deletions .github/generate_release.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
"""
generate_release.py
"""generate_release.py.
This script is used to generate the release.yml file as per
https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
Expand All @@ -20,18 +19,15 @@
"fix": "Bug Fixes",
"cut": "Cut",
"doc": "Documentation",
# "CI": "CI",
"bump": "Bump",
# "test": "Test",
"revert": "Revert",
"refactor": "Refactoring",
}


class SafeDumper(yaml.SafeDumper):
"""
Make yamllint happy
https://github.com/yaml/pyyaml/issues/234#issuecomment-765894586
"""Make yamllint happy
https://github.com/yaml/pyyaml/issues/234#issuecomment-765894586.
"""

# pylint: disable=R0901,W0613,W1113
Expand Down Expand Up @@ -60,7 +56,7 @@ def increase_indent(self, flow=False, *args, **kwargs):
{
"title": "Breaking Changes",
"labels": breaking_labels,
}
},
)

# Add new features
Expand All @@ -71,7 +67,7 @@ def increase_indent(self, flow=False, *args, **kwargs):
{
"title": "New features and enhancements",
"labels": feat_labels,
}
},
)

# Add fixes
Expand All @@ -82,7 +78,7 @@ def increase_indent(self, flow=False, *args, **kwargs):
{
"title": "Fixed issues",
"labels": fixes_labels,
}
},
)

# Add Documentation
Expand All @@ -93,23 +89,23 @@ def increase_indent(self, flow=False, *args, **kwargs):
{
"title": "Documentation",
"labels": doc_labels,
}
},
)

# Add the catch all
categories_list.append(
{
"title": "Other Changes",
"labels": ["*"],
}
},
)
with open(r"release.yml", "w", encoding="utf-8") as release_file:
yaml.dump(
{
"changelog": {
"exclude": {"labels": exclude_list},
"categories": categories_list,
}
},
},
release_file,
Dumper=SafeDumper,
Expand Down
43 changes: 4 additions & 39 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,11 @@ repos:
- --comment-style
- '<!--| ~| -->'

- repo: https://github.com/pycqa/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.6
hooks:
- id: isort
name: Check for changes when running isort on all python files

- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
name: Check for changes when running Black on all python files

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
name: Check for PEP8 error on Python files
args:
- --config=/dev/null
- --max-line-length=165

- repo: local # as per https://pylint.pycqa.org/en/latest/user_guide/installation/pre-commit-integration.html
hooks:
- id: pylint
entry: pylint
language: python
name: Check for Linting error on Python files
description: This hook runs pylint.
types: [python]
args:
- -rn # Only display messages
- -sn # Don't display the score
- --rcfile=pylintrc # Link to config file

# Prepare to turn on ruff
# - repo: https://github.com/astral-sh/ruff-pre-commit
# # Ruff version.
# rev: v0.0.280
# hooks:
# - id: ruff
- id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
Expand Down
Loading

0 comments on commit 24e895e

Please sign in to comment.