1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
2b3174dc05 🤖 Bumped version to 0.1.7
All checks were successful
Package Python / Package (push) Successful in 24s
Test Python / Test (push) Successful in 22s
This commit was automatically generated by a script: https://gitfub.space/Jmaa/python-omni
2024-07-08 20:22:54 +02:00
df267224ad 🤖 Repository layout updated to latest version
This commit was automatically generated by a script: https://gitfub.space/Jmaa/python-omni
2024-07-08 20:22:14 +02:00
2 changed files with 30 additions and 17 deletions

View File

@ -1 +1 @@
__version__ = '0.1.6'
__version__ = '0.1.7'

View File

@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# WARNING
#
# THIS IS AN AUTOGENERATED FILE.
@ -12,9 +10,34 @@ from setuptools import setup
PACKAGE_NAME = 'git_time_tracker'
with open('README.md') as f:
readme = f.read()
PACKAGE_DESCRIPTION = """
# Git-based Time Tracker
Quick and dirty time tracker on git histories.
Uses the simple heuristics that each commit takes precisely one hour of work.
It will automatically trim commits below one hour if another commit occurred
less than an hour ago.
Usage:
```
python -m git_time_tracker REPO1 REPO2...
```
# Obligatory
This tool reports:
```
project Jmaa/git-time-tracker.git 3h 33m (2024)
```
And the ([Hamster](https://github.com/projecthamster/hamster)) manual time tracker reports:
![](docs/obligatory-hamster.png)"""
PACKAGE_DESCRIPTION_SHORT='Quick and dirty time tracker on git histories.'
def parse_version_file(text: str) -> str:
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
@ -37,16 +60,6 @@ def read_requirements(path: str) -> list[str]:
return parse_requirements(f.read())
def determine_short_description(readme: str) -> str:
readme = re.sub(r'#+[^\n]*\n+', '', readme)
m = re.search(r'^\s*(\w+[\w\s,`+-]+\.)', readme)
try:
return m.group(1)
except AttributeError as err:
msg = f'Could not determine short description: {readme}'
raise Exception(msg) from err
REQUIREMENTS_MAIN = """
GitPython
"""
@ -59,8 +72,8 @@ pytest
setup(
name=PACKAGE_NAME,
version=version,
description=determine_short_description(readme),
long_description=readme,
description=PACKAGE_DESCRIPTION_SHORT,
long_description=PACKAGE_DESCRIPTION,
long_description_content_type='text/markdown',
author='Jmaa',
author_email='jonjmaa@gmail.com',