Migrate to qtty 0.8 and tempoch 0.6 with API updates#74
Merged
Conversation
- Bump qtty 0.7 → 0.8 and tempoch 0.4 → 0.5 (with tempoch-ffi) in all Cargo.tomls
- Add [patch.crates-io] pointing to local tempoch 0.5 path
- Update API usage throughout:
- EncodedTime::new(f64) → from_raw_unchecked(qtty::Day::new(f64))
- .jd_value()/.mjd_value() → .raw().value()
- EncodedTime arithmetic (±Quantity, subtraction) → raw-value operations
- .julian_millennias() → manual (raw - 2451545) / 365250 formula
- RepresentationForScale → FormatForScale
- InfallibleRepresentationForScale → InfallibleFormatForScale
- J2000_TT → J2000 const from raw value
- Add JD, MJD, JulianDate/ModifiedJulianDate generic aliases to time.rs
- Add UT1 re-export to time.rs
- Updated tests to replace direct usage of JulianDate and ModifiedJulianDate constructors with tempoch's Time conversions. - Changed instances of `ModifiedJulianDate::new` to `ModifiedJulianDate::from_raw_unchecked` for consistency. - Adjusted assertions to compare raw values instead of MJD values directly. - Introduced a new file for quick pattern verification of date handling methods.
|
…e::jd functions - Updated instances of `ModifiedJulianDate::from_raw_unchecked` to `crate::time::mjd` for consistency and clarity. - Replaced `JulianDate::from_raw_unchecked` with `crate::time::jd` in multiple locations to improve code readability and maintainability. - Ensured all time-related calculations utilize the new time handling functions for better error handling and type safety.
- Updated the `tempoch` dependency to version 0.5.1 in `Cargo.toml` and `Cargo.lock`. - Refactored date arithmetic in various benchmarks and examples to use the `+=` operator instead of creating new instances with `from_raw_unchecked`. - Improved clarity in comments regarding time conversions between UTC, TT, and MJD. - Adjusted the handling of `ModifiedJulianDate` and `Period<ModifiedJulianDate>` to ensure consistency across the codebase. - Enhanced the readability of the code by simplifying expressions and removing unnecessary intermediate variables.
…ine MJD conversion
…itialization - Updated multiple test files to replace `JulianDate::from_raw_unchecked` with `JulianDate::try_new` for improved safety and error handling. - Replaced instances of `JulianDate::J2000` with `siderust::time::J2000` for consistency across tests. - Ensured that all relevant tests now utilize the updated JulianDate initialization method.
…y duration calculations
…plifying expressions
…method for consistency
…jd` with `JulianDate` - Updated instances of `crate::time::mjd` to `crate::time::ModifiedJulianDate` across multiple modules to ensure consistency in date handling. - Replaced `crate::time::jd` with `crate::time::JulianDate` where applicable. - Adjusted related calculations to use the new constructors for `ModifiedJulianDate` and `JulianDate`. - Removed deprecated `jd` and `mjd` functions that were previously used for creating Julian and Modified Julian Dates. - Ensured all tests and references to time-related functions are updated to reflect these changes.
- Added conditional module `dynamics` for satellite feature in `lib.rs`. - Simplified `jd_ut1` method in `eop.rs` by removing unnecessary line breaks. - Reformatted multiple instances of `JulianDate::new` calls in `proper_motion.rs`, `solar_system.rs`, and other files for consistency. - Consolidated assertions in tests to single lines where applicable for clarity. - Enhanced readability in `moon_cache.rs`, `moon_equations.rs`, and other files by adjusting line breaks and indentation. - Ensured consistent formatting across various modules to adhere to style guidelines.
… changelog with new features and fixes
…comet constructors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.