Skip to content

Commit

Permalink
v23.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Vedrilla committed Oct 26, 2023
1 parent 9cf3e59 commit d389507
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 38 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

**23.10.3 (2023-10-26)**
* Added custom_installation metadata (renamed from `installation`)
* Added additional_information metadata
* Added flag for rendering migration related things in metadata
* Added migration validator to GitHub actions
* Removed HTML coverage report in GitHub actions
* Updated readthedocs.yml template

**23.10.2 (2023-10-20)**
* Add coverage check to CI pipeline
* Enforced 100% coverage and added badge
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__ = '23.10.2'
__version__ = '23.10.3'
1 change: 1 addition & 0 deletions ambient_package_update/metadata/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class PackageMetadata:
authors: list[PackageAuthor]
development_status: str
readme_content: ReadmeContent
has_migrations: bool
dependencies: list[str]
supported_django_versions: list[str]
supported_python_versions: list[str]
Expand Down
3 changes: 2 additions & 1 deletion ambient_package_update/metadata/readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
class ReadmeContent:
tagline: str
content: Optional[str] = None
installation: Optional[str] = None
custom_installation: Optional[str] = None
additional_installation: Optional[str] = None
12 changes: 3 additions & 9 deletions ambient_package_update/templates/.github/workflows/ci.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ jobs:
- name: Run Tests
env:
TOXENV: django${% raw %}{{ matrix.django-version }}{% endraw %}
run: tox
run: tox{% if has_migrations %}
- name: Validate migration integrity
run: python manage.py makemigrations --check --dry-run{% endif %}
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -76,13 +78,5 @@ jobs:

- name: Combine coverage and fail if it's <100%
run: |
# python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100

- name: Upload HTML report
if: ${% raw %}{{ failure() }}{% endraw %}
uses: actions/upload-artifact@v3
with:
name: html-report
path: htmlcov
28 changes: 28 additions & 0 deletions ambient_package_update/templates/.readthedocs.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
24 changes: 0 additions & 24 deletions ambient_package_update/templates/.readthedocs.yml.tpl

This file was deleted.

12 changes: 10 additions & 2 deletions ambient_package_update/templates/README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

## Installation

{% if readme_content.installation %}
{{ readme_content.installation }}
{% if readme_content.custom_installation %}
{{ readme_content.custom_installation }}
{% else %}
- Install the package via pip:

Expand All @@ -35,6 +35,14 @@
'{{ package_name }}',
)
````

{% if has_migrations %}
- Apply migrations by running:

`python ./manage.py migrate`
{% endif %}

{% if readme_content.additional_installation %}{{ readme_content.additional_installation }}{% endif %}
{% endif %}

## Contribute
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ classifiers = [
]
dynamic = ["version", "description"]
license = {"file" = "LICENSE.md"}
dependencies = [
dependencies = []

[project.optional-dependencies]
dev = [
# Rendering
'typer~=0.9',
'Jinja2~=3.1',
# Deploy
'flit~=3.9',
'keyring~=24.2',
# Linting
Expand Down

0 comments on commit d389507

Please sign in to comment.