Skip to content

Commit

Permalink
v9.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Vedrilla committed Nov 6, 2023
1 parent c80d4cc commit b576774
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .ambient-package-update/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
email="[email protected]",
),
],
min_coverage=96.62,
development_status="5 - Production/Stable",
license=LICENSE_MIT,
license_year=2012,
Expand Down Expand Up @@ -84,5 +85,7 @@
RuffIgnoredInspection(key="B905", comment="Can be enabled when Python <=3.9 support is dropped"),
RuffIgnoredInspection(key="DTZ001", comment='TODO will affect "tz_today()" method'),
RuffIgnoredInspection(key="DTZ005", comment='TODO will affect "tz_today()" method'),
RuffIgnoredInspection(key="TD002", comment="Missing author in TODO"),
RuffIgnoredInspection(key="TD003", comment="Missing issue link on the line following this TODO"),
],
)
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ jobs:
- name: Combine coverage and fail if it's <100%
run: |
python -m coverage html --skip-covered --skip-empty
python -m coverage report --fail-under=100
python -m coverage report --fail-under=96.62
2 changes: 1 addition & 1 deletion .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.1.3
rev: v0.1.4
hooks:
# Run the Ruff linter.
- id: ruff
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* Added migration docs to Readme
* Added migration check to GitHub actions
* Switched formatter from `black` to `ruff`
* Updates from ambient updater
* Enforcing minimum coverage in CI/CD pipeline
* Further updates from ambient updater package
* Fixes typos

**9.1.5** (2023-10-31)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![PyPI release](https://img.shields.io/pypi/v/ambient-toolbox.svg)](https://pypi.org/project/ambient-toolbox/)
[![Downloads](https://static.pepy.tech/badge/ambient-toolbox)](https://pepy.tech/project/ambient-toolbox)
[![Coverage](https://img.shields.io/badge/Coverage-100%25-success)](https://github.com/ambient-innovation/ambient-toolbox/actions?workflow=CI)
[![Coverage](https://img.shields.io/badge/Coverage-96.62%25-success)](https://github.com/ambient-innovation/ambient-toolbox/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/ambient-toolbox/badge/?version=latest)](https://ambient-toolbox.readthedocs.io/en/latest/?badge=latest)
Expand Down
1 change: 0 additions & 1 deletion ambient_toolbox/mixins/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class PermissionModelMixin:
class Meta:
# No database table creation or deletion operations will be performed for this model.
managed = False
# todo brauchen wir das? default_permissions = []


class SaveWithoutSignalsMixin:
Expand Down
2 changes: 1 addition & 1 deletion ambient_toolbox/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_request(
request = factory.get(url)

# Set user object if it is of a valid type
# todo remove noqa when we drop older python support
# TODO: remove noqa when we drop older python support
if user is None or isinstance(user, AbstractBaseUser) or isinstance(user, AnonymousUser): # noqa: PLR1701
request.user = user
else:
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dev = [
'sphinx-rtd-theme==1.0.0',
'm2r2==0.3.1',
'mistune<2.0.0',
'ambient-package-update~=23.10.7',
'ambient-package-update~=23.10.8',
'gevent~=22.10',
]
drf = [
Expand Down Expand Up @@ -87,6 +87,7 @@ select = [
"A", # flake8-builtins
"DTZ", # flake8-datetimez
"DJ", # flake8-django
"TD", # flake8-to-do
"RUF100", # Removes unnecessary "#noqa" comments
"YTT", # Avoid non-future-prove usages of "sys"
# "FBT", # Protects you from the "boolean trap bug"
Expand All @@ -105,6 +106,8 @@ ignore = [
'B905', # Can be enabled when Python <=3.9 support is dropped
'DTZ001', # TODO will affect "tz_today()" method
'DTZ005', # TODO will affect "tz_today()" method
'TD002', # Missing author in TODO
'TD003', # Missing issue link on the line following this TODO
]

# Allow autofix for all enabled rules (when `--fix`) is provided.
Expand All @@ -118,6 +121,7 @@ fixable = [
"A", # flake8-builtins
"DTZ", # flake8-datetimez
"DJ", # flake8-django
"TD", # flake8-to-do
"RUF100", # Removes unnecessary "#noqa" comments
"YTT", # Avoid non-future-prove usages of "sys"
# "FBT", # Protects you from the "boolean trap bug"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scrubbing_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def test_get_hashed_default_password_regular(self, mocked_make_password):
self.service._get_hashed_default_password()
mocked_make_password.assert_called_once_with(self.service.DEFAULT_USER_PASSWORD)

# todo write more tests
# TODO: write more tests

0 comments on commit b576774

Please sign in to comment.