Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 port + usability fixes #363

Merged
merged 48 commits into from
Nov 24, 2018
Merged

python3 port + usability fixes #363

merged 48 commits into from
Nov 24, 2018

Conversation

ederag
Copy link
Collaborator

@ederag ederag commented Aug 23, 2018

hamster-time-tracker was dropped from openSUSE Leap15
https://www.reddit.com/r/openSUSE/comments/7zrj03/whats_the_best_time_tracker_on_tumbleweed/
The new development seemed to go well, but still claimed as alpha.
The fork by gsobczyk had too many unresolved dependencies on Leap15.
The master branch worked out of the box,
without python-gconf, and with the same hamster.db database.

Several usability fixes were needed though.
Now it seems more intuitive and consistent.
There is a python2 branch, but I'm now exclusively on the python3 branch.
There seems to be little chance to merge it back here,
so comments, issues and small PR are welcome in this fork.
It will hopefully last only a few years, until the new hamster-* is stable.

michaelkuhn and others added 30 commits February 19, 2016 20:11
In GTK2 the flag was accessible via gtk.TARGET_SAME_APP but in GTK3 this
became gtk.TargetFlags.SAME_APP. A similar change was done elsewhere in
the same module but some lines were left unchanged.

Should fix projecthamster#306
re-generated pot and added missing translations
Avoid
PyGIWarning: GConf was imported without specifying a version first.
Use gi.require_version('GConf', '2.0') before import
to ensure that the right version gets loaded.
Avoid
PyGIWarning: PangoCairo was imported without specifying a version first.
edit_activity.py:
  Use the string representation of the fact, instead of a custom one.
  This consistency helped,
  and seems necessary to handle dates other than today.

lib/__init__.py:
  * Centralize date and time formats
    (hamster.lib.DATE_FMT and hamster.lib.TIME_FMT, respectively)
  * Fact constructor can now receive an `initial_fact` argument to start from.
  * The string representation now contains all the relevant information,
    including date
  * Fact.date is a read-only property now
  * Recursion clarified: got rid of next_phase().

widgets/activityentry.py:
  * on_icon_press, show_suggestions based on current text,
    instead of empty string.
  * Propose a variant that corresponds to stopping
    the currently running activity
Now `python2 tests/stuff_test.py` works as expected, with the development files
* new conversion functions in hamster/lib/stuff:
  datetime_to_hamsterday and hamsterday_time_to_datetime
* Fact.date is a read/write property.
  Reading is based on start_time only.
  Writing one-shot modifies start_time and end_time (if already defined).
* Correctly use the given date (DATE_FMT at the begining) to set
  the correct dates of start_time and end_time,
  taking into account the hamster day start.
* better variants:
  - "stop now",
  - "keep up"
    only use that one if the edited activity is the last one.
    No protection yet
  - "start now"
  - "from previous activity"
  - "clear"
* suggestions are always shown, even when times are typed in.
For example the "_draw()" method in HorizontalBarChart tries to call
"self._max.total_seconds()" which does not work on plain numbers.
In the common case where "self._max" is initialized via ".set_values()"
it will always receive a timedelta because Fact instances also use
these.
@ederag
Copy link
Collaborator Author

ederag commented Sep 19, 2018

Since nobody seem to handle this repo,
and since my fork is inline with the current master,
I kindly propose to maintain projecthamster/hamster,
until the new hamster-* are stable.

@deivid-rodriguez
Copy link

It'd be great if hamster was maintained again while the rewrite happens! ❤️

@elbenfreund
Copy link
Contributor

I am in a bit of a rush right now, so here is the gist of it:
❤️ 👍 🎉

@ederag Thanks for reaching out via mail recently. As you correctly assumed, sadly I personally do not have any resources to spend on legacy hamster. And so far noone else has steped up to the challenge.

As you have shown a willingness to actually invest work into this, as well as made a charming first impression I would be happy to accept you as the maintainer for the legacy hamyer repo and have you handle this by your own best judgement.

Before you accept this offer though: Please take a day or two for some soul searching as picking up the slack on the old code will without a doubt raise new expectations and there will be more work to come. So what I would ask is that you can be reasonably safe and willing to stick with the project for at least half a year. :) (I am the first to acknowledge that this is always easier said than done ;()

I am looking forward hearing from you and thank you for this awesome contribution.

@ederag
Copy link
Collaborator Author

ederag commented Oct 29, 2018

picking up the slack on the old code will without a doubt raise new expectations and there will be more work to come.

Thanks for the kind and wise words.
No fancy promises here: the legacy code is good, but I agree, hard to maintain.
So only little straightforward fixes are to be expected.
The goal is just to keep legacy hamster working on new platforms,
and allow users to continue to use this great tool,
until the rewrite is stable; that's where the main effort should go.

So what I would ask is that you can be reasonably safe and willing to stick with the project for at least half a year. :)

It is my intent, but please note that write permissions to
projecthamster/hamster should be enough to maintain it.
So you keep full control of the project (including legacy hamster), of course.

Edit: I was thinking only of the "half a year" probation. As time went by, his rights over legacy hamster became questionable, especially as it was officially declared abandoned.

@ederag ederag merged commit 5fa84d5 into projecthamster:master Nov 24, 2018
@ederag ederag deleted the python3 branch November 24, 2018 12:04
@shaform
Copy link

shaform commented Dec 17, 2018

Would it ever be possible to update the version 2.91.3 as well? Currently, I am using the instructions in #356 to install 2.91.3. But I am worried that one day this would no longer work for future versions of Ubuntu.

Mmmm..., after some inspection on the code, it seems to me that 2.91.3 is a pretty old version. On the other hand, the newer versions seem to lack a lot of functionalities.

@ederag
Copy link
Collaborator Author

ederag commented Dec 17, 2018

@shaform exactly. If you manage to install the old version, then it is currently the best choice,
There is no reason to worry though, since the rewrite is under way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants