Skip to content

Commit

Permalink
lint: add markdown and yaml to prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
billybonks authored and cdubz committed Feb 8, 2024
1 parent dda68e0 commit 2d1338a
Show file tree
Hide file tree
Showing 29 changed files with 4,176 additions and 4,176 deletions.
10 changes: 5 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Setup
description: Set up Baby Buddy environment and dependencies.
inputs:
python-version:
description: 'What Python version to use.'
description: "What Python version to use."
required: false
default: '3.x'
default: "3.x"
runs:
using: 'composite'
using: "composite"
steps:
- name: Install Pipenv
shell: bash
Expand All @@ -15,8 +15,8 @@ runs:
id: setup-python
with:
python-version: ${{ inputs.python-version }}
cache: 'pipenv'
cache-dependency-path: 'requirements.txt'
cache: "pipenv"
cache-dependency-path: "requirements.txt"
- name: Install Python dependencies
shell: bash
run: pipenv install --dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
Expand Down Expand Up @@ -71,5 +71,5 @@ jobs:
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: 'ssh://dokku@dokku.baby-buddy.net:22/demo'
git_remote_url: "ssh://dokku@dokku.baby-buddy.net:22/demo"
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
20 changes: 10 additions & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- master
schedule:
- cron: '33 0 * * 3'
- cron: "33 0 * * 3"
jobs:
analyze:
name: Analyze
Expand All @@ -19,13 +19,13 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
language: ["javascript", "python"]
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
setup-python-dependencies: false
- uses: ./.github/actions/setup
- uses: github/codeql-action/analyze@v3
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
setup-python-dependencies: false
- uses: ./.github/actions/setup
- uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/review-app.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Review app"
env:
DOKKU_GIT_REMOTE_URL: 'ssh://dokku@dokku.baby-buddy.net:22'
DOKKU_GIT_REMOTE_URL: "ssh://dokku@dokku.baby-buddy.net:22"
on:
pull_request:
types: [labeled, unlabeled]
Expand Down
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ vendor
**/static
*.html
*.css
*.md
*.yaml
*.yml
*.scss
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

A buddy for babies! Helps caregivers track sleep, feedings, diaper changes,
tummy time and more to learn about and predict baby's needs without (*as much*)
tummy time and more to learn about and predict baby's needs without (_as much_)
guess work.

![Baby Buddy desktop view](screenshot.png)
Expand Down Expand Up @@ -56,7 +56,7 @@ for information about how to create/update translations.

:uk: English (U.K.)

:us: English (U.S.) *(base)*
:us: English (U.S.) _(base)_

:finland: Finnish

Expand Down
1 change: 0 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ currently being supported with security updates.

## Reporting a Vulnerability


Baby Buddy's maintainers recommend huntr.dev as a platform for reporting
vulnerabilities. Maintainers will do their best to verify, respond to
and fix issues reported on the platform.
Expand Down
2 changes: 1 addition & 1 deletion devenv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ inputs:
nixpkgs:
follows: nixpkgs
mk-shell-bin:
url: github:rrbutani/nix-mk-shell-bin
url: github:rrbutani/nix-mk-shell-bin
66 changes: 33 additions & 33 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ curl -X GET 'https://[...]/api/changes/?limit=5&offset=10' -H 'Authorization: To

```json
{
"count": 20,
"next": "https://[...]/api/changes/?limit=5&offset=15",
"previous": "https://[...]/api/changes/?limit=5&offset=5",
"results": []
"count": 20,
"next": "https://[...]/api/changes/?limit=5&offset=15",
"previous": "https://[...]/api/changes/?limit=5&offset=5",
"results": []
}
```

Field-based filters for specific endpoints can be found the in the `filters`
field of the `OPTIONS` response for specific endpoints.

