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

Chrono migration #6

Merged
merged 33 commits into from
Oct 4, 2023
Merged

Chrono migration #6

merged 33 commits into from
Oct 4, 2023

Conversation

cantordust
Copy link
Collaborator

@cantordust cantordust commented Sep 29, 2023

Currently implemented:

  • Constructors
  • Comparison operators
  • Unary and binary operators (+, -, etc.)
  • Conversions from / to MJD and JD

TODO

  • Final decision on what should be exposed to Python
  • Confirm the meaning of the mjd(), jd() and mjd2000() conversion functions
  • Determine in what contexts we need to convert the time point to a double

@darioizzo
Copy link
Member

Can you solve the conflicts and push? @cantordust ?

@cantordust
Copy link
Collaborator Author

cantordust commented Sep 29, 2023

I resolved the conflicts, but the CI actions are failing...

class epoch
===========

- Added a default constructor and a constructor for microseconds
- Added constructor templates to resolve ambiguities
- Fixed serialisation issues
- Other fixes, cleanup
- Removed missing header included in planet_test.cpp
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2023

Codecov Report

Merging #6 (6669eb3) into main (5620eb0) will decrease coverage by 0.13%.
The diff coverage is 96.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   98.59%   98.46%   -0.13%     
==========================================
  Files          21       20       -1     
  Lines        1206     1174      -32     
==========================================
- Hits         1189     1156      -33     
- Misses         17       18       +1     
Files Coverage Δ
include/kep3/epoch.hpp 100.00% <100.00%> (ø)
include/kep3/planets/keplerian.hpp 100.00% <100.00%> (ø)
src/planets/jpl_lp.cpp 98.42% <100.00%> (ø)
src/planets/keplerian.cpp 99.01% <100.00%> (+1.93%) ⬆️
src/epoch.cpp 93.87% <93.75%> (-6.13%) ⬇️

cantordust and others added 19 commits September 30, 2023 00:04
- Added typename to template
- Reordered initialisation in constructors of keplerian planet
- Removed user-defined epoch::operator=()
- Removed erroneous #include <bits/chrono.h>
NOTE
====
epoch::julian_type is an enum *class* (not a plain enum). This is necessary to avoid implicit conversion from julian_type to an integral type.
- Formatting
- Deprecated methods removed
- Documentation updated

TODO
====
- More verbose documentation
- Improve test coverage
darioizzo and others added 6 commits October 1, 2023 11:55
- Epoch now has a constructor epoch(y, mon, d, h, min, s, ms, us)
- Improvements in printing (Clang shouldn't complain about thread safety)

TODO
====

- Still no conversion from string. That would probably happen at the Python end in a static function, which would parse the string and then use the decoposed datetime object with the new constructor above.
- Reverted unsigned int arguments to int in one of the epoch constructors and epoch::make_tp()
@darioizzo darioizzo merged commit 9858556 into esa:main Oct 4, 2023
5 checks passed
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.

3 participants