adfinis / adfinis/libtimed

libtimed v1.0.0

Open
#22 0 comments 0 reactions 1 assignee View on GitHub

@c0rydoras is already working on this.

Since Nov 14, 2023.

Dominant language
Python
Stars
2
Forks
1
Avg merge
3m
Merged PRs (30d)
1

Description

Libtimed v1.0.0

This release will include many breaking features and will while in development live on the v1 branch

Features

Add dataclasses / pydantic models (#14)

Instead of:

print(timed.reports.get()[0]["relationships"]["task"]["data"]["id"])

It should be usable something like this:

>>> reports = timed.reports.get()
>>> some_report = reports[0]
>>> type(some_report)
<class 'libtimed.Report'>
>>> task = some_report.task
>>> type(task)
<class 'libtimed.Task'>
>>> print(task.id)
1234

To retain backwards compatibility allow using old API with __dict__

Breaking Changes

transforms.Time should return datetime.time (#23)

https://github.com/adfinis/libtimed/blob/df5db3c72a9a13e511b64cafc287c13f449168a6/src/libtimed/transforms.py#L156-L159
Time transform should return a datetime.time instead of a datetime.datetime(1900, 1, 1, time.hours, time.minutes, time.seconds). (see #17)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.