Skip to content

Commit

Permalink
v24.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Jul 18, 2024
1 parent 51df687 commit e0d65d7
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.5.2
hooks:
# Run the Ruff linter.
- id: ruff
Expand All @@ -12,7 +12,7 @@ repos:
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
Expand All @@ -27,7 +27,7 @@ repos:
stages: [ push ]

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.18.0
rev: 1.19.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
Expand Down
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

**24.7.7 (2024-07-18)**

* Added SECURITY.md to templates
* Added new meta variable `github_package_group` to enable package maintenance not by Ambient
* Replaced fixed updater dependency version with asterisk import to avoid crashing pipelines due to pip caching in
GitHub actions
* Updated linters

**24.7.6 (2024-07-16)**
* Bugfix with GitHub actions

Expand Down
2 changes: 1 addition & 1 deletion ambient_package_update/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Ambient package update tool for clean and swift maintenance"""

__version__ = "24.7.6"
__version__ = "24.7.7"
4 changes: 1 addition & 3 deletions ambient_package_update/metadata/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from ambient_package_update import __version__

DEV_DEPENDENCIES = [
# Updater
"typer~=0.9",
Expand All @@ -20,7 +18,7 @@
"flit~=3.9",
"keyring~=25.2",
# Build
f"ambient-package-update~={__version__}",
"ambient-package-update==*",
]

SUPPORTED_DJANGO_VERSIONS = [
Expand Down
5 changes: 4 additions & 1 deletion ambient_package_update/metadata/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ class PackageMetadata:
dependencies: list[str]
supported_django_versions: list[str]
supported_python_versions: list[str]
github_package_group: str
min_coverage: float = 100.0
license: str = LICENSE_MIT
license_year: int = datetime.datetime.now(tz=datetime.UTC).year
module_name: Optional[str] = None
github_package_name: str = None
module_name: Optional[str] = None
optional_dependencies: dict[str, list[str]] = None
ruff_ignore_list: list[RuffIgnoredInspection] = None

def __post_init__(self):
if not self.module_name:
self.module_name = self.package_name.replace("-", "_")
if not self.github_package_name:
self.github_package_name = self.package_name.replace("_", "-")
6 changes: 3 additions & 3 deletions ambient_package_update/templates/.pre-commit-config.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.5.2
hooks:
# Run the Ruff linter.
- id: ruff
Expand All @@ -12,7 +12,7 @@ repos:
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies:
Expand All @@ -27,7 +27,7 @@ repos:
stages: [ push ]

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.18.0
rev: 1.19.0
hooks:
- id: django-upgrade
args: [--target-version, "{{ supported_django_versions.0 }}"]
Expand Down
18 changes: 18 additions & 0 deletions ambient_package_update/templates/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Reporting Security Issues

The maintainers of this package take security bugs seriously. We appreciate your efforts to responsibly
disclose your findings, and will make every effort to acknowledge your contributions.

To report a security issue, please use the GitHub Security
Advisory ["Report a Vulnerability"](https://github.com/{{ github_package_group|replace("_", "-") }}/{{ github_package_name|replace("_", "-") }}/security/advisories/new)
tab.

The maintainers will send a response indicating the next steps in handling your report. After the initial reply to
your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask
for additional information or guidance.

Report security bugs in third-party modules to the person or team maintaining the module.

## Source

This file was inspired by: https://github.com/electron/electron/blob/main/SECURITY.md
4 changes: 2 additions & 2 deletions ambient_package_update/templates/pyproject.toml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ dependencies = [{% for dependency in dependencies %}
name = "{{ module_name }}"

[project.urls]
'Homepage' = 'https://github.com/ambient-innovation/{{ github_package_name|replace("_", "-") }}/'
'Homepage' = 'https://github.com/{{ github_package_group|replace("_", "-") }}/{{ github_package_name|replace("_", "-") }}/'
'Documentation' = 'https://{{ package_name|replace("_", "-") }}.readthedocs.io/en/latest/index.html'
'Maintained by' = '{{ maintainer.url }}'
'Bugtracker' = 'https://github.com/ambient-innovation/{{ github_package_name|replace("_", "-") }}/issues'
'Bugtracker' = 'https://github.com/{{ github_package_group|replace("_", "-") }}/{{ github_package_name|replace("_", "-") }}/issues'
'Changelog' = 'https://{{ package_name|replace("_", "-") }}.readthedocs.io/en/latest/features/changelog.html'

[tool.ruff]
Expand Down
2 changes: 1 addition & 1 deletion ambient_package_update/templates/snippets/badges.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![PyPI release](https://img.shields.io/pypi/v/{{ package_name|replace("_", "-") }}.svg)](https://pypi.org/project/{{ package_name|replace("_", "-") }}/)
[![Downloads](https://static.pepy.tech/badge/{{ package_name|replace("_", "-") }})](https://pepy.tech/project/{{ package_name|replace("_", "-") }})
[![Coverage](https://img.shields.io/badge/Coverage-{{ min_coverage }}%25-success)](https://github.com/ambient-innovation/{{ github_package_name|replace("_", "-") }}/actions?workflow=CI)
[![Coverage](https://img.shields.io/badge/Coverage-{{ min_coverage }}%25-success)](https://github.com/{{ github_package_group|replace("_", "-") }}/{{ github_package_name|replace("_", "-") }}/actions?workflow=CI)
[![Linting](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Coding Style](https://img.shields.io/badge/code%20style-Ruff-000000.svg)](https://github.com/astral-sh/ruff)
[![Documentation Status](https://readthedocs.org/projects/{{ package_name|replace("_", "-") }}/badge/?version=latest)](https://{{ package_name|replace("_", "-") }}.readthedocs.io/en/latest/?badge=latest)
2 changes: 1 addition & 1 deletion ambient_package_update/templates/snippets/links.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* [PyPI](https://pypi.org/project/{{ package_name|replace("_", "-") }}/)
* [GitHub](https://github.com/ambient-innovation/{{ github_package_name|replace("_", "-") }})
* [GitHub](https://github.com/{{ github_package_group|replace("_", "-") }}/{{ github_package_name|replace("_", "-") }})
* [Full documentation](https://{{ package_name|replace("_", "-") }}.readthedocs.io/en/latest/index.html)
* Creator & Maintainer: [{{ maintainer.name }}]({{ maintainer.url }})

0 comments on commit e0d65d7

Please sign in to comment.