Single entries can also be retrieved by adding the ID (or in the case of a
Single entries can also be retrieved by adding the ID (or in the case of a
Child entry, the slug) of a particular entry:

```shell
Expand All @@ -86,12 +86,12 @@ curl -X GET https://[...]/api/children/gregory-hill/ -H 'Authorization: Token [.

```json
{
"id":3,
"first_name":"Gregory",
"last_name":"Hill",
"birth_date":"2020-02-11",
"slug":"gregory-hill",
"picture":null
"id": 3,
"first_name": "Gregory",
"last_name": "Hill",
"birth_date": "2020-02-11",
"slug": "gregory-hill",
"picture": null
}
```

Expand All @@ -101,12 +101,12 @@ curl -X GET https://[...]/api/sleep/1/ -H 'Authorization: Token [...]'

```json
{
"id":480,
"child":3,
"start":"2020-03-12T21:25:28.916016-07:00",
"end":"2020-03-13T01:34:28.916016-07:00",
"duration":"04:09:00",
"nap":false
"id": 480,
"child": 3,
"start": "2020-03-12T21:25:28.916016-07:00",
"end": "2020-03-13T01:34:28.916016-07:00",
"duration": "04:09:00",
"nap": false
}
```

Expand All @@ -123,7 +123,7 @@ Returns JSON data in the response body in the following format:
}
```

- `count`: Total number of records (*in the database*, not just the response).
- `count`: Total number of records (_in the database_, not just the response).
- `next`: URL for the next set of results.
- `previous`: URL for the previous set of results.
- `results`: An array of the results of the request.
Expand Down Expand Up @@ -192,7 +192,7 @@ formats.
`POST` requests also accept a `timer` field to model endpoints supporting duration
(Feeding, Sleep, Tummy Time). Set `timer` to a valid timer ID in a request instead of
the `start` and `end` fields. The new entry will use the `start` and `end` values
*from the Timer* and if the timer is running it will be stopped by this operation.
_from the Timer_ and if the timer is running it will be stopped by this operation.

Additionally, if the Timer has a child relationship, the `child` field will be
filled in automatically with the `child` value from the Timer.
Expand All @@ -201,7 +201,7 @@ The `timer` field will **always override** the relevant fields (`child`, `start`
and `end`) on the request. E.g., a `POST` request with both the `timer` and `end`
fields will ignore the `end` field value and replace it with the Timer's `end`
value. The same applies for `start` and `child`. These fields are all **required**
if the `timer` field is *not* set.
if the `timer` field is _not_ set.

#### Example `timer` field usage

Expand All @@ -218,12 +218,12 @@ Note the timer `id` in the response:

```json
{
"id": 5,
"child": 1,
"name": null,
"start": "2022-05-28T19:59:40.013914Z",
"duration": null,
"user": 1
"id": 5,
"child": 1,
"name": null,
"start": "2022-05-28T19:59:40.013914Z",
"duration": null,
"user": 1
}
```

Expand All @@ -240,13 +240,13 @@ Note that `child` and `start` match the timer values (and `end` is auto-populate

```json
{
"id": 162,
"child": 1,
"start": "2022-05-28T19:59:40.013914Z",
"end": "2022-05-28T20:01:13.549099Z",
"duration": "00:01:33.535185",
"milestone": "",
"tags": []
"id": 162,
"child": 1,
"start": "2022-05-28T19:59:40.013914Z",
"end": "2022-05-28T20:01:13.549099Z",
"duration": "00:01:33.535185",
"milestone": "",
"tags": []
}
```

Expand Down
8 changes: 4 additions & 4 deletions docs/configuration/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

## `DEBUG`

*Default:* `False`
_Default:_ `False`

When in debug mode, Baby Buddy will print much more detailed error information
for exceptions. This setting should be *False* in production deployments.
for exceptions. This setting should be _False_ in production deployments.

See also [Django's documentation on the DEBUG setting](https://docs.djangoproject.com/en/5.0/ref/settings/#debug).

## `SUB_PATH`

*Default:* `None`
_Default:_ `None`

If Baby Buddy is hosted in a subdirectory of another server (e.g., `http://www.example.com/babybuddy`)
this must be set to the subdirectory path (e.g., `/babybuddy`) for correct handling of
Expand All @@ -22,7 +22,7 @@ details.

## `TIME_ZONE`

*Default:* `UTC`
_Default:_ `UTC`

The default time zone to use for the instance. This value can be overridden per use from
the user settings form.
Expand Down
14 changes: 7 additions & 7 deletions docs/configuration/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@

## `DB_ENGINE`

*Default:* `django.db.backends.sqlite3`
_Default:_ `django.db.backends.sqlite3`

The database engine utilized for the deployment.

See also [Django's documentation on the ENGINE setting](https://docs.djangoproject.com/en/5.0/ref/settings/#engine).

## `DB_HOST`

*Default:* unset
_Default:_ unset

The name of the database host for the deployment.

## `DB_NAME`

*Default:* `BASE_DIR/data/db.sqlite3`
_Default:_ `BASE_DIR/data/db.sqlite3`

The name of the database table utilized for the deployment.

## `DB_PASSWORD`

*Default:* unset
_Default:_ unset

The password for the database user for the deployment. In the default example,
this is the root PostgreSQL password.

## `DB_PORT`

*Default:* unset
_Default:_ unset

The listening port for the database. The default port for PostgreSQL is 5432.

## `DB_USER`

*Default:* unset
_Default:_ unset

The database username utilized for the deployment.

## `DB_OPTIONS`

*Default:* unset
_Default:_ unset

Additional options to pass to the database library. See the [Django Databases documentation](https://docs.djangoproject.com/en/5.0/ref/databases/) for examples. To enforce an SSL connection to the database, use `{'sslmode': 'require'}`.
18 changes: 9 additions & 9 deletions docs/configuration/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@

## `EMAIL_HOST`

*Default:* `None`
_Default:_ `None`

The host to use for sending email. This must be set to enable SMTP email delivery.

## `EMAIL_HOST_PASSWORD`

*Default:* (empty)
_Default:_ (empty)

Password to use for the SMTP server defined in `EMAIL_HOST`. This setting is used in
conjunction with `EMAIL_HOST_USER` when authenticating to the SMTP server.

## `EMAIL_HOST_USER`

*Default:* (empty)
_Default:_ (empty)

Username to use for the SMTP server defined in `EMAIL_HOST`.

## `EMAIL_PORT`

*Default:* 25
_Default:_ 25

Port to use for the SMTP server defined in `EMAIL_HOST`.

## `EMAIL_USE_TLS`

*Default:* `False`
_Default:_ `False`

Whether to use a TLS (secure) connection when talking to the SMTP server.

## `EMAIL_USE_SSL`

*Default:* `False`
_Default:_ `False`

Whether to use an implicit TLS (secure) connection when talking to the SMTP server.

## `EMAIL_SSL_KEYFILE`

*Default:* `None`
_Default:_ `None`

f `EMAIL_USE_SSL` or `EMAIL_USE_TLS` is `True`, you can optionally specify the path to a
PEM-formatted certificate chain file to use for the SSL connection.

## `EMAIL_SSL_CERTFILE`

*Default:* `None`
_Default:_ `None`

If `EMAIL_USE_SSL` or `EMAIL_USE_TLS` is `True`, you can optionally specify the path to
a PEM-formatted private key file to use for the SSL connection.
a PEM-formatted private key file to use for the SSL connection.

0 comments on commit 2d1338a

Please sign in to comment.