Skip to content

chore: bump django from 4.2.16 to 4.2.17 in /app in the pip group across 1 directory #460

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 app/requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
django~=4.2.0
django~=4.2.17
django-extensions
django-linear-migrations
django-phonenumber-field[phonenumbers]
Expand Down
34 changes: 21 additions & 13 deletions app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ attrs==24.2.0
# referencing
cffi==1.17.1
# via cryptography
coverage==7.6.8
coverage[toml]==7.6.8
# via pytest-cov
cryptography==44.0.0
# via pyjwt
django==4.2.16
django==4.2.17
# via
# -r requirements.in
# django-extensions
# django-linear-migrations
# django-phonenumber-field
Expand All @@ -20,17 +21,22 @@ django==4.2.16
# drf-jwt
# drf-spectacular
django-extensions==3.2.3
# via -r requirements.in
django-linear-migrations==2.16.0
django-phonenumber-field==8.0.0
# via -r requirements.in
django-phonenumber-field[phonenumbers]==8.0.0
# via -r requirements.in
django-timezone-field==7.0
# via -r requirements.in
djangorestframework==3.15.2
# via
# -r requirements.in
# drf-jwt
# drf-spectacular
drf-jwt==1.19.2
# via -r requirements.in
drf-spectacular==0.28.0
exceptiongroup==1.2.2
# via pytest
# via -r requirements.in
execnet==2.1.1
# via pytest-xdist
inflection==0.5.1
Expand All @@ -42,25 +48,32 @@ jsonschema==4.23.0
jsonschema-specifications==2024.10.1
# via jsonschema
markdown==3.7
# via -r requirements.in
packaging==24.2
# via pytest
phonenumbers==8.13.51
# via django-phonenumber-field
pluggy==1.5.0
# via pytest
psycopg2-binary==2.9.10
# via -r requirements.in
pycparser==2.22
# via cffi
pyjwt==2.10.1
# via drf-jwt
pyjwt[crypto]==2.10.1
# via
# drf-jwt
# pyjwt
pytest==8.3.4
# via
# pytest-cov
# pytest-django
# pytest-xdist
pytest-cov==6.0.0
# via -r requirements.in
pytest-django==4.9.0
# via -r requirements.in
pytest-xdist==3.6.1
# via -r requirements.in
pyyaml==6.0.2
# via drf-spectacular
referencing==0.35.1
Expand All @@ -73,12 +86,7 @@ rpds-py==0.22.1
# referencing
sqlparse==0.5.2
# via django
tomli==2.2.1
# via
# coverage
# pytest
typing-extensions==4.12.2
# via asgiref
tzdata==2024.2
# via -r requirements.in
uritemplate==4.1.1
# via drf-spectacular
5 changes: 5 additions & 0 deletions docs/contributing/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Set up two-factor authentication on your account by following this [guide](https
Before cloning your forked repository to your local machine, you must have Git installed. You can find instructions for installing Git for your operating system [**here**](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

=== "Windows"

- we recommend [installing Windows Subsystem for Linux (WSL)](https://code.visualstudio.com/docs/remote/wsl). WSL provides a Linux-compatible environment that can prevent common errors during script execution.

- After setting up WSL, install Git directly from the Linux terminal. This method can help avoid complications that sometimes arise when using Git Bash on Windows.
Expand All @@ -32,6 +33,7 @@ Before cloning your forked repository to your local machine, you must have Git i
!!! tip "Feel free to reach out in the [Hack for LA Slack channel](https://hackforla.slack.com/messages/people-depot/) if you encounter any errors while running scripts on Windows"

=== "Mac"

Please note that if you have a Mac the page offers several options (see other option, if you need to conserve hard drive space) including:

- an “easiest” option (this version is fine for our use): This option would take just over 4GB.
Expand Down Expand Up @@ -61,6 +63,7 @@ You can fork the hackforla/peopledepot repository by clicking <a href="https://g
. A fork is a copy of the repository that will be placed on your GitHub account.

!!! note "It should create a URL that looks like the following -> `https://github.com/<your_GitHub_user_name>/peopledepot`"

!!! example "For example -> `https://github.com/octocat/peopledepot`"

!!! info "What you have created is a forked copy in a remote version on GitHub. It is not on your local machine yet"
Expand Down Expand Up @@ -132,13 +135,15 @@ upstream https://github.com/hackforla/peopledepot.git (push)
1. Make sure the Docker service is running

=== "Docker (Engine)"

```bash
sudo systemctl status docker
```

It will show `Active: active (running)` if it's running.

=== "Docker Desktop"

1. Start Docker Desktop
1. Run `docker container ls` to verify Docker Desktop is running. If it is not running you will get the message: `Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?`

Expand Down
13 changes: 13 additions & 0 deletions docs/contributing/howto/add-model-and-api-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This guide aims to enable developers with little or no django experience to add django models and API endpoints to the project. Most code examples are followed by detailed explanations.

??? note "The developer will have exposure to the following in this document"

- python
- django
- django rest framework
Expand All @@ -22,6 +23,7 @@ Let's start!
## Data model

??? note "TDD test"

1. Write the test

We would like the model to store these data, and to return the name property in the str function.
Expand Down Expand Up @@ -117,6 +119,7 @@ class RecurringEvent(AbstractBaseModel): # (1)!
1. Always override the `__str__` function to output something more meaningful than the default. It lets us do a quick test of the model by calling `str([model])`. It's also useful for the admin site model list view.

??? note "Updating models.py for many-to-many relationships"

For adding many-to-many relationships with additional fields, such as `ended_on`, we can add

```python title="app/core/models.py" linenums="1"
Expand Down Expand Up @@ -165,6 +168,7 @@ This generates the database migration files
```

??? note "Test"

Since we overrode the `__str__` function, we need to write a test for it.

1. Add a fixture for the model
Expand Down Expand Up @@ -212,6 +216,7 @@ This generates the database migration files
```

??? note "Check and commit"

This is a good place to pause, check, and commit progress.

1. Run pre-commit checks
Expand Down Expand Up @@ -274,11 +279,13 @@ Check that everything's working and there are no issues, which should be the cas
1. Having a misconfigured or buggy custom field could cause the admin site to crash and the developer will need to look at the debug message and resolve it.

??? note "Test"

1. Feel free to write tests for the admin. There's no example for it yet.
1. The reason there's no tests is that the admin site is independent of the API functionality, and we're mainly interested in the API part.
1. When the time comes that we depend on the admin interface, we will need to have tests for the needed functionalities.

??? note "Check and commit"

This is a good place to pause, check, and commit progress.

1. Run pre-commit checks
Expand All @@ -305,6 +312,7 @@ This is code that serializes objects into strings for the API endpoints, and des
In `app/core/api/serializers.py`

??? note "Updating serializers.py for many-to-many relationships"

Following the many-to-many relationship between project and recurring event from above,

Update the existing serializer classes
Expand Down Expand Up @@ -458,6 +466,7 @@ In `app/core/api/views.py`
1. It doesn't control permissions the way we want, but we will fix it later.

??? note "Extended example: Query Params"

This example shows how to add a filter params. It's done for the [user model](https://github.com/hackforla/peopledepot/issues/15) as a [requirement](https://github.com/hackforla/peopledepot/issues/10) from VRMS.

1. Here's a more complex API doc example (this example is using the User model's ViewSet)
Expand Down Expand Up @@ -565,6 +574,7 @@ In `app/core/api/urls.py`
- `reverse("recurring-event-list")` would return `http://localhost:8000/api/v1/recuring-events/`

??? note "Test"

For the CRUD operations, since we're using `ModelViewSet` where all the actions are provided by `rest_framework` and well-tested, it's not necessary to have test cases for them. But here's an example of one.

In `app/core/tests/test_api.py`
Expand Down Expand Up @@ -610,6 +620,7 @@ In `app/core/api/urls.py`
```

??? note "Test many-to-many relationships"

In `app/core/tests/test_api.py`

1. Import API URL
Expand Down Expand Up @@ -649,6 +660,7 @@ In `app/core/api/urls.py`
```

??? note "Check and commit"

This is a good place to pause, check, and commit progress.

1. Run pre-commit checks
Expand All @@ -665,4 +677,5 @@ In `app/core/api/urls.py`
```

??? note "Push the code and start a PR"

Refer to the [Issues page section on "Push to upstream origin"](issues.md#push-to-upstream-origin-aka-your-fork) onward.
1 change: 1 addition & 0 deletions docs/contributing/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ This step is optional if this is your first time fixing an issue and you want to
In the [People-depot Slack channel](https://hackforla.slack.com/messages/people-depot/), send an introductory message with your GitHub `handle/username` asking to be added to the Hack for LA peopledepot GitHub repository, have access to the Google Docs Drive, and Figma.

!!! note "Please do the following once you have accepted the GitHub invite (comes via email or in your GitHub notifications)"

Make your own Hack for LA GitHub organization membership public by following this [guide](https://help.github.com/en/articles/publicizing-or-hiding-organization-membership#changing-the-visibility-of-your-organization-membership).
3 changes: 3 additions & 0 deletions docs/contributing/tools/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ To restore a database to its original state and remove any data manually added,
From Docker:

=== "Terminal"

```bash
docker-compose down -v
```

=== "Docker Desktop"

1. Open Containers section
1. Delete people-db-1 container
1. Open Images Tab
Expand All @@ -57,6 +59,7 @@ For apk, the cache directory is `/var/cache/apk/`. [APK wiki on local cache](htt
For apt, the cache directory is `/var/cache/apt/`.

??? info "References"

- [buildkit mount the cache](https://vsupalov.com/buildkit-cache-mount-dockerfile/)
- [proper usage of mount cache](https://dev.doroshev.com/blog/docker-mount-type-cache/)
- [mount cache reference](https://docs.docker.com/engine/reference/builder/#run---mounttypecache)
Expand Down
15 changes: 15 additions & 0 deletions docs/contributing/tools/mkdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Here's a list of commonly used MkDocs syntax for quick reference.
### [Code Blocks](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/)

=== "Example"

```python title="Code Block"
@admin.register(RecurringEvent)
class RecurringEventAdmin(admin.ModelAdmin):
Expand Down Expand Up @@ -64,6 +65,7 @@ Here's a list of commonly used MkDocs syntax for quick reference.
```

=== "Code"

````
```python title="Code Block"
@admin.register(RecurringEvent)
Expand Down Expand Up @@ -99,13 +101,15 @@ Here's a list of commonly used MkDocs syntax for quick reference.
### [Code Annotations](https://squidfunk.github.io/mkdocs-material/reference/annotations/)

=== "Example"

```bash
Click the plus sign --> # (1)!
```

1. This is an explanation text

=== "Code"

````
``` bash
Click the plus sign --> # (1)!
Expand All @@ -117,18 +121,23 @@ Here's a list of commonly used MkDocs syntax for quick reference.
### [Text blocks](https://facelessuser.github.io/pymdown-extensions/extensions/blocks/plugins/details/)

=== "Example"

!!! example "Simple Block"

!!! example

Content Block Text

??? example "Expandable Block"

Content

???+ example "Opened Expandable Block"

Content

=== "Code"

```
!!! example "Simple Block"

Expand All @@ -145,13 +154,17 @@ Here's a list of commonly used MkDocs syntax for quick reference.
### [Tabbed content](https://facelessuser.github.io/pymdown-extensions/extensions/tabbed/)

=== "Example"

=== "Linux"

linux-specific content

=== "Mac"

mac-specific content

=== "Code"

```
=== "Linux"

Expand All @@ -165,9 +178,11 @@ Here's a list of commonly used MkDocs syntax for quick reference.
### [Buttons](https://squidfunk.github.io/mkdocs-material/reference/buttons/)

=== "Example"

1. ++ctrl+c++ to quit the local server and stop the container

=== "Code"

```
1. ++ctrl+c++ to quit the local server and stop the container
```