Compare commits

...

37 Commits

Author SHA1 Message Date
94ec8a7091 Merge pull request '1-get-feet-wet-versioning' (#2) from 1-get-feet-wet-versioning into master
Reviewed-on: #2
2022-05-02 21:04:55 +00:00
fb4f06fa84 docs(meta): Add two examples how to use the Conventional Commits commit type 'docs' 2022-05-02 02:50:18 +02:00
aca2c8a79f build(meta): Add new valid Conventional Commits commit type 'docs' 2022-05-02 02:49:29 +02:00
9d025ad7cb build(meta): Uniform style 2022-05-02 02:40:53 +02:00
850c3081e4 build(meta): Transfer pip-compile results into pyproject.toml 2022-05-02 02:40:08 +02:00
0aa77625b1 build(meta): Remove implicit click dependency 2022-05-02 02:34:45 +02:00
5ebdb570df build(meta): Add requirements.txt file 2022-05-02 02:32:56 +02:00
93cac5fe0e build(meta): Add another example for the 'meta' Conventional Commits commit type 2022-05-02 02:07:08 +02:00
2c864fef59 test(meta): Play with pytest tests 2022-05-02 02:00:20 +02:00
33bbf42b27 build(meta): Add 'test' as a valid Conventional Commits commit type 2022-05-02 01:59:49 +02:00
3d604284a5 refactor(meta): Add .rst extension to news fragment file for more clarity 2022-05-02 01:55:53 +02:00
3fd5590158 build(meta): Fix pytest functions name pattern 2022-05-02 01:38:46 +02:00
9175921b0f 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
2022-05-02 01:36:07 +02:00
b2e8c8bd7a refactor(meta): Move pytest config into 'pyproject.toml' 2022-05-02 01:03:49 +02:00
ccfb7054e1 refactor(meta): Typo 2022-05-02 00:23:26 +02:00
8bacdadd3a refactor(meta): Tighten Conventional commits scope docs 2022-05-02 00:22:44 +02:00
3510c3000d build(meta): Define currently accepted Conventional Commits scopes, at the moment only 'meta' 2022-05-02 00:21:37 +02:00
9f14b3da56 build(meta): Add another noteworthy news item 2022-05-02 00:13:24 +02:00
59d2dcf1fc build(meta): semver version string in kodi-timekeeper __init__.py is no longer needed, now lives in pyproject.toml 2022-05-02 00:12:27 +02:00
51a1ccaf8a build(meta): Add 'refactor' as a valid Conventional Commits commit type 2022-05-02 00:11:27 +02:00
df6580c800 build(meta): Get semver version string from within pyproject.toml 2022-05-02 00:08:47 +02:00
d78111ad90 build(meta): Pin build tools versions 2022-05-02 00:08:06 +02:00
048eee5bc8 build(meta): Add pyproject.toml project definition 2022-05-02 00:04:48 +02:00
semantic-release
8b289652e5 0.1.0
Automatically generated by python-semantic-release
2022-05-01 04:34:53 +02:00
bce59b6b15 build(meta): Play with auto-versioning 2022-05-01 04:24:23 +02:00
e0f4ced1ad build(meta): Set custom towncrier news topics 2022-05-01 04:23:28 +02:00
08d31d9965 build(meta): define newsfragments location 2022-05-01 04:21:38 +02:00
4080afb1b1 docs(meta): Add news fragment 2022-03-29 03:53:54 +02:00
1f17f7c46c build(meta): Make sure we have a persistent newsfragments dir 2022-03-29 03:39:16 +02:00
fbd7476e66 build(meta): Add build-system 2022-03-29 03:37:19 +02:00
17cb189d76 style(meta): Extend commit msg inspection 2022-03-29 03:23:24 +02:00
ec04840861 test(meta): Define a basic test 2022-03-29 03:22:28 +02:00
3a38089648 test(meta): Define test name patterns 2022-03-29 03:22:09 +02:00
13f6893df8 feat(meta): Define initial version, add init files 2022-03-29 03:21:11 +02:00
1fda5209cf feat(meta): Attempt writing a usable pyproject.toml 2022-03-29 03:19:00 +02:00
a9ed2aec6f Add tagline to README 2022-03-28 23:07:59 +02:00
25fa990cbc Initial commit 2022-03-28 23:02:30 +02:00
16 changed files with 267 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -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

View File

@ -0,0 +1,35 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ourVersions">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="3.11" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="google" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="str.decode" />
</list>
</option>
</inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/kodi-timekeeper.iml" filepath="$PROJECT_DIR$/.idea/kodi-timekeeper.iml" />
</modules>
</component>
</project>

12
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CommitMessageInspectionProfile">
<profile version="1.0">
<inspection_tool class="CommitFormat" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="CommitNamingConvention" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,2 +1,14 @@
# kodi-timekeeper # 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.
## 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
* Examples:
```
refactor(meta): Move pytest config into 'pyproject.toml'
```
```
build(meta): Set custom towncrier news topics
```

1
newsfragments/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
!.gitignore

View File

@ -0,0 +1,2 @@
Add rudimentary versioning mechanics
Set up project defaults

105
pyproject.toml Normal file
View File

@ -0,0 +1,105 @@
[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 = [
"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 = [
"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]
requires = [
"setuptools==58.0.4",
"wheel==0.37.1"
]
build-backend = "setuptools.build_meta"
[tool.semantic_release]
version_toml = "pyproject.toml:project.version"
major_on_zero = false
[tool.towncrier]
directory = "newsfragments"
package = "kodi-timekeeper"
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 = "Refactor", directory = "refactor", 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
# 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]
[tool.pytest.ini_options]
python_files = "test_*"
python_classes = "*Tests"
python_functions = "test_*"

4
requirements.in Normal file
View File

@ -0,0 +1,4 @@
requests
towncrier
semver
pytest

53
requirements.txt Normal file
View File

@ -0,0 +1,53 @@
#
# 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
# 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

0
src/__init__.py Normal file
View File

View File

0
tests/__init__.py Normal file
View File

View File

View File

@ -0,0 +1,21 @@
class KTKTests:
#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)