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

Use datetime built-in library #20

Merged
merged 11 commits into from
Jul 27, 2024
Merged

Use datetime built-in library #20

merged 11 commits into from
Jul 27, 2024

Conversation

DeutscheGabanna
Copy link
Owner

@DeutscheGabanna DeutscheGabanna commented Jul 27, 2024

Contents (#20)

IMPORTANT: There is 1 breaking change.

Other

  • Specify missing interpreter for Run all tests
  • Add lowercase IDE config file
  • Use Pipenv in misc.xml config
  • Reorganise for Docker testing
  • Exit with code 1 if something failed
  • Set proper ENTRYPOINT & CMD
  • Add more test CSVs as partially ok
  • Add separate Dockerfile for testing
  • Do not append while outputting files
  • Prepare code for ditching global config
  • Use datetime library

Upgrade instructions

💥 Use `datetime` library

Remove custom Date and Time classes in favour of datetime built-in library

  • Add helper methods for the datetime library to help detect what format a date or time is written in (such solutions do not come out of the box)
  • Improved code structure
  • BREAKING CHANGE: Name changes to classes
  • more common use of __getitem__ and __setitem__ dunders instead of making separate methods for manipulating dictionary items
  • Remade tests to accommodate the library change

Copy link

github-actions bot commented Jul 27, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/daylio_to_md
  group.py 25, 49, 75-100, 159-160, 207, 222, 235, 275-280
  journal_entry.py 23, 73, 90, 164, 180
  librarian.py 28, 56, 78, 92, 99, 109, 172, 253-254, 258, 279, 290, 338
  utils.py 19, 37-38, 42, 46, 74, 81, 100, 207, 301-302
  tests
  suppress.py
  test_group.py
  test_journal_entry.py
  test_librarian.py
  test_mood.py
  test_output.py
  test_utils.py
Project Total  

This report was generated by python-coverage-comment-action

- Structure in tests/files now follows a series of chronological test fixtures
- Lay the groundwork for future Docker-based testing, where the package is containerised and scripted in bash to process all these fixtures
- Rename some files to cut down the length
- Adjust all tests accordingly
- Moods file and the valid entry file are shared into multiple locations in the tests directory as symlinks
- moved one check from test_default_moodverse_no_customisation to a separate test method
- Changed file access mode from `a` to `w`
- Classes and methods now accept local config as parameters instead of accessing them from a global variable.
- Still needs work to do, especially in the actual user-facing command, but should get us closer to no globals.
- BREAKING CHANGE: Remove custom Date and Time classes in favour of `datetime` built-in library
- Add helper methods for the `datetime` library to help detect what format a date or time is written in (such solutions do not come out of the box)
- Improved code structure
- BREAKING CHANGE: Name changes to classes
- more common use of `__getitem__` and `__setitem__` dunders instead of making separate methods for manipulating dictionary items
- Remade tests to accommodate the library change
@DeutscheGabanna DeutscheGabanna merged commit d98035c into main Jul 27, 2024
12 checks passed
@DeutscheGabanna DeutscheGabanna deleted the db_cls_cls branch July 27, 2024 20:44
@DeutscheGabanna DeutscheGabanna added the enhancement New feature or request label Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant