Skip to content

Commit

Permalink
v1.0.0 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon authored Nov 19, 2024
1 parent 4a71b7d commit e01b005
Show file tree
Hide file tree
Showing 31 changed files with 1,223 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .ambient-package-update/metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from ambient_package_update.metadata.author import PackageAuthor
from ambient_package_update.metadata.constants import (
DEV_DEPENDENCIES,
LICENSE_MIT,
SUPPORTED_DJANGO_VERSIONS,
SUPPORTED_PYTHON_VERSIONS,
)
from ambient_package_update.metadata.maintainer import PackageMaintainer
from ambient_package_update.metadata.package import PackageMetadata
from ambient_package_update.metadata.readme import ReadmeContent

METADATA = PackageMetadata(
package_name="django-removals",
github_package_group="ambient-innovation",
authors=[
PackageAuthor(
name="Ambient Digital",
email="[email protected]",
),
],
maintainer=PackageMaintainer(name="Ambient Digital", url="https://ambient.digital/", email="[email protected]"),
company="Ambient Innovation: GmbH",
license=LICENSE_MIT,
license_year=2024,
development_status="5 - Production/Stable",
has_migrations=False,
readme_content=ReadmeContent(uses_internationalisation=False),
dependencies=[
f"Django>={SUPPORTED_DJANGO_VERSIONS[0]}",
],
supported_django_versions=SUPPORTED_DJANGO_VERSIONS,
supported_python_versions=SUPPORTED_PYTHON_VERSIONS,
optional_dependencies={
"dev": [
*DEV_DEPENDENCIES,
],
},
ruff_ignore_list=[],
)
6 changes: 6 additions & 0 deletions .ambient-package-update/templates/snippets/content.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Features

This package will throw [Django system checks](https://docs.djangoproject.com/en/dev/topics/checks/)
warnings for all known removals from Django v1.0 to today.

It focuses on Django settings but might also add more checks in the future.
1 change: 1 addition & 0 deletions .ambient-package-update/templates/snippets/tagline.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to the **django-removals** - a maintainer's best friend for finding removed features in your Django project
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,rst,ini}]
indent_style = space
indent_size = 4
ij_continuation_indent_size = 8

[*.yml]
indent_style = space
indent_size = 2
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Unit tests

on:
push:
branches:
- master
pull_request:

jobs:
linting:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install required packages
run: pip install pre-commit

- name: Run pre-commit hooks
run: pre-commit run --all-files --hook-stage push


tests:
name: Python ${{ matrix.python-version }}, django ${{ matrix.django-version }}
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', ]
django-version: ['42', '50', '51', ]

exclude:
- python-version: '3.9'
django-version: 50
- python-version: '3.9'
django-version: 51

steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Run Tests
env:
TOXENV: django${{ matrix.django-version }}
run: tox
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: coverage-data-${{ matrix.python-version }}-${{ matrix.django-version }}
path: '${{ github.workspace }}/.coverage.*'
include-hidden-files: true
if-no-files-found: error

coverage:
name: Coverage
runs-on: ubuntu-24.04
needs: tests
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: python -m pip install --upgrade coverage[toml]

- name: Download data
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}
pattern: coverage-data-*
merge-multiple: true

- name: Combine coverage and fail if it's <100.0%
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100.0
echo "## Coverage summary" >> $GITHUB_STEP_SUMMARY
python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
136 changes: 136 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Requirements.txt is managed by pip-tools
requirements.txt
56 changes: 56 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# you find the full pre-commit-tools docu under:
# https://pre-commit.com/

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
# Run the Ruff linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the Ruff formatter.
- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies:
- black==24.10.0
files: '(?:README\.md|docs\/.*\.(?:md|rst))'

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [ --py39-plus ]
stages: [ pre-push ]

- repo: https://github.com/adamchainz/django-upgrade
rev: 1.22.1
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
stages: [ pre-push ]

- repo: https://github.com/adamchainz/djade-pre-commit
rev: 1.3.2
hooks:
- id: djade
args: [--target-version, "4.2"]
exclude: |
(?x)^(
charts/.*
|.*\.py
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: no-commit-to-branch
args:
[
"--pattern",
'^^(?!(?:feature|hotfix|bugfix|refactor|maintenance)/[\w\d\-_#]+).*$',
]
stages: [ pre-commit ]
31 changes: 31 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .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-24.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:
- method: pip
path: .
extra_requirements:
- dev
Loading

0 comments on commit e01b005

Please sign in to comment.