Skip to content

Commit 403f08e

Browse files
authored
Merge pull request #113 from bxparks/develop
merge 2.2.3 into master
2 parents e580545 + fc74f1f commit 403f08e

File tree

404 files changed

+26904
-25899
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404 files changed

+26904
-25899
lines changed

.github/workflows/validation.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ jobs:
2626
- name: Checkout Additional Repos
2727
run: |
2828
cd ..
29-
git clone --depth 1 https://github.com/bxparks/EpoxyDuino
29+
git clone --depth 1 https://github.com/HowardHinnant/date
3030
git clone --depth 1 https://github.com/bxparks/AUnit
3131
git clone --depth 1 https://github.com/bxparks/AceCommon
3232
git clone --depth 1 https://github.com/bxparks/AceSorting
3333
git clone --depth 1 https://github.com/bxparks/AceTimeTools
34-
git clone --depth 1 https://github.com/bxparks/AceTimePython
3534
git clone --depth 1 https://github.com/bxparks/AceTimeValidation
36-
git clone --depth 1 https://github.com/HowardHinnant/date
35+
git clone --depth 1 https://github.com/bxparks/EpoxyDuino
36+
git clone --depth 1 https://github.com/bxparks/acetimec
37+
git clone --depth 1 https://github.com/bxparks/acetimepy
3738
git clone https://github.com/eggert/tz
3839
3940
- name: Set up Python 3.7
@@ -49,23 +50,30 @@ jobs:
4950
python -m pip install --upgrade pip
5051
pip install -r ../AceTimeTools/requirements.txt
5152
pip install -e ../AceTimeTools
52-
pip install -r ../AceTimePython/requirements.txt
53-
pip install -e ../AceTimePython
53+
pip install -r ../acetimepy/requirements.txt
54+
pip install -e ../acetimepy
5455
5556
- name: Install libcurl4-openssl-dev
5657
run: |
5758
sudo apt update
5859
sudo apt install -y libcurl4-openssl-dev
5960
60-
# Run the validations from AceTimeValidations (BasicHinnantDateTest,
61-
# ExtendedHinnantDateTest, BasicAcetzTest, ExtendedAcetzTest). We don't run
62-
# the others because when a new TZDB version comes out, the Python
63-
# zoneinfo, Python pytz, Python dateutil, and Java validation tests will
64-
# fail because they depend on the obsolete TZ database on the host
65-
# Operating System. The 'make validations' will also compile the binary in
61+
- name: Build Compare tools
62+
run: |
63+
make -C ../acetimec/src
64+
make -C ../AceTimeValidation/tools/compare_acetimec
65+
make -C ../AceTimeValidation/tools/compare_libc
66+
make -C ../AceTimeValidation/tools/compare_hinnant
67+
68+
# Run the tests in AceTimeValidations (HinnantBasicTest,
69+
# HinnantExtendedTest, AcetzBasicTest, AcetzExtendedTest). We don't run the
70+
# others because when a new TZDB version comes out, the Python zoneinfo,
71+
# Python pytz, Python dateutil, and Java validation tests will fail because
72+
# they depend on the obsolete TZ database on the host Operating System. The
73+
# 'make validations' will also compile the binary in
6674
# AceTimeValidation/compare_cpp/ as necessary.
6775
- name: AceTimeValidation
6876
run: |
6977
cd ../AceTimeValidation
70-
make validations
71-
make runvalidations
78+
make -C tests tests
79+
make -C tests runtests

CHANGELOG.md

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
11
# Changelog
22

