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

4.0.0 dev gh 237 #289

Merged
merged 68 commits into from
Apr 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
c8648ef
epoch::from_duration slight improvements
gwbres May 27, 2023
0062d93
rename epoch inner duration
gwbres May 28, 2023
b6580ea
introducing to_time_scale
gwbres May 28, 2023
5de034b
introducing week unit
gwbres May 28, 2023
9d0afbd
fix eq and comparison issue: compare in same time scale
gwbres May 28, 2023
7ffad08
Update src/epoch.rs
gwbres May 30, 2023
e477272
Update src/epoch.rs
gwbres May 30, 2023
17f0568
working on compute_gregorian()
gwbres May 30, 2023
6df531a
Fixed unit tests
ChristopherRabotin Jun 12, 2023
c6218ef
Spread out duration.rs into a module
ChristopherRabotin Jun 12, 2023
846418e
Merge branch '4.0.0-dev' into 4.0.0-dev-gh-237
ChristopherRabotin Jun 12, 2023
0885a42
Modicum of progress but TDB/ET conversions are broken
ChristopherRabotin Jun 16, 2023
ac709df
Progress in time scale conversion with new arch
ChristopherRabotin Jun 17, 2023
e70be45
Also convert the time scale with leap seconds into the one without le…
ChristopherRabotin Jun 17, 2023
5c4a2eb
Fix gregorian computation with new arch
ChristopherRabotin Jun 17, 2023
fb0e809
Might have found a bug in duration decompose
ChristopherRabotin Jun 17, 2023
3606ef6
Fix decompose in duration
ChristopherRabotin Jun 17, 2023
53d6ca5
Replace references to `self.duration` to ensure TAI conversion
ChristopherRabotin Jun 17, 2023
5899c93
Likely bug to be fixed
ChristopherRabotin Jun 17, 2023
faa31cc
add more tests
Sep 2, 2023
8e19bfa
improve to_time_scale, initial_year..
Sep 2, 2023
d1e6236
on the right track..
Sep 2, 2023
ce02a28
on the right track..
Sep 2, 2023
a225d8d
working on tai_utc
Sep 2, 2023
7e10d82
working on tai_utc
Sep 2, 2023
e95b519
working on tai_utc
Sep 2, 2023
324c676
working on tai_utc
Sep 2, 2023
295f46f
change print behavior
Sep 2, 2023
52fec8f
revert to_time_scale()
Sep 3, 2023
233d449
time_scale.decompose()
Sep 3, 2023
75350b1
revert from_gregorian and compute_gregorian
Sep 3, 2023
88e544d
revert to previously almost correct gregorian
Sep 3, 2023
49c2a23
Modify Epoch.debug() behavior
Sep 18, 2023
f47d416
modify PartialEq behavior
Sep 29, 2023
97ad926
reduce indentation
gwbres Sep 29, 2023
451c29a
...
gwbres Sep 29, 2023
7f6441e
...
gwbres Sep 29, 2023
729160d
fix to_bdt_duration
gwbres Sep 30, 2023
fff0c95
Revert recent changes, will compare
ChristopherRabotin Mar 3, 2024
dad52e0
Start working on #282
ChristopherRabotin Mar 29, 2024
997957f
Fix merge conflicts with master (still one more left)
ChristopherRabotin Mar 29, 2024
1e15ddf
Update duration
ChristopherRabotin Mar 29, 2024
569d0a7
Merge branch 'master' into 4.0.0-dev-gh-237
ChristopherRabotin Mar 29, 2024
6a26880
Merge branch 'master' into 4.0.0-dev-gh-237
ChristopherRabotin Apr 6, 2024
d29c3cd
Fix formatting of time scales if ref hour is != 0
ChristopherRabotin Apr 7, 2024
fe5a79f
Only 36524 days in the 20th century
ChristopherRabotin Apr 7, 2024
a0e0b47
Fixed spice_et_tdb test
ChristopherRabotin Apr 8, 2024
b63a5e6
Fixed test_from_str
ChristopherRabotin Apr 8, 2024
5ac34a2
Fix ref year of TT
ChristopherRabotin Apr 16, 2024
88d74c7
Fixed where the time scale ref hour is applied
ChristopherRabotin Apr 17, 2024
2b98298
Fixed ref hour correction in formatting for ET and TDB
ChristopherRabotin Apr 17, 2024
a2df9ed
Merge branch 'master' into 4.0.0-dev-gh-237
ChristopherRabotin Apr 17, 2024
09428c5
Replace ref_hour and ref_year by the prime epoch difference
ChristopherRabotin Apr 19, 2024
57c979f
Ensure that durations are normalized before adding or subtracting
ChristopherRabotin Apr 20, 2024
02296e7
Fix documentation for test_days_et_j2000
ChristopherRabotin Apr 20, 2024
20e2186
Add `subdivision` to Duration and gregorian_epoch_offset which is the…
ChristopherRabotin Apr 21, 2024
e89bd04
Disabled test_timescale_leapsec test -- I don't think it's relevant
ChristopherRabotin Apr 23, 2024
c2a0d21
Fix doc test
ChristopherRabotin Apr 23, 2024
6351f4f
Update readme
ChristopherRabotin Apr 23, 2024
a13aff5
Update Python bindings to 0.21
ChristopherRabotin Apr 23, 2024
1a3b0af
Fix UT1
ChristopherRabotin Apr 23, 2024
51f59fa
Fix no-std builds and update MSRV
ChristopherRabotin Apr 23, 2024
a946d0e
Fix kani
ChristopherRabotin Apr 23, 2024
cc32ec7
Fix kani + switch to -alpha for pip
ChristopherRabotin Apr 23, 2024
ffed960
Adding no-index and verbose for pip
ChristopherRabotin Apr 23, 2024
acbe57c
Try to fix aarch64 python
ChristopherRabotin Apr 23, 2024
db26d2c
Update artifact action for warning
ChristopherRabotin Apr 23, 2024
6139ecc
Revert to artifacts v3
ChristopherRabotin Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix UT1
ChristopherRabotin committed Apr 23, 2024
commit 1a3b0af0dbb9c3bfe2a0c70733f76257609f195f
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -31,8 +31,6 @@ jobs:
python-version: '3.11'
check-latest: false
allow-prereleases: false
- name: Remove bad python
run: ls -l `which python`; ls -l /usr/bin/python*
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
@@ -63,6 +61,7 @@ jobs:
shell: bash
run: |
set -e
ls dist
pip install hifitime --find-links dist --force-reinstall
pip install pytest
pytest
@@ -79,6 +78,7 @@ jobs:
pip3 install -U pip pytest
run: |
set -e
ls dist
pip3 install hifitime --find-links dist --force-reinstall
pytest

2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ jobs:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.64 # Run lints using the MSRV not latest
toolchain: 1.74 # Run lints using the MSRV not latest
components: rustfmt, clippy

- name: Run cargo fmt
8 changes: 3 additions & 5 deletions src/epoch.rs
Original file line number Diff line number Diff line change
@@ -139,6 +139,7 @@ impl Hash for Epoch {
}
}

#[cfg(feature = "serde")]
impl Serialize for Epoch {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
@@ -149,6 +150,7 @@ impl Serialize for Epoch {
}
}

#[cfg(feature = "serde")]
impl<'de> Deserialize<'de> for Epoch {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
@@ -2477,11 +2479,7 @@ impl Epoch {
#[must_use]
/// Returns this time in a Duration past J1900 counted in UT1
pub fn to_ut1(&self, provider: Ut1Provider) -> Self {
let mut me = *self;
// TAI = UT1 + offset <=> UTC = TAI - offset
me.duration -= self.ut1_offset(provider).unwrap_or(Duration::ZERO);
me.time_scale = TimeScale::TAI;
me
Self::from_tai_duration(self.to_ut1_duration(provider))
}

#[must_use]