Skip to content

Commit c0624a2

Browse files
authored
Replaced html2text with beautifulsoup4 to make package available under MIT license (#33)
1 parent 5f9c8ea commit c0624a2

File tree

8 files changed

+118
-1439
lines changed

8 files changed

+118
-1439
lines changed

.ambient-package-update/metadata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from ambient_package_update.metadata.author import PackageAuthor
22
from ambient_package_update.metadata.constants import (
33
DEV_DEPENDENCIES,
4-
LICENSE_GPL,
4+
LICENSE_MIT,
55
SUPPORTED_DJANGO_VERSIONS,
66
SUPPORTED_PYTHON_VERSIONS,
77
)
@@ -21,14 +21,14 @@
2121
],
2222
maintainer=PackageMaintainer(name="Ambient Digital", url="https://ambient.digital/", email="[email protected]"),
2323
licenser="Ambient Innovation: GmbH",
24-
license=LICENSE_GPL,
24+
license=LICENSE_MIT,
2525
license_year=2023,
2626
development_status="5 - Production/Stable",
2727
has_migrations=False,
2828
readme_content=ReadmeContent(uses_internationalisation=True),
2929
dependencies=[
3030
f"Django>={SUPPORTED_DJANGO_VERSIONS[0]}",
31-
"html2text>=2020.1.16",
31+
"beautifulsoup4>=4.13",
3232
],
3333
supported_django_versions=SUPPORTED_DJANGO_VERSIONS,
3434
supported_python_versions=SUPPORTED_PYTHON_VERSIONS,

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
**2.7.0** (2025-05-21)
4+
* Replaced `html2text` with `beautifulsoup4` to make package available under MIT license
5+
* Switched back to MIT license
6+
* Added `CONTRIBUTING.md` file and removed contributing guidelines from readme
7+
* Maintenance updates via ambient-package-update
8+
39
**2.6.3** (2025-05-09)
410
* Replaced docstring type hints with proper Pythonic ones in test suit
511

CONTRIBUTING.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Contribute
2+
3+
## Setup package for development
4+
5+
- Create a Python virtualenv and activate it
6+
- Install "pip-tools" with `pip install -U pip-tools`
7+
- Compile the requirements with `pip-compile --extra dev, -o requirements.txt pyproject.toml --resolver=backtracking`
8+
- Sync the dependencies with your virtualenv with `pip-sync`
9+
10+
## Add functionality
11+
12+
- Create a new branch for your feature
13+
- Change the dependency in your requirements.txt to a local (editable) one that points to your local file system:
14+
`-e /Users/workspace/django-pony-express` or via pip `pip install -e /Users/workspace/django-pony-express`
15+
- Ensure the code passes the tests
16+
- Create a pull request
17+
18+
## Run tests
19+
20+
- Run tests
21+
````
22+
pytest --ds settings tests
23+
````
24+
25+
- Check coverage
26+
````
27+
coverage run -m pytest --ds settings tests
28+
coverage report -m
29+
````
30+
31+
## Git hooks (via pre-commit)
32+
33+
We use pre-push hooks to ensure that only linted code reaches our remote repository and pipelines aren't triggered in
34+
vain.
35+
36+
To enable the configured pre-push hooks, you need to [install](https://pre-commit.com/) pre-commit and run once:
37+
38+
pre-commit install -t pre-push -t pre-commit --install-hooks
39+
40+
This will permanently install the git hooks for both, frontend and backend, in your local
41+
[`.git/hooks`](./.git/hooks) folder.
42+
The hooks are configured in the [`.pre-commit-config.yaml`](templates/.pre-commit-config.yaml.tpl).
43+
44+
You can check whether hooks work as intended using the [run](https://pre-commit.com/#pre-commit-run) command:
45+
46+
pre-commit run [hook-id] [options]
47+
48+
Example: run single hook
49+
50+
pre-commit run ruff --all-files
51+
52+
Example: run all hooks of pre-push stage
53+
54+
pre-commit run --all-files --hook-stage push
55+
56+
## Update documentation
57+
58+
- To build the documentation, run: `sphinx-build docs/ docs/_build/html/`.
59+
- Open `docs/_build/html/index.html` to see the documentation.
60+
61+
62+
### Translation files
63+
64+
If you have added custom text, make sure to wrap it in `_()` where `_` is
65+
gettext_lazy (`from django.utils.translation import gettext_lazy as _`).
66+
67+
How to create translation file:
68+
69+
* Navigate to `django-pony-express`
70+
* `python manage.py makemessages -l de`
71+
* Have a look at the new/changed files within `django_pony_express/locale`
72+
73+
How to compile translation files:
74+
75+
* Navigate to `django-pony-express`
76+
* `python manage.py compilemessages`
77+
* Have a look at the new/changed files within `django_pony_express/locale`
78+

0 commit comments

Comments
 (0)