33
* Unreleased
4+
* 2.2.3 (2023-05-31, TZDB version 2023c)
5+
* Update `ace_time/testing/*` classes to support splitting the test data
6+
into 2 separate lists: `transitions` and `samples`.
7+
* Required to support new `validation_data.json` from AceTimeValidation.
8+
* Update `AceTimeValidation` test names to `tests/Xxx{Basic,Extended}Test`.
9+
* Add `ZonedExtra::kAbbrevSize` to define the `char` buffer size needed to
10+
hold an abbreviation.
11+
* Change `ZonedExtra::kInvalidMinutes` from public to private.
12+
* This is an implementation detail.
13+
* Use `ZonedExtra::isError()` instead.
14+
* Rename AceTimePython to acetimepy.
15+
* ZoneProcessor transition cache
16+
* Save the epoch year, and automatically invalidate and regenerate the
17+
cache when the `Epoch::currentEpochYear()` is modified.
18+
* Remove cache invalidation methods which are no longer needed:
19+
* `ZoneProcessor::resetTransitionCache()`
20+
* `ZoneProcessorCache::resetZoneProcessors()`
21+
* `ZoneManager::resetZoneProcessors()`
22+
* Rename "Converter Epoch" to "Internal Epoch".
23+
* Change `daysToCurrentEpochFromConverterEpoch()` to
24+
`daysToCurrentEpochFromInternalEpoch()`.
25+
* This is an internal implementation detail, exposed only for testing
26+
purposes.
27+
* Update supported boards and tiers
28+
* Add SAMD21 and SAMD51 boards to Tier 1
29+
* Add Adafruit ItsyBitsy M4 (SAMD51 120MHz ARM Cortex-M4)
30+
* SAMD21 and SAMD51 boards are back in Tier 1, as long as they use
31+
the traditional Arduino API instead of the new
32+
[Arduino-Core](https://github.com/arduino/ArduinoCore-api).
33+
* Fortunately most third party SAMD21 and SAMD51 boards continue to
34+
use the traditional Arduino API.
35+
* Move Teensy 3.2 to Tier 2
36+
* This board is entering end-of-life.
37+
* As well, the Teensyduino environment integrates with the Arduino
38+
IDE and CLI in a way that's different than all other third-party
39+
Arduino boards. Some of my automation scripts do not work with
40+
Teensyduino, so it becomes very time consuming to test the Teensy
41+
boards.
42+
* All Teensy boards are now in Tier 2 ("Should work but not tested
43+
often").
444
* 2.2.2 (2023-04-01, TZDB version 2023c)
545
* Upgrade TZDB from 2023b to 2023c.
646
* https://mm.icann.org/pipermail/tz-announce/2023-March/000079.html
@@ -387,7 +427,7 @@
387427
* All of these methods were intended for internal debugging so these
388428
changes are not considered to be an API change.
389429
* The semantics of these methods are now closer to the algorithm in
390-
`AceTimePython/zone_processor.ZoneProcessor`.
430+
`acetimepy/zone_processor.py`.
391431
* **Breaking Change**: Extract `BasicZoneProcessorCache` and
392432
`ExtendedZoneProcessorCache` out of `BasicZoneManager` and
393433
`ExtendedZoneManager`. Remove all pure `virtual` methods from
@@ -448,19 +488,19 @@
448488
* They are now considered to happen at the same time if any of the 'w'
449489
time, 's' time, or 'u' time are equal.
450490
* The behavior of `ExtendedZoneProcessor.h` should now be identical
451-
to `zone_processor.py` in the `AceTimePython` library.
491+
to `zone_processor.py` in the `acetimepy` library.
452492
* Seems to affect only `Europe/Lisbon` in 1992, which is not a part of
453493
the predefined `zonedb` or `zonedbx` database, which normally include
454494
only 2000 until 2050.
455495
* Testing
456-
* Create [AceTimePython](https://github.com/bxparks/AceTimePython)
496+
* Create [acetimepy](https://github.com/bxparks/acetimepy)
457497
library extracted from the previously split
458498
[AceTimeTools](https://github.com/bxparks/AceTimeTools) project.
459499
* Update `ace_time/testing/ExtendedTransitionTest.h` to validate
460500
the exact equality between the observed maximum buffer size of
461501
TransitionStorage as observed by `ExtendedZoneProcessor` and the
462502
buffer size calculated by AceTimeTools using `zone_processor.py` of
463-
`AceTimePython` library.
503+
`acetimepy` library.
464504
* Create `examples/DebugZoneProcessor` for debugging the internal logic
465505
of `ExtendedZoneProcessor`.
466506
* Tool Chain
@@ -543,12 +583,11 @@
543583
* Run the Noda Time `TzdbCompiler` manually to generate custom
544584
`tzdata$(TZ_VERSION).nzd` for the specific TZDB version specified in
545585
the Makefile.
546-
* Add `tests/validation/BasicNodaTest` which matches AceTime completely
547-
from year 2000 until 2050.
586+
* Add `tests/validation/tests/NodaBasicTest` which matches AceTime
587+
completely from year 2000 until 2050.
548588
* Add `tests/validation/ExtendedNodaTest` which maches AceTime
549589
completely from year 1974 until 2050.
550-
* Identical results to `BasicHinnantDateTest` and
551-
`ExtendedHinnantDateTest`.
590+
* Identical results to `HinnantBasicTest` and `HinnantExtendedTest`.
552591
* Add `ace_time::clock::Stm32F1Clock` and `ace_time::hw::Stm32F1Rtc`
553592
* Specialized classes for the STM32F1 chip, particularly the Blue Pill
554593
board, using the `LSE_CLOCK` (low speed external clock).
@@ -575,7 +614,7 @@
575614
but only 50-60 bytes on other 32-bit processors.
576615
* Finish a working implementation of `acetz.py`.
577616
* Includes support for `fold`.
578-
* Create `BasicAcetzTest` and `ExtendedAcetzTest` and verify all zones
617+
* Create `AcetzBasicTest` and `AcetzExtendedTest` and verify all zones
579618
validate.
580619
* Time zone short names are printed with spaces instead of underscore.
581620
* Various `printShortNameTo()` and `printShortTo()` methods now print
@@ -912,8 +951,8 @@
912951
* Upgrade to TZDB 2020c
913952
(https://mm.icann.org/pipermail/tz-announce/2020-October/000060.html)
914953
* "Fiji starts DST later than usual, on 2020-12-20."
915-
* Restrict GitHub Actions workflow to run just BasicHinnantDateTest and
916-
ExtendedHinnantDateTest, because the other Python and Java tests break
954+
* Restrict GitHub Actions workflow to run just HinnantBasicTest and
955+
HinnantExtendedTest, because the other Python and Java tests break
917956
every time a new TZDB version comes out.
918957
* Add `DEVELOPER.md` file containing notes mostly for myself.
919958
* 1.1 (2020-04-25, TZ DB version 2020a)

DEVELOPER.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,38 @@ integration tests under `./tests/validation` were moved into the
2828
[AceTimeValidations](https://github.com/bxparks/AceTimeValidation) project. Then
2929
on 2021-09-08, the Python timezone classes (`zone_processor.py`, `acetz.py`,
3030
etc) were moved into the
31-
[AceTimePython](https://github.com/bxparks/AceTimePython) project.
31+
[acetimepy](https://github.com/bxparks/acetimepy) project.
3232

3333
Here is the dependency diagram among these projects.
3434

3535
```
3636
AceTimeTools --------
3737
^ ^ ^ \ artransformer.py
3838
creating / | \ creating \ -> bufestimator.py
39-
zonedb[x] / | \ zonedb \ -> zone_processor.py
40-
/ | \ v
41-
AceTime | AceTimePython
39+
zonedb[x] / | \ zonedb / -> zone_processor.py
40+
/ | \ v
41+
AceTime | acetimepy
4242
^ ^ | ^
4343
/ \ | /
4444
/ \ | /
4545
AceTimeClock AceTimeValidation
4646
```
4747

48-
There is slight circular dependency between `AceTimeTools` and `AceTimePython`.
48+
There is slight circular dependency between `AceTimeTools` and `acetimepy`.
4949

50-
AceTimeTools needs AceTimePython when generating the C++ zoneinfo files under
50+
AceTimeTools needs acetimepy when generating the C++ zoneinfo files under
5151
`AceTime/src/zonedb[x]`. The `tzcompiler.py` calls `bufestimator.py` to generate
5252
the buffer sizes needed by the C++ `ExtendedZoneProcessor` class. The
53-
`AceTimeTools/bufestimator.py` module needs `AceTimePython/zone_processor.py`
53+
`AceTimeTools/bufestimator.py` module needs `acetimepy/zone_processor.py`
5454
module to calculate those buffer sizes.
5555

56-
On the other hand, AceTimePython needs AceTimeTools to generate the zoneinfo
57-
files under `AceTimePython/zonedb`, which are consumed by the `acetz.py`
58-
module. Fortunately, AceTimePython does *not* need AceTimeTools during runtime,
59-
so 3rd party consumers can incorporate AceTimePython without pulling in
60-
AceTimeTools.
56+
On the other hand, acetimepy needs AceTimeTools to generate the zoneinfo
57+
files under `acetimepy/zonedb/`, which are consumed by the `acetz` and
58+
`ZoneManager` classes. Fortunately, acetimepy does *not* need AceTimeTools
59+
during runtime, so 3rd party consumers can incorporate acetimepy without pulling
60+
in AceTimeTools.
6161

62-
Both AceTime and AceTimePython can be used as runtime libraries **without**
62+
Both AceTime and acetimepy can be used as runtime libraries **without**
6363
pulling in the dependency to AceTimeTools (which is required only to generated
6464
the zoneinfo database files).
6565

@@ -585,19 +585,19 @@ available.
585585
should be a sibling to the `AceTime` repo:
586586
* `$ cd ../date`
587587
* `$ git pull`
588-
* Update the zonedb files for AceTimePython (needed by BasicAcetzTest and
589-
ExtendedAcetzTest):
590-
* `$ cd AceTimePython/src/acetime/zonedb`
588+
* Update the zonedb files for acetimepy (needed by AcetzBasicTest and
589+
AcetzExtendedTest):
590+
* `$ cd acetimepy/src/acetime/zonedb`
591591
* Update the `TZ_VERSION` variable in `Makefile`.
592592
* `$ make`
593593
* Verify that `AceTimeValidation` passes (which compares AceTime with
594-
AceTimePython and the Hinnant `date` library):
594+
acetimepy and the Hinnant `date` library):
595595
* `$ cd ../AceTimeValidation`
596596
* Update the `TZ_VERSION` variable in the following files:
597-
* `BasicAcetzTest/Makefile`
598-
* `ExtendedAcetzTest/Makefile`
599-
* `BasicHinnantDateTest/Makefile`
600-
* `ExtendedHinnantDateTest/Makefile`
597+
* `tests/AcetzBasicTest/Makefile`
598+
* `tests/AcetExtendedzTest/Makefile`
599+
* `tests/HinnantBasicTest/Makefile`
600+
* `tests/HinnantExtendedTest/Makefile`
601601
* `$ make clean`
602602
* `$ make validations`
603603
* `$ make runvalidations`
@@ -607,7 +607,7 @@ available.
607607
* `$ make`
608608
* Update CHANGELOGs
609609
* AceTime/CHANGELOG.md
610-
* AceTimePython/CHANGELOG.md
610+
* acetimepy/CHANGELOG.md
611611
* AceTimeValidation/CHANGELOG.md
612612
* Commit the changes to git
613613
* `$ git add ...`
@@ -616,18 +616,18 @@ available.
616616
There are 12 other validation tests in the AceTimeValidation project that
617617
compare AceTime with various other third party libraries:
618618

619-
* `BasicDateUtilTest`
620-
* `BasicGoTest`
621-
* `BasicJavaTest`
622-
* `BasicNodaTest`
623-
* `BasicPytzTest`
624-
* `BasicZoneInfoTest`
625-
* `ExtendedDateUtilTest`
626-
* `ExtendedGoTest`
627-
* `ExtendedJavaTest`
628-
* `ExtendedNodaTest`
629-
* `ExtendedPytzTest`
630-
* `ExtendedZoneInfoTest`
619+
* `DateUtilBasicTest`
620+
* `DateUtilExtendedTest`
621+
* `GoBasicTest`
622+
* `GoExtendedTest`
623+
* `JavaBasicTest`
624+
* `JavaExtendedTest`
625+
* `NodaBasicTest`
626+
* `NodaExtendedTest`
627+
* `PytzBasicTest`
628+
* `PytzExtendedTest`
629+
* `ZoneInfoBasicTest`
630+
* `ZoneInfoExtendedTest`
631631

632632
Unfortunately, they all seem to use the underlying TZDB version provided by the
633633
Operating System, and I have not been able to figure out how to manually update
@@ -657,9 +657,9 @@ fail until the underlying timezone database of the OS is updated.
657657
* `$ git add .`
658658
* `$ git commit -m "..."`
659659
* `$ git push`
660-
* (Optional) Create a new Release of AceTimePython
660+
* (Optional) Create a new Release of acetimepy
661661
* (This should be done first, before AceTime)
662-
* Go to https://github.com/bxparks/AceTimePython
662+
* Go to https://github.com/bxparks/acetimepy
663663
* Bump version number on `develop`.
664664
* Merge `develop` into `master`.
665665
* Click on "Releases"
@@ -670,7 +670,7 @@ fail until the underlying timezone database of the OS is updated.
670670
from `CHANGELOG.md`.
671671
* Click Publish release.
672672
* (Optional) Create a new Release of AceTimeTools
673-
* (Depends on AceTimePython)
673+
* (Depends on acetimepy)
674674
* Go to https://github.com/bxparks/AceTimeTools
675675
* Click on "Releases"
676676
* Click on "Draft a new release"
@@ -680,7 +680,7 @@ fail until the underlying timezone database of the OS is updated.
680680
from `CHANGELOG.md`.
681681
* Click Publish release.
682682
* (Optional) Create a new Release of AceTimeValidation.
683-
* (Depends on AceTimePython)
683+
* (Depends on acetimepy)
684684
* Go to https://github.com/bxparks/AceTimeTools
685685
* Click on "Releases"
686686
* Click on "Draft a new release"
@@ -690,7 +690,7 @@ fail until the underlying timezone database of the OS is updated.
690690
from `CHANGELOG.md`.
691691
* Click Publish release.
692692
* Create a new Release of AceTime (third, depends on AceTimeValidation).
693-
* (Depends on AceTimePython, AceTimeValidation)
693+
* (Depends on acetimepy, AceTimeValidation)
694694
* Go to https://github.com/bxparks/AceTime
695695
* Merge the `develop` branch into `master` by creating a Pull Request.
696696
* Approve and merge the PR.
@@ -701,9 +701,9 @@ fail until the underlying timezone database of the OS is updated.
701701
* Enter the release notes. I normally just copy and paste the latest changes
702702
from `CHANGELOG.md`.
703703
* Click Publish release.
704-
* Add corresponding tags on AceTimePython, AceTimeTools and AceTimeValidation
704+
* Add corresponding tags on acetimepy, AceTimeTools and AceTimeValidation
705705
for reference.
706-
* AceTimePython
706+
* acetimepy
707707
* `$ git tag -a 'atX.Y.Z' -m 'AceTime vX.Y.Z'`
708708
* `$ git push --tags`
709709
* AceTimeTools

0 commit comments

Comments
 (0)