From 25fa990cbc464be979d1c5d0f79caf9d7210147b Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 28 Mar 2022 23:02:30 +0200 Subject: [PATCH 01/36] Initial commit --- .idea/.gitignore | 8 +++++ .idea/inspectionProfiles/Project_Default.xml | 35 +++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ 5 files changed, 63 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..18a3ac4 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,35 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f900d93 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From a9ed2aec6f87c75cefeb2d9fcc58a67a39c7f37f Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 28 Mar 2022 23:07:59 +0200 Subject: [PATCH 02/36] Add tagline to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f8d1d8a..56cd7d0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # kodi-timekeeper +An approach to having kids use a Kodi media center instance: manage session use and keep track of time spent and available budget. \ No newline at end of file From 1fda5209cfd4f1e2adde44ab753d1a48bc014469 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:19:00 +0200 Subject: [PATCH 03/36] feat(meta): Attempt writing a usable pyproject.toml --- pyproject.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..dd9e6ab --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[tool.semantic_release] + version_toml = "src/kodi-timekeeper/__init__.py:__version__" + major_on_zero = false +[tool.towncrier] + package = "kodi-timekeeper" + package_dir = "src" + filename = "CHANGELOG.md" +[tool.towncrier.fragment.build] +[tool.towncrier.fragment.chore] +[tool.towncrier.fragment.ci] +[tool.towncrier.fragment.docs] +[tool.towncrier.fragment.feat] +[tool.towncrier.fragment.fix] +[tool.towncrier.fragment.perf] +[tool.towncrier.fragment.refactor] +[tool.towncrier.fragment.revert] +[tool.towncrier.fragment.style] +[tool.towncrier.fragment.test] \ No newline at end of file From 13f6893df8b90c371c0d5511606c38029bbc1809 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:20:46 +0200 Subject: [PATCH 04/36] feat(meta): Define initial version, add init files --- src/__init__.py | 0 src/kodi-timekeeper/__init__.py | 1 + 2 files changed, 1 insertion(+) create mode 100644 src/__init__.py create mode 100644 src/kodi-timekeeper/__init__.py diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/kodi-timekeeper/__init__.py b/src/kodi-timekeeper/__init__.py new file mode 100644 index 0000000..6c8e6b9 --- /dev/null +++ b/src/kodi-timekeeper/__init__.py @@ -0,0 +1 @@ +__version__ = "0.0.0" From 3a38089648656c075c2d38e1aef4f62de82ba228 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:22:09 +0200 Subject: [PATCH 05/36] test(meta): Define test name patterns --- pytest.ini | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..81d95c6 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +python_files = test_* +python_classes = *Tests +python_function = test_* \ No newline at end of file From ec048408616ebe1cb39d60533c210362d1b94344 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:22:28 +0200 Subject: [PATCH 06/36] test(meta): Define a basic test --- tests/kodi-timekeeper/test_ktk.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/kodi-timekeeper/test_ktk.py diff --git a/tests/kodi-timekeeper/test_ktk.py b/tests/kodi-timekeeper/test_ktk.py new file mode 100644 index 0000000..3f4b133 --- /dev/null +++ b/tests/kodi-timekeeper/test_ktk.py @@ -0,0 +1,3 @@ +class KTKTests: + def test_adding_two_ints_returns_correct_result(self): + pass From 17cb189d76dea45b766f70624d195d3d7dbd3ee1 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:23:24 +0200 Subject: [PATCH 07/36] style(meta): Extend commit msg inspection --- .idea/vcs.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..4c6280e 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,5 +1,11 @@ + + + + + + From fbd7476e66d8023bb400ff8a17b27f960441a9b4 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:37:19 +0200 Subject: [PATCH 08/36] build(meta): Add build-system --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index dd9e6ab..1146d0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,11 @@ +[build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build_meta" + [tool.semantic_release] version_toml = "src/kodi-timekeeper/__init__.py:__version__" major_on_zero = false + [tool.towncrier] package = "kodi-timekeeper" package_dir = "src" From 1f17f7c46c54e1c2527e9c7c7010f7ffb7f33989 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:39:16 +0200 Subject: [PATCH 09/36] build(meta): Make sure we have a persistent newsfragments dir --- newsfragments/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/.gitignore diff --git a/newsfragments/.gitignore b/newsfragments/.gitignore new file mode 100644 index 0000000..b722e9e --- /dev/null +++ b/newsfragments/.gitignore @@ -0,0 +1 @@ +!.gitignore \ No newline at end of file From 4080afb1b1c30859e349c53fe8d91f92e2a50b50 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 29 Mar 2022 03:53:54 +0200 Subject: [PATCH 10/36] docs(meta): Add news fragment --- newsfragments/1.build.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/1.build.rst diff --git a/newsfragments/1.build.rst b/newsfragments/1.build.rst new file mode 100644 index 0000000..3e3d71c --- /dev/null +++ b/newsfragments/1.build.rst @@ -0,0 +1 @@ +Add rudimentary versioning mechanics \ No newline at end of file From 08d31d9965fdd0db3b22408b82fe85a78cb156a7 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sun, 1 May 2022 04:20:52 +0200 Subject: [PATCH 11/36] build(meta): define newsfragments location --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 1146d0a..014e283 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ major_on_zero = false [tool.towncrier] + directory = "newsfragments" package = "kodi-timekeeper" package_dir = "src" filename = "CHANGELOG.md" From e0f4ced1ada2abec77eb2079bba76707467718e6 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sun, 1 May 2022 04:23:28 +0200 Subject: [PATCH 12/36] build(meta): Set custom towncrier news topics --- pyproject.toml | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 014e283..6102488 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,14 +11,26 @@ package = "kodi-timekeeper" package_dir = "src" filename = "CHANGELOG.md" -[tool.towncrier.fragment.build] -[tool.towncrier.fragment.chore] -[tool.towncrier.fragment.ci] -[tool.towncrier.fragment.docs] -[tool.towncrier.fragment.feat] -[tool.towncrier.fragment.fix] -[tool.towncrier.fragment.perf] -[tool.towncrier.fragment.refactor] -[tool.towncrier.fragment.revert] -[tool.towncrier.fragment.style] -[tool.towncrier.fragment.test] \ No newline at end of file + type = [ + { name = "Features", directory = "feat", showcontent = true }, + { name = "Bug fixes", directory = "fix", showcontent = true }, + { name = "Project structure", directory = "build", showcontent = true }, + ] + +# New format is in the works, not yet part of towncrier 21.9.0 +# News topics from which we may want to choose: +# [tool.towncrier.fragment.build] +# [tool.towncrier.fragment.chore] +# [tool.towncrier.fragment.ci] +# [tool.towncrier.fragment.docs] +# [tool.towncrier.fragment.feat] +# [tool.towncrier.fragment.fix] +# [tool.towncrier.fragment.perf] +# [tool.towncrier.fragment.refactor] +# [tool.towncrier.fragment.revert] +# [tool.towncrier.fragment.style] +# [tool.towncrier.fragment.test] +# [tool.towncrier.fragment.deprecation] +# [tool.towncrier.fragment.remove] +# [tool.towncrier.fragment.trivial] +# [tool.towncrier.fragment.meta] \ No newline at end of file From bce59b6b154bfe0be71a81816273f6f7b08a9c16 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Sun, 1 May 2022 04:24:23 +0200 Subject: [PATCH 13/36] build(meta): Play with auto-versioning --- newsfragments/{1.build.rst => 1.build} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename newsfragments/{1.build.rst => 1.build} (100%) diff --git a/newsfragments/1.build.rst b/newsfragments/1.build similarity index 100% rename from newsfragments/1.build.rst rename to newsfragments/1.build From 8b289652e557f0f563b9e5da2213a2b6fd56c3d6 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Sun, 1 May 2022 04:34:53 +0200 Subject: [PATCH 14/36] 0.1.0 Automatically generated by python-semantic-release --- src/kodi-timekeeper/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kodi-timekeeper/__init__.py b/src/kodi-timekeeper/__init__.py index 6c8e6b9..3dc1f76 100644 --- a/src/kodi-timekeeper/__init__.py +++ b/src/kodi-timekeeper/__init__.py @@ -1 +1 @@ -__version__ = "0.0.0" +__version__ = "0.1.0" From 048eee5bc856e65cc97f431843d7f3d567296e68 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:04:48 +0200 Subject: [PATCH 15/36] build(meta): Add pyproject.toml project definition --- pyproject.toml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6102488..7950a92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,22 @@ +[project] + name = "kodi-timekeeper" + description = "An approach to letting kids use a Kodi media center instance" + version = "0.1.0" + authors = [ + { name = "hygienic-books", email = "hygienic-books@tentic.net" } + ] + dependencies = [ + 'requests == 2.27.1', + 'click == 8.1.0' + ] + +[project.optional-dependencies] + dev = [ + "towncrier == 21.9.0", + "semver == 2.13.0", + "pytest == 7.1.2" + ] + [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" From d78111ad903b7469ae248a91b29db5d7e2d81663 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:08:06 +0200 Subject: [PATCH 16/36] build(meta): Pin build tools versions --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7950a92..261099a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,10 @@ ] [build-system] - requires = ["setuptools", "wheel"] + requires = [ + "setuptools == 58.0.4", + "wheel == 0.37.1" + ] build-backend = "setuptools.build_meta" [tool.semantic_release] From df6580c80061cdbf280742f681e0d324cf241d55 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:08:47 +0200 Subject: [PATCH 17/36] build(meta): Get semver version string from within pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 261099a..018b18c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ build-backend = "setuptools.build_meta" [tool.semantic_release] - version_toml = "src/kodi-timekeeper/__init__.py:__version__" + version_toml = "pyproject.toml:project.version" major_on_zero = false [tool.towncrier] From 51a1ccaf8a5ffe8d583401728f6b7f3ea070df4d Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:11:27 +0200 Subject: [PATCH 18/36] build(meta): Add 'refactor' as a valid Conventional Commits commit type --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 018b18c..b1e6e34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,9 +34,10 @@ package_dir = "src" filename = "CHANGELOG.md" type = [ - { name = "Features", directory = "feat", showcontent = true }, - { name = "Bug fixes", directory = "fix", showcontent = true }, - { name = "Project structure", directory = "build", showcontent = true }, + { name = "Features", directory = "feat", showcontent = true }, + { name = "Bug fixes", directory = "fix", showcontent = true }, + { name = "Project structure", directory = "build", showcontent = true }, + { name = "Refactor", directory = "refactor", showcontent = true } ] # New format is in the works, not yet part of towncrier 21.9.0 From 59d2dcf1fc71e6619ac440f080cf778bce2331b2 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:12:27 +0200 Subject: [PATCH 19/36] build(meta): semver version string in kodi-timekeeper __init__.py is no longer needed, now lives in pyproject.toml --- src/kodi-timekeeper/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/kodi-timekeeper/__init__.py b/src/kodi-timekeeper/__init__.py index 3dc1f76..e69de29 100644 --- a/src/kodi-timekeeper/__init__.py +++ b/src/kodi-timekeeper/__init__.py @@ -1 +0,0 @@ -__version__ = "0.1.0" From 9f14b3da560b2ebda98339ce5934186ddf87129e Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:13:24 +0200 Subject: [PATCH 20/36] build(meta): Add another noteworthy news item --- newsfragments/1.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/newsfragments/1.build b/newsfragments/1.build index 3e3d71c..49c115e 100644 --- a/newsfragments/1.build +++ b/newsfragments/1.build @@ -1 +1,2 @@ -Add rudimentary versioning mechanics \ No newline at end of file +Add rudimentary versioning mechanics +Set up project defaults \ No newline at end of file From 3510c3000d8ba8fdcb08d29418a933cb2a962d5a Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:21:37 +0200 Subject: [PATCH 21/36] build(meta): Define currently accepted Conventional Commits scopes, at the moment only 'meta' --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 56cd7d0..6e02fda 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # kodi-timekeeper -An approach to having kids use a Kodi media center instance: manage session use and keep track of time spent and available budget. \ No newline at end of file +An approach to having kids use a Kodi media center instance: manage session use and keep track of time spent and available budget. + +## Valid Conventional Commits scopes + +* `meta`: A commit that affects the Git projects structure such as a `pyproject.toml` change or new directories \ No newline at end of file From 8bacdadd3a557991baaee125209d4d88599f2e44 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:22:44 +0200 Subject: [PATCH 22/36] refactor(meta): Tighten Conventional commits scope docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e02fda..8772d4e 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ An approach to having kids use a Kodi media center instance: manage session use ## Valid Conventional Commits scopes -* `meta`: A commit that affects the Git projects structure such as a `pyproject.toml` change or new directories \ No newline at end of file +* `meta`: Affects the Git projects structure such as a `pyproject.toml` change or new directories \ No newline at end of file From ccfb7054e1e2728b1644023d71bfa6d54ec27b5b Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 00:23:26 +0200 Subject: [PATCH 23/36] refactor(meta): Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8772d4e..d1b4bf2 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ An approach to having kids use a Kodi media center instance: manage session use ## Valid Conventional Commits scopes -* `meta`: Affects the Git projects structure such as a `pyproject.toml` change or new directories \ No newline at end of file +* `meta`: Affects the Git project's structure such as a `pyproject.toml` change or new directories \ No newline at end of file From b2e8c8bd7ac04ce6c1a86b552f1e68973cb06432 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 01:03:49 +0200 Subject: [PATCH 24/36] refactor(meta): Move pytest config into 'pyproject.toml' --- pyproject.toml | 7 ++++++- pytest.ini | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index b1e6e34..1dbf2b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,4 +56,9 @@ # [tool.towncrier.fragment.deprecation] # [tool.towncrier.fragment.remove] # [tool.towncrier.fragment.trivial] -# [tool.towncrier.fragment.meta] \ No newline at end of file +# [tool.towncrier.fragment.meta] + +[tool.pytest.ini_options] + python_files = "test_*" + python_classes = "*Tests" + python_function = "test_*" \ No newline at end of file diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 81d95c6..0000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -python_files = test_* -python_classes = *Tests -python_function = test_* \ No newline at end of file From 9175921b0fd1ad94dc90963195dac7b0248b66d4 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 01:36:07 +0200 Subject: [PATCH 25/36] build(meta): Make pytest dirs into packages Per pytest's "Good Integration Practices" (https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html) make all test directories into packages with '__init__.py' files --- tests/__init__.py | 0 tests/kodi-timekeeper/__init__.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/__init__.py create mode 100644 tests/kodi-timekeeper/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/kodi-timekeeper/__init__.py b/tests/kodi-timekeeper/__init__.py new file mode 100644 index 0000000..e69de29 From 3fd5590158b239ee4e8b80328182b06edd2b4a51 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 01:38:46 +0200 Subject: [PATCH 26/36] build(meta): Fix pytest functions name pattern --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1dbf2b2..e2dd6b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,4 +61,4 @@ [tool.pytest.ini_options] python_files = "test_*" python_classes = "*Tests" - python_function = "test_*" \ No newline at end of file + python_functions = "test_*" \ No newline at end of file From 3d604284a52b5ee68ad893dc3784a733c923da26 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 01:55:53 +0200 Subject: [PATCH 27/36] refactor(meta): Add .rst extension to news fragment file for more clarity --- newsfragments/{1.build => 1.build.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename newsfragments/{1.build => 1.build.rst} (100%) diff --git a/newsfragments/1.build b/newsfragments/1.build.rst similarity index 100% rename from newsfragments/1.build rename to newsfragments/1.build.rst From 33bbf42b27ea666800d4775127454a75dfa3c341 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 01:59:49 +0200 Subject: [PATCH 28/36] build(meta): Add 'test' as a valid Conventional Commits commit type --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2dd6b9..a56e839 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,8 @@ { name = "Features", directory = "feat", showcontent = true }, { name = "Bug fixes", directory = "fix", showcontent = true }, { name = "Project structure", directory = "build", showcontent = true }, - { name = "Refactor", directory = "refactor", showcontent = true } + { name = "Refactor", directory = "refactor", showcontent = true }, + { name = "Test", directory = "test", showcontent = true } ] # New format is in the works, not yet part of towncrier 21.9.0 From 2c864fef59408fdc689b91bf9393b25e36ee7704 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:00:20 +0200 Subject: [PATCH 29/36] test(meta): Play with pytest tests --- tests/kodi-timekeeper/test_ktk.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/kodi-timekeeper/test_ktk.py b/tests/kodi-timekeeper/test_ktk.py index 3f4b133..8607642 100644 --- a/tests/kodi-timekeeper/test_ktk.py +++ b/tests/kodi-timekeeper/test_ktk.py @@ -1,3 +1,21 @@ class KTKTests: - def test_adding_two_ints_returns_correct_result(self): - pass + #def test_adding_two_ints_returns_correct_result(self): + # assert alter(1, 2) == 3 + # pass + + def test_one(self): + assert 1 == 1 + + def test_two(self): + expect = (1, 2, 3) + actual = (1, 2, 3) + + +def test_adsasd(): + expect = (1, 2, 3) + actual = (1, 2, 3) + + +def test_aasssd(): + expect = (1, 2, 3) + actual = (1, 2, 3) From 93cac5fe0eab8a9cd4e2f0e6799bf8e9088c7b3a Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:07:08 +0200 Subject: [PATCH 30/36] build(meta): Add another example for the 'meta' Conventional Commits commit type --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1b4bf2..7c30aad 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ An approach to having kids use a Kodi media center instance: manage session use ## Valid Conventional Commits scopes -* `meta`: Affects the Git project's structure such as a `pyproject.toml` change or new directories \ No newline at end of file +* `meta`: Affects the Git project's structure such as for example a `pyproject.toml` change, adding a new directory or changing how a news fragment file is formatted \ No newline at end of file From 5ebdb570dfb8ecab76b0cb25ae8dd6c8aece8215 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:32:56 +0200 Subject: [PATCH 31/36] build(meta): Add requirements.txt file --- requirements.in | 5 +++++ requirements.txt | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 requirements.in create mode 100644 requirements.txt diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..d367d75 --- /dev/null +++ b/requirements.in @@ -0,0 +1,5 @@ +requests +click +towncrier +semver +pytest \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e6d7147 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,54 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile +# +attrs==21.4.0 + # via pytest +certifi==2021.10.8 + # via requests +charset-normalizer==2.0.12 + # via requests +click==8.1.3 + # via + # -r requirements.in + # click-default-group + # towncrier +click-default-group==1.2.2 + # via towncrier +idna==3.3 + # via requests +incremental==21.3.0 + # via towncrier +iniconfig==1.1.1 + # via pytest +jinja2==3.1.2 + # via towncrier +markupsafe==2.1.1 + # via jinja2 +packaging==21.3 + # via pytest +pluggy==1.0.0 + # via pytest +py==1.11.0 + # via pytest +pyparsing==3.0.8 + # via packaging +pytest==7.1.2 + # via -r requirements.in +requests==2.27.1 + # via -r requirements.in +semver==2.13.0 + # via -r requirements.in +tomli==2.0.1 + # via + # pytest + # towncrier +towncrier==21.9.0 + # via -r requirements.in +urllib3==1.26.9 + # via requests + +# The following packages are considered to be unsafe in a requirements file: +# setuptools From 0aa77625b177072946f5321e147f1107e9c6bb8e Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:34:45 +0200 Subject: [PATCH 32/36] build(meta): Remove implicit click dependency --- requirements.in | 1 - requirements.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/requirements.in b/requirements.in index d367d75..02013df 100644 --- a/requirements.in +++ b/requirements.in @@ -1,5 +1,4 @@ requests -click towncrier semver pytest \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e6d7147..edcda7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,6 @@ charset-normalizer==2.0.12 # via requests click==8.1.3 # via - # -r requirements.in # click-default-group # towncrier click-default-group==1.2.2 From 850c3081e4c1249ea8a5275a888c67c11ae7785c Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:40:08 +0200 Subject: [PATCH 33/36] build(meta): Transfer pip-compile results into pyproject.toml --- pyproject.toml | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a56e839..bcea222 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,15 +6,54 @@ { name = "hygienic-books", email = "hygienic-books@tentic.net" } ] dependencies = [ - 'requests == 2.27.1', - 'click == 8.1.0' + "certifi==2021.10.8", + # via requests + "charset-normalizer==2.0.12", + # via requests + "idna==3.3", + # via requests + "requests==2.27.1", + # via -r requirements.in + "urllib3==1.26.9", + # via requests ] [project.optional-dependencies] dev = [ - "towncrier == 21.9.0", - "semver == 2.13.0", - "pytest == 7.1.2" + "attrs==21.4.0", + # via pytest + "click==8.1.3", + # via + # click-default-group + # towncrier + "click-default-group==1.2.2", + # via towncrier + "incremental==21.3.0", + # via towncrier + "iniconfig==1.1.1", + # via pytest + "jinja2==3.1.2", + # via towncrier + "markupsafe==2.1.1", + # via jinja2 + "packaging==21.3", + # via pytest + "pluggy==1.0.0", + # via pytest + "py==1.11.0", + # via pytest + "pyparsing==3.0.8", + # via packaging + "pytest==7.1.2", + # via -r requirements.in + "semver==2.13.0", + # via -r requirements.in + "tomli==2.0.1", + # via + # pytest + # towncrier + "towncrier==21.9.0", + # via -r requirements.in ] [build-system] From 9d025ad7cba8bee8c264d9b27fb13d7c93cf4310 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:40:53 +0200 Subject: [PATCH 34/36] build(meta): Uniform style --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bcea222..af22be8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ # via requests "requests==2.27.1", # via -r requirements.in - "urllib3==1.26.9", + "urllib3==1.26.9" # via requests ] @@ -52,14 +52,14 @@ # via # pytest # towncrier - "towncrier==21.9.0", + "towncrier==21.9.0" # via -r requirements.in ] [build-system] requires = [ - "setuptools == 58.0.4", - "wheel == 0.37.1" + "setuptools==58.0.4", + "wheel==0.37.1" ] build-backend = "setuptools.build_meta" From aca2c8a79ff7d607edef56105756d55fde3e238f Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:49:29 +0200 Subject: [PATCH 35/36] build(meta): Add new valid Conventional Commits commit type 'docs' --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index af22be8..7f9b5ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,8 @@ { name = "Bug fixes", directory = "fix", showcontent = true }, { name = "Project structure", directory = "build", showcontent = true }, { name = "Refactor", directory = "refactor", showcontent = true }, - { name = "Test", directory = "test", showcontent = true } + { name = "Test", directory = "test", showcontent = true }, + { name = "Documentation", directory = "docs", showcontent = true } ] # New format is in the works, not yet part of towncrier 21.9.0 From fb4f06fa840ebfdfebcf9d8c683dbeac2ac8c0af Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 2 May 2022 02:50:18 +0200 Subject: [PATCH 36/36] docs(meta): Add two examples how to use the Conventional Commits commit type 'docs' --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c30aad..a54f0e2 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,11 @@ An approach to having kids use a Kodi media center instance: manage session use ## Valid Conventional Commits scopes -* `meta`: Affects the Git project's structure such as for example a `pyproject.toml` change, adding a new directory or changing how a news fragment file is formatted \ No newline at end of file +* `meta`: Affects the Git project's structure such as for example a `pyproject.toml` change, adding a new directory or changing how a news fragment file is formatted + * Examples: + ``` + refactor(meta): Move pytest config into 'pyproject.toml' + ``` + ``` + build(meta): Set custom towncrier news topics + ``` \ No newline at end of file