A unified library for timetracking clients.
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Bump version: 0.13.1 → 0.13.2 Aug 8, 2017
hamster_lib Bump version: 0.13.1 → 0.13.2 Aug 8, 2017
requirements Explicitly pin 'factory-boy' version Aug 8, 2017
tests Merge branch 'bugfix/time_parse_seconds' into release/0.13.2 Aug 7, 2017
.editorconfig Add ``rst`` specific settings to editorconfig Jul 5, 2016
.gitignore Initial commit. Dec 17, 2015
.travis.yml Use 'tox-travis'(#171) Jul 22, 2016
AUTHORS.rst Re-add pypi badge(#169) Jul 21, 2016
CONTRIBUTING.rst Remove accidental special character Jun 2, 2017
HISTORY.rst
LICENSE Initial commit. Dec 17, 2015
MANIFEST.in Initial commit. Dec 17, 2015
Makefile Use 'PYTEST_ADDOPTS' instead of 'TEST_ARGS' Oct 6, 2016
README.rst Update Changelog and README Jun 7, 2017
codecov.yml Give some flexibility to passing coverage tests. Jun 13, 2017
setup.cfg Bump version: 0.13.1 → 0.13.2 Aug 8, 2017
setup.py Bump version: 0.13.1 → 0.13.2 Aug 8, 2017
tox.ini [requires.io] dependency update Jun 7, 2017

README.rst

hamster-lib

https://img.shields.io/pypi/v/hamster-lib.svg?maxAge=2592000 Documentation Status Requirements Status

(A badges refer to master)

A library for common timetracking functionality.

hamster-lib aims to be a replacement for projecthamster backend library. While we are not able to function as a straight forward drop-in replacement we try very hard to stay as compatible as possible. As a consequence clients are able to switch to hamster-lib merely by changing some basic calls. Most of the semantics and return values will be as before.

This itself points to a major architectural shift in the way hamster-lib approaches timetracking. We are firm believers in do one thing, and do it well. The tried and tested unix toolbox principle. As such we focus on providing useful backend functionality and helper methods so clients (dbus interfaces, CLIs or graphical UIs) can build upon a solid and consistent base and focus on their specific requirements.

Features

  • Full python >=2.7 and >=3.4 compatibility
  • Full unicode support
  • >= 95% test coverage
  • Extensive documentation
  • Focus on clean, maintainable code.
  • Free software: GPL3
  • All you need for production, test or dev environments comes out of the box with regular python tools.

First Steps

  • Build dev environment: make develop
  • Build the documentation locally: make docs
  • Run just the tests: make test
  • Run entire test suite including linters and coverage: make test-all

Additional Resources

News: Version 0.13.0

This release features only few public functional changes:

  1. Raw fact parsing has been moved to a helper method. This should make it easier for clients to parse raw fact strings even if they do not qualify as valid Fact instances.
  2. Facts now provide a serialied_string method that encodes all relevant data.
  3. We now ship config helpers that provide a baseline config that can easily be extended instead of each client having to implement this all over again.

For a more detailed overview about what new as well as a list of all the smaller improvements, please refer to the changelog.

Happy tracking; Eric.

Todo

This early release is mainly meant as a rough proof-of-concept at this stage. It showcases our API as well as our general design decisions. As such there are a few functionalities/details of the original projecthamster backend that we wish to allow for, but are not provided so far. These are:

  • Autocomplete related methods
  • Trophies (The jury is still out on if and how we want to support those.)
  • Migrations from old databases.

Incompatibilities

Despite our efforts to stay backwards compatible we did deliberately break the way Facts without end dates are handled. We think allowing for them in any persistent backend creates a data consistency nightmare and so far there seems no conceivable use case for it, let alone an obvious semantic. What we do allow for is one ongoing fact. That is a fact that has a start, but no end date. For details, please refer to the documentation.

Credits

Tools used in rendering this package: