Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy release v0.7.0 #249

Merged
merged 26 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
81b7e96
feat(models): Add improved `__repr__()` to `User` model
jtrobles-cdd Jul 10, 2023
8cd1525
Merge pull request #242 from fyntex/feature/improve-user-repr-str
jtrobles-cdd Jul 10, 2023
0aad6d3
chore: Update Docker Compose to version 2
jtrobles-cdd Jul 10, 2023
7bf5c6e
fix: Fix broken Make task `docker-compose-run-test`
jtrobles-cdd Jul 10, 2023
890cca3
Merge pull request #243 from fyntex/bugfix/broken-make-docker-compose…
jtrobles-cdd Jul 10, 2023
ab32347
chore: Bump codecov/codecov-action from 3.1.2 to 3.1.4
dependabot[bot] Jul 10, 2023
3ff54c3
Merge pull request #241 from fyntex/dependabot/github_actions/codecov…
jtrobles-cdd Jul 10, 2023
f5f8ad9
chore: Bump actions/setup-python from 4.5.0 to 4.7.0
dependabot[bot] Jul 14, 2023
7006362
Merge pull request #244 from fyntex/dependabot/github_actions/actions…
jtrobles-cdd Jul 14, 2023
3abbfa4
chore(deps): Bump flake8 from 3.8.4 to 6.0.0
dependabot[bot] Jul 14, 2023
4fbf03b
Merge pull request #231 from fyntex/dependabot/pip/flake8-6.0.0
jtrobles-cdd Jul 14, 2023
3d482cb
chore: Bump actions/checkout from 3.3.0 to 3.5.3
dependabot[bot] Jul 14, 2023
5bf1de4
Merge pull request #240 from fyntex/dependabot/github_actions/actions…
jtrobles-cdd Jul 14, 2023
338e1db
chore: Bump actions/dependency-review-action from 3.0.4 to 3.0.6
dependabot[bot] Jul 14, 2023
75cb9cb
Merge pull request #237 from fyntex/dependabot/github_actions/actions…
jtrobles-cdd Jul 14, 2023
9efd52f
chore(deps): Bump coverage from 7.2.1 to 7.2.7
dependabot[bot] Jul 14, 2023
2e99c42
Merge pull request #235 from fyntex/dependabot/pip/coverage-7.2.7
jtrobles-cdd Jul 14, 2023
6b54bb4
chore(deps): Bump mypy from 1.1.1 to 1.4.1
dependabot[bot] Jul 25, 2023
9e2c2e4
Merge pull request #247 from cordada/dependabot/pip/mypy-1.4.1
jtrobles-cdd Jul 25, 2023
2100504
chore(deps): Bump setuptools from 67.6.0 to 68.0.0
dependabot[bot] Jul 25, 2023
3406602
Merge pull request #246 from cordada/dependabot/pip/setuptools-68.0.0
dependabot[bot] Jul 25, 2023
b26e861
chore(deps): Bump twine from 4.0.1 to 4.0.2
dependabot[bot] Jul 25, 2023
223d171
Merge pull request #245 from cordada/dependabot/pip/twine-4.0.2
dependabot[bot] Jul 25, 2023
7257c90
chore: Update history for new version
fpinto-cdd Jul 26, 2023
4abb205
chore: Bump version: 0.6.1 → 0.7.0
fpinto-cdd Jul 26, 2023
31b6aba
Merge pull request #248 from cordada/release/v0.7.0
fpinto-cdd Jul 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.6.1
current_version = 0.7.0
commit = True
tag = False

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:

steps:
- name: Check Out VCS Repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.3

- name: Set Up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.7.0
with:
python-version: "${{ matrix.python_version }}"

Expand Down Expand Up @@ -93,10 +93,10 @@ jobs:

steps:
- name: Check Out VCS Repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.3

- name: Set Up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.7.0
with:
python-version: "${{ matrix.python_version }}"

Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
make test-coverage-report

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.2
uses: codecov/codecov-action@v3.1.4
with:
directory: ./test-reports/coverage/
fail_ci_if_error: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:

steps:
- name: Check Out VCS Repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.3

- name: Dependency Review
uses: actions/dependency-review-action@v3.0.4
uses: actions/dependency-review-action@v3.0.6
with:
fail-on-severity: critical
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Check Out VCS Repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.3

- name: Set Up Python
id: set_up_python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.7.0
with:
python-version: "3.10.9"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Check Out VCS Repository
uses: actions/checkout@v3.3.0
uses: actions/checkout@v3.5.3

- name: Set Up Python
id: set_up_python
uses: actions/setup-python@v4.5.0
uses: actions/setup-python@v4.7.0
with:
python-version: "3.10.9"

Expand Down
15 changes: 15 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ History
unreleased (YYYY-MM-DD)
+++++++++++++++++++++++

