From 0eeb303bd777195dd0803faa64144263f3630fd5 Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Sat, 10 Feb 2024 01:35:38 -0700 Subject: [PATCH] Make generated docs more robust --- .gitattributes | 1 - README.md | 74 ++++++++++++++++++++-------------------- project_name/settings.py | 1 - requirements-dev.txt | 6 ++-- requirements.txt | 6 ++-- 5 files changed, 43 insertions(+), 45 deletions(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 50b8771..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -README.md whitespace=-blank-at-eol diff --git a/README.md b/README.md index aeef8d2..d117864 100644 --- a/README.md +++ b/README.md @@ -81,36 +81,36 @@ mdown = Config.generate_markdown() cog.out('\n'.join(mdown.split('\n')[1:])) ]]] --> -* **DEBUG** - type: `False` - default: `False` -* **ALLOWED_HOSTS** - Hosts allowed to serve the site https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#allowed-hosts - type: `False` - default: `['*']` -* **DATABASE_URL** - A string with the database URL as defined in https://github.com/jacobian/dj-database-url#url-schema - type: `False` - default: `sqlite:///./sqlite3.db` -* **DJANGO_ENV** - Toggle deployment settings for local development or production - type: `False` - default: `development` -* **LOG_LEVEL** - Python logging level - type: `False` - default: `INFO` -* **SECRET_KEY** _REQUIRED_ - A long random string you keep secret https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#secret-key - type: `False` -* **ENVIRONMENT** - Deploy environment - type: `False` - default: `test` -* **BASIC_AUTH_CREDENTIALS** - Basic Auth credentials for the site in the format 'username:password' - type: `False` - default: `` +* **DEBUG** + * type: `bool` + * default: `False` +* **ALLOWED_HOSTS** + * description: Hosts allowed to serve the site https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#allowed-hosts + * type: `list[str]` + * default: `['*']` +* **DATABASE_URL** + * description: A string with the database URL as defined in https://github.com/jacobian/dj-database-url#url-schema + * type: `str` + * default: `sqlite:///./sqlite3.db` +* **DJANGO_ENV** + * description: Toggle deployment settings for local development or production + * type: `Literal['development', 'production']` + * default: `development` +* **LOG_LEVEL** + * description: Python logging level + * type: `Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']` + * default: `INFO` +* **SECRET_KEY** _REQUIRED_ + * description: A long random string you keep secret https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#secret-key + * type: `str` +* **ENVIRONMENT** + * description: Deploy environment + * type: `str` + * default: `test` +* **BASIC_AUTH_CREDENTIALS** + * description: Basic Auth credentials for the site in the format 'username:password' + * type: `str` + * default: `` ## Makefile commands @@ -127,12 +127,12 @@ cog.out( ```shell Available make commands: -README.md Update dynamic blocks in README.md -fix Fix linting errors -fmt Format Python code -lint Lint Python code -requirements.txt Generate requirements.txt (and requirements-dev.txt) from pyproject.toml -test Run tests -upgrade-requirements Upgrade all dependencies in requirements.txt and requirements-dev.txt +README.md Update dynamic blocks in README.md +fix Fix linting errors +fmt Format Python code +lint Lint Python code +requirements.txt Generate requirements.txt (and requirements-dev.txt) from pyproject.toml +test Run tests +upgrade-requirements Upgrade all dependencies in requirements.txt and requirements-dev.txt ``` diff --git a/project_name/settings.py b/project_name/settings.py index c0d7948..1695e97 100644 --- a/project_name/settings.py +++ b/project_name/settings.py @@ -11,7 +11,6 @@ """ import contextlib -import os import re from pathlib import Path diff --git a/requirements-dev.txt b/requirements-dev.txt index da3a633..56b435d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -59,9 +59,9 @@ django-stubs-ext==4.2.7 \ --hash=sha256:45a5d102417a412e3606e3c358adb4744988a92b7b58ccf3fd64bddd5d04d14c \ --hash=sha256:519342ac0849cda1559746c9a563f03ff99f636b0ebe7c14b75e816a00dfddc3 # via django-stubs -goodconf[yaml]==3.0.1 \ - --hash=sha256:1ef27441538acae4e5e28e9bf1ee36ebb2fd175c4546a46415977d459608b507 \ - --hash=sha256:e688b799330892d08afddcd1165996fbddb115c463d6ddb9b6ce1a6bfa6c1c02 +goodconf[yaml]==4.0.0 \ + --hash=sha256:af3c6dce410821841ed64c9d36f7aa911da55cd4b2a19db84f85923cf5665e88 \ + --hash=sha256:b194e3e094923c23d59299cb2628d602c6aac792ab7f3a8c8b727b1fbeb31b35 # via # -c /app/requirements.txt # django-layout (pyproject.toml) diff --git a/requirements.txt b/requirements.txt index 22af9c1..20ac2e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,9 +28,9 @@ django-csp==3.7 \ --hash=sha256:01443a07723f9a479d498bd7bb63571aaa771e690f64bde515db6cdb76e8041a \ --hash=sha256:01eda02ad3f10261c74131cdc0b5a6a62b7c7ad4fd017fbefb7a14776e0a9727 # via django-layout (pyproject.toml) -goodconf==3.0.1 \ - --hash=sha256:1ef27441538acae4e5e28e9bf1ee36ebb2fd175c4546a46415977d459608b507 \ - --hash=sha256:e688b799330892d08afddcd1165996fbddb115c463d6ddb9b6ce1a6bfa6c1c02 +goodconf==4.0.0 \ + --hash=sha256:af3c6dce410821841ed64c9d36f7aa911da55cd4b2a19db84f85923cf5665e88 \ + --hash=sha256:b194e3e094923c23d59299cb2628d602c6aac792ab7f3a8c8b727b1fbeb31b35 # via django-layout (pyproject.toml) gunicorn==21.2.0 \ --hash=sha256:3213aa5e8c24949e792bcacfc176fef362e7aac80b76c56f6b5122bf350722f0 \