From 7b772eed4e09185e0560d9938783b7c1808c2acd Mon Sep 17 00:00:00 2001 From: Kyle King Date: Wed, 20 Dec 2023 13:09:33 -0500 Subject: [PATCH] test(#13): add test fixture --- test-13/README.md | 25 ------- test-13/poetry.lock | 143 ------------------------------------ test-13/pyproject.toml | 14 ---- test-13/test_13/__init__.py | 0 test-13/tests/__init__.py | 0 tests/fixtures.md | 51 +++++++++++++ 6 files changed, 51 insertions(+), 182 deletions(-) delete mode 100644 test-13/README.md delete mode 100644 test-13/poetry.lock delete mode 100644 test-13/pyproject.toml delete mode 100644 test-13/test_13/__init__.py delete mode 100644 test-13/tests/__init__.py diff --git a/test-13/README.md b/test-13/README.md deleted file mode 100644 index 2410c2e..0000000 --- a/test-13/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Testing #13 - -1. Add a serializer class - - ```python - class RecurringEventSerializer(serializers.ModelSerializer): # (1)! - """Used to retrieve recurring_event info""" - - class Meta: - model = RecurringEvent # (2)! - fields = ( - "uuid", - "name", - "start_time", - "duration_in_min", - "video_conference_url", - "additional_info", - "project", - ) - read_only_fields = ( - "uuid", # (3)! - "created_at", - "updated_at", - ) - ``` diff --git a/test-13/poetry.lock b/test-13/poetry.lock deleted file mode 100644 index d8c6afd..0000000 --- a/test-13/poetry.lock +++ /dev/null @@ -1,143 +0,0 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. - -[[package]] -name = "linkify-it-py" -version = "2.0.2" -description = "Links recognition library with FULL unicode support." -optional = false -python-versions = ">=3.7" -files = [ - {file = "linkify-it-py-2.0.2.tar.gz", hash = "sha256:19f3060727842c254c808e99d465c80c49d2c7306788140987a1a7a29b0d6ad2"}, - {file = "linkify_it_py-2.0.2-py3-none-any.whl", hash = "sha256:a3a24428f6c96f27370d7fe61d2ac0be09017be5190d68d8658233171f1b6541"}, -] - -[package.dependencies] -uc-micro-py = "*" - -[package.extras] -benchmark = ["pytest", "pytest-benchmark"] -dev = ["black", "flake8", "isort", "pre-commit", "pyproject-flake8"] -doc = ["myst-parser", "sphinx", "sphinx-book-theme"] -test = ["coverage", "pytest", "pytest-cov"] - -[[package]] -name = "markdown-it-py" -version = "2.2.0" -description = "Python port of markdown-it. Markdown parsing, done right!" -optional = false -python-versions = ">=3.7" -files = [ - {file = "markdown-it-py-2.2.0.tar.gz", hash = "sha256:7c9a5e412688bc771c67432cbfebcdd686c93ce6484913dccf06cb5a0bea35a1"}, - {file = "markdown_it_py-2.2.0-py3-none-any.whl", hash = "sha256:5a35f8d1870171d9acc47b99612dc146129b631baf04970128b568f190d0cc30"}, -] - -[package.dependencies] -linkify-it-py = {version = ">=1,<3", optional = true, markers = "extra == \"linkify\""} -mdurl = ">=0.1,<1.0" - -[package.extras] -benchmarking = ["psutil", "pytest", "pytest-benchmark"] -code-style = ["pre-commit (>=3.0,<4.0)"] -compare = ["commonmark (>=0.9,<1.0)", "markdown (>=3.4,<4.0)", "mistletoe (>=1.0,<2.0)", "mistune (>=2.0,<3.0)", "panflute (>=2.3,<3.0)"] -linkify = ["linkify-it-py (>=1,<3)"] -plugins = ["mdit-py-plugins"] -profiling = ["gprof2dot"] -rtd = ["attrs", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"] -testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] - -[[package]] -name = "mdformat" -version = "0.7.17" -description = "CommonMark compliant Markdown formatter" -optional = false -python-versions = ">=3.8" -files = [ - {file = "mdformat-0.7.17-py3-none-any.whl", hash = "sha256:91ffc5e203f5814a6ad17515c77767fd2737fc12ffd8b58b7bb1d8b9aa6effaa"}, - {file = "mdformat-0.7.17.tar.gz", hash = "sha256:a9dbb1838d43bb1e6f03bd5dca9412c552544a9bc42d6abb5dc32adfe8ae7c0d"}, -] - -[package.dependencies] -markdown-it-py = ">=1.0.0,<4.0.0" - -[[package]] -name = "mdformat-gfm" -version = "0.3.5" -description = "Mdformat plugin for GitHub Flavored Markdown compatibility" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "mdformat-gfm-0.3.5.tar.gz", hash = "sha256:5ee5f0de1d3b56d5edfced023bfff0aeed958be328e5460dac3221ac1b61ce7c"}, - {file = "mdformat_gfm-0.3.5-py3-none-any.whl", hash = "sha256:1e627edc7665b59e008b3b9e5decc18c40cbd625c196d77e5ea3bc624e80ac8a"}, -] - -[package.dependencies] -markdown-it-py = {version = "*", extras = ["linkify"]} -mdformat = ">=0.7.5,<0.8.0" -mdformat-tables = ">=0.4.0" -mdit-py-plugins = ">=0.2.0,<0.4.0" - -[[package]] -name = "mdformat-tables" -version = "0.4.1" -description = "An mdformat plugin for rendering tables." -optional = false -python-versions = ">=3.6.1" -files = [ - {file = "mdformat_tables-0.4.1-py3-none-any.whl", hash = "sha256:981f3dc7350027f78e3fd6a5fe8a16e123eec423af2d140e588d855751501019"}, - {file = "mdformat_tables-0.4.1.tar.gz", hash = "sha256:3024e88e9d29d7b8bb07fd6b59c9d5dcf14d2060122be29e30e72d27b65d7da9"}, -] - -[package.dependencies] -mdformat = ">=0.7.5,<0.8.0" - -[package.extras] -test = ["coverage", "pytest (>=6.0,<7.0)", "pytest-cov"] - -[[package]] -name = "mdit-py-plugins" -version = "0.3.5" -description = "Collection of plugins for markdown-it-py" -optional = false -python-versions = ">=3.7" -files = [ - {file = "mdit-py-plugins-0.3.5.tar.gz", hash = "sha256:eee0adc7195e5827e17e02d2a258a2ba159944a0748f59c5099a4a27f78fcf6a"}, - {file = "mdit_py_plugins-0.3.5-py3-none-any.whl", hash = "sha256:ca9a0714ea59a24b2b044a1831f48d817dd0c817e84339f20e7889f392d77c4e"}, -] - -[package.dependencies] -markdown-it-py = ">=1.0.0,<3.0.0" - -[package.extras] -code-style = ["pre-commit"] -rtd = ["attrs", "myst-parser (>=0.16.1,<0.17.0)", "sphinx-book-theme (>=0.1.0,<0.2.0)"] -testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] - -[[package]] -name = "mdurl" -version = "0.1.2" -description = "Markdown URL utilities" -optional = false -python-versions = ">=3.7" -files = [ - {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, - {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, -] - -[[package]] -name = "uc-micro-py" -version = "1.0.2" -description = "Micro subset of unicode data files for linkify-it-py projects." -optional = false -python-versions = ">=3.7" -files = [ - {file = "uc-micro-py-1.0.2.tar.gz", hash = "sha256:30ae2ac9c49f39ac6dce743bd187fcd2b574b16ca095fa74cd9396795c954c54"}, - {file = "uc_micro_py-1.0.2-py3-none-any.whl", hash = "sha256:8c9110c309db9d9e87302e2f4ad2c3152770930d88ab385cd544e7a7e75f3de0"}, -] - -[package.extras] -test = ["coverage", "pytest", "pytest-cov"] - -[metadata] -lock-version = "2.0" -python-versions = "^3.12" -content-hash = "fb586899b91dd3a245c278f869c05fc1e8eea195a5e313dad118fb6266081a64" diff --git a/test-13/pyproject.toml b/test-13/pyproject.toml deleted file mode 100644 index bbbc55f..0000000 --- a/test-13/pyproject.toml +++ /dev/null @@ -1,14 +0,0 @@ -[tool.poetry] -name = "test-13" -version = "0.1.0" -description = "" -authors = ["Kyle King "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.12" -mdformat-gfm = "^0.3.5" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/test-13/test_13/__init__.py b/test-13/test_13/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/test-13/tests/__init__.py b/test-13/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/fixtures.md b/tests/fixtures.md index 2e392df..e436de3 100644 --- a/tests/fixtures.md +++ b/tests/fixtures.md @@ -328,3 +328,54 @@ You can also use words, to fit your writing style more closely\[^note\]. \[^note\]: Named footnotes will still render with numbers instead of the text but allow easier identification and linking.\ This footnote also has been made with a different syntax using 4 spaces for new lines. . + +Nested Python Classes. Resolves #13: https://github.com/KyleKing/mdformat-mkdocs/issues/13 +. +1. Add a serializer class + + ```python + class RecurringEventSerializer(serializers.ModelSerializer): # (1)! + """Used to retrieve recurring_event info""" + + class Meta: + model = RecurringEvent # (2)! + fields = ( + "uuid", + "name", + "start_time", + "duration_in_min", + "video_conference_url", + "additional_info", + "project", + ) + read_only_fields = ( + "uuid", # (3)! + "created_at", + "updated_at", + ) + ``` +. +1. Add a serializer class + + ```python + class RecurringEventSerializer(serializers.ModelSerializer): # (1)! + """Used to retrieve recurring_event info""" + + class Meta: + model = RecurringEvent # (2)! + fields = ( + "uuid", + "name", + "start_time", + "duration_in_min", + "video_conference_url", + "additional_info", + "project", + ) + read_only_fields = ( + "uuid", # (3)! + "created_at", + "updated_at", + ) + ``` +.