0.7.0 (2023-06-09)
++++++++++++++++++

- (PR #242, 2023-07-10) Add improved `__repr__()` to `User` model
- (PR #243, 2023-07-10) Fix broken Make task `docker-compose-run-test`
- (PR #241, 2023-07-10) chore: Bump codecov/codecov-action from 3.1.2 to 3.1.4
- (PR #244, 2023-07-14) chore: Bump actions/setup-python from 4.5.0 to 4.7.0
- (PR #231, 2023-07-14) chore(deps): Bump flake8 from 3.8.4 to 6.0.0
- (PR #240, 2023-07-14) chore: Bump actions/checkout from 3.3.0 to 3.5.3
- (PR #237, 2023-07-14) chore: Bump actions/dependency-review-action from 3.0.4 to 3.0.6
- (PR #235, 2023-07-14) chore(deps): Bump coverage from 7.2.1 to 7.2.7
- (PR #247, 2023-07-25) chore(deps): Bump mypy from 1.1.1 to 1.4.1
- (PR #246, 2023-07-25) chore(deps): Bump setuptools from 67.6.0 to 68.0.0
- (PR #245, 2023-07-25) chore(deps): Bump twine from 4.0.1 to 4.0.2

0.6.1 (2023-06-09)
++++++++++++++++++

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ python-pip-install: ## Install Pip

docker-compose-run-test: export COMPOSE_FILE = docker-compose.yml:docker-compose.test.yml
docker-compose-run-test: ## Run tests with Docker Compose
docker-compose run --rm -- app-python3.8
docker-compose run --rm -- app-python3.9
docker-compose run --rm -- app-python3.10
docker compose run --rm --env TOXENV=py38 -- app-python3.8
docker compose run --rm --env TOXENV=py39 -- app-python3.9
docker compose run --rm --env TOXENV=py310 -- app-python3.10
1 change: 1 addition & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
- DATABASE_USERNAME=${DATABASE_USERNAME:-app}
- PYTHONBREAKPOINT
- PYTHONDONTWRITEBYTECODE=true
- TOXENV
depends_on:
- db-test
volumes:
Expand Down
2 changes: 1 addition & 1 deletion fd_dj_accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"""


__version__ = '0.6.1'
__version__ = '0.7.0'


default_app_config = 'fd_dj_accounts.apps.AccountsAppConfig'
11 changes: 11 additions & 0 deletions fd_dj_accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class User(base_models.BaseUser):
- Override :meth:`save` to make sure full validation is performed before
each and every save (including creation).
- Custom model manager.
- Custom :meth:`__repr__` that includes the user’s ``id`` in addition to the username.

.. seealso:: :class:`AnonymousUser`.

Expand Down Expand Up @@ -146,6 +147,16 @@ class Meta:
verbose_name = 'user'
verbose_name_plural = 'users'

def __repr__(self) -> str:
# fmt: off
return (
f"<{self.__class__.__name__}("
f"id={self.id!r},"
f" {self.USERNAME_FIELD}={self.get_username()!r}"
f")>"
)
# fmt: on

def save(self, *args: Any, **kwargs: Any) -> None:
"""Call :meth:`full_clean` before saving."""
self.full_clean()
Expand Down
4 changes: 2 additions & 2 deletions requirements_release.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt

bumpversion==0.5.3
setuptools==67.6.0
twine==4.0.1
setuptools==68.0.0
twine==4.0.2
wheel==0.40.0
6 changes: 3 additions & 3 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r requirements.txt

coverage==7.2.1
flake8==3.8.4
mypy==1.1.1
coverage==7.2.7
flake8==6.0.0
mypy==1.4.1
psycopg2==2.9.3 --no-binary psycopg2
tox==3.26.0
15 changes: 15 additions & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from uuid import UUID

from django.test import SimpleTestCase, TestCase

from fd_dj_accounts.models import AnonymousUser, User, UserManager, get_or_create_system_user
Expand Down Expand Up @@ -83,6 +85,19 @@ def test_create_superuser_raises_error_on_false_is_staff(self): # type: ignore

class UserTestCase(TestCase):

def test_repr(self) -> None:
user = User(
id=UUID('12caf218-0001-45d4-b4df-44ff87f19989'),
email_address='user@example.com',
)
self.assertEqual(
repr(user),
"<User("
"id=UUID('12caf218-0001-45d4-b4df-44ff87f19989'),"
" email_address='user@example.com'"
")>"
)

def test_model_manager(self): # type: ignore
self.assertIsInstance(User.objects, UserManager)

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ envlist =
[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/fd_dj_accounts
passenv =
DATABASE_*
commands = coverage run --rcfile=setup.cfg runtests.py tests
deps =
-r{toxinidir}/requirements_test.txt
Expand Down