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

Make sure attribut __vacdays is only set during init #8

Closed
pb866 opened this issue May 21, 2022 · 2 comments
Closed

Make sure attribut __vacdays is only set during init #8

pb866 opened this issue May 21, 2022 · 2 comments
Labels
invalid This doesn't seem right
Milestone

Comments

@pb866
Copy link
Owner

pb866 commented May 21, 2022

When public method vacation_days is called, the attribute vacationdays should not change as this leads to wrong results in the output of the stats method.

@pb866 pb866 added the invalid This doesn't seem right label May 21, 2022
@pb866
Copy link
Owner Author

pb866 commented May 22, 2022

Quick fix for v0.1: hide method vacation_days.
For v0.2 make sure, vacation_days das not change any Kimai attributes. Make a public function vacation_days as described in #7 that does not change attributes and a private method that makes use of the public function that is allowed to change attributes.

@pb866 pb866 added this to the v0.1 milestone May 22, 2022
pb866 added a commit that referenced this issue Jun 9, 2022
Change default directory from data/ to cwd.
In main in class Kimai, make methods work_days and vacation_days
functions and move them to module workcal. Rename vacation_days to a
more general name off_days to be able to calculate other leave days like
sick leave. Deprecate method __vacation_number.
Store the vacation days and the file name as an instance of OffDays in
Kimai.
Instead of property and setter decorators use a generic setter and
deleter function and the property function with specific getters and the
generic setter/deleter function.
Define named tuple Period in module loader with default values for start
1.1.1900 and end 1.1.2100. Make TimeLog a subclass of TimeFrame and move
attributes year and period to TimeFrame.
Add module workcal to package kimbal and move with functions work_days
and off_days and class OffDays that calculates and saves the number of
leave days. Remove attributes in functions off_days and work_days to
ensure Kimai attributes cannot be change after instantiation (#8)
Use the find_packages function from supertools in setup.py to define the
packages in setup.
In module colourlog, rename colour variable to names associated with the
log level to be more flexible with colour changes.
Refine imports in main and other modules.
Update docstrings and README.
Closes #7 and #8.
@pb866
Copy link
Owner Author

pb866 commented Jun 9, 2022

Closed by 2fe7b57.

@pb866 pb866 closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant