Skip to content

Commit

Permalink
v11.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Nov 20, 2024
1 parent 44ba56d commit 803983e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .ambient-package-update/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ambient_package_update.metadata.ruff_ignored_inspection import RuffIgnoredInspection

METADATA = PackageMetadata(
package_name="ambient_toolbox",
package_name="ambient-toolbox",
github_package_group="ambient-innovation",
company="Ambient Innovation: GmbH",
authors=[
Expand Down
33 changes: 5 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,6 @@ target/
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
Expand Down Expand Up @@ -155,9 +136,12 @@ 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
# 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/
.idea/

# Requirements.txt is managed by pip-tools
requirements.txt

# sphinx build folder
_build
Expand All @@ -169,13 +153,6 @@ _build
*.dll
*.exe
*.o
*.so

# PyCharm
.idea/

# Pip-tools creates these files
/requirements.txt

# Test databases
*.sqlite
10 changes: 5 additions & 5 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.6.9
rev: v0.7.4
hooks:
# Run the Ruff linter.
- id: ruff
Expand All @@ -12,15 +12,15 @@ repos:
- id: ruff-format

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

- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [ --py39-plus ]
Expand All @@ -34,7 +34,7 @@ repos:
stages: [ pre-push ]

- repo: https://github.com/adamchainz/djade-pre-commit
rev: 1.3.0
rev: 1.3.2
hooks:
- id: djade
args: [--target-version, "4.2"]
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

**11.5.5** (2024-11-20)
* Moved permission check to "apps.ready()" method
* Internal updates via `ambient-package-update`

**11.5.4** (2024-11-15)
* Internal updates via `ambient-package-update`

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.md
include LICENSE.md
recursive-exclude * *.pyc
recursive-include ambient_toolbox *.py *.html *.js *.cfg *.mo *.po
recursive-include ambient-toolbox *.py *.html *.js *.cfg *.mo *.po
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ The migration is really simple, just:

- Install the package via pip:

`pip install ambient_toolbox`
`pip install ambient-toolbox`

or via pipenv:

`pipenv install ambient_toolbox`
`pipenv install ambient-toolbox`

- Add module to `INSTALLED_APPS` within the main django `settings.py`:

````
```python
INSTALLED_APPS = (
...
'ambient_toolbox',
# ...
"ambient_toolbox",
)
````
```


- Apply migrations by running:
Expand Down Expand Up @@ -159,12 +159,12 @@ How to compile translation files:

- Create pull request / merge to master

- This project uses the flit package to publish to PyPI. Thus publishing should be as easy as running:
- This project uses the flit package to publish to PyPI. Thus, publishing should be as easy as running:
```
flit publish
```

To publish to TestPyPI use the following ensure that you have set up your .pypirc as
To publish to TestPyPI use the following to ensure that you have set up your .pypirc as
shown [here](https://flit.readthedocs.io/en/latest/upload.html#using-pypirc) and use the following command:

```
Expand All @@ -174,8 +174,8 @@ How to compile translation files:
### Maintenance

Please note that this package supports the [ambient-package-update](https://pypi.org/project/ambient-package-update/).
So you don't have to worry about the maintenance of this package. All important configuration and setup files are
being rendered by this updater. It works similar to well-known updaters like `pyupgrade` or `django-upgrade`.
So you don't have to worry about the maintenance of this package. This updater is rendering all important
configuration and setup files. It works similar to well-known updaters like `pyupgrade` or `django-upgrade`.

To run an update, refer to the [documentation page](https://pypi.org/project/ambient-package-update/)
of the "ambient-package-update".
Expand Down
2 changes: 1 addition & 1 deletion ambient_toolbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Python toolbox of Ambient Digital containing an abundance of useful tools and gadgets."""

__version__ = "11.5.4"
__version__ = "11.5.5"
12 changes: 6 additions & 6 deletions ambient_toolbox/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class AmbientToolboxConfig(AppConfig):
name = "ambient_toolbox"
verbose_name = _("Ambient Toolbox")

def ready(self):
if getattr(settings, "STATIC_ROLE_PERMISSIONS_PATH", None) and not (
getattr(settings, "STATIC_ROLE_PERMISSIONS_DISABLE_SYSTEM_CHECK", False)
):
from ambient_toolbox.static_role_permissions.system_check import check_permissions_against_models

if getattr(settings, "STATIC_ROLE_PERMISSIONS_PATH", None) and not (
getattr(settings, "STATIC_ROLE_PERMISSIONS_DISABLE_SYSTEM_CHECK", False)
):
from ambient_toolbox.static_role_permissions.system_check import check_permissions_against_models

register(check_permissions_against_models, Tags.models)
register(check_permissions_against_models, Tags.models)
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import django
from django.conf import settings

sys.path.insert(0, os.path.abspath("..")) # so that we can access the "ambient_toolbox" package
sys.path.insert(0, os.path.abspath("..")) # so that we can access the "ambient-toolbox" package
settings.configure(
INSTALLED_APPS=[
"django.contrib.admin",
Expand Down

0 comments on commit 803983e

Please sign in to comment.