Skip to content

Commit

Permalink
Merge pull request #113 from bxparks/develop
Browse files Browse the repository at this point in the history
merge 2.2.3 into master
  • Loading branch information
bxparks authored Jun 1, 2023
2 parents e580545 + fc74f1f commit 403f08e
Show file tree
Hide file tree
Showing 404 changed files with 26,904 additions and 25,899 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
- name: Checkout Additional Repos
run: |
cd ..
git clone --depth 1 https://github.com/bxparks/EpoxyDuino
git clone --depth 1 https://github.com/HowardHinnant/date
git clone --depth 1 https://github.com/bxparks/AUnit
git clone --depth 1 https://github.com/bxparks/AceCommon
git clone --depth 1 https://github.com/bxparks/AceSorting
git clone --depth 1 https://github.com/bxparks/AceTimeTools
git clone --depth 1 https://github.com/bxparks/AceTimePython
git clone --depth 1 https://github.com/bxparks/AceTimeValidation
git clone --depth 1 https://github.com/HowardHinnant/date
git clone --depth 1 https://github.com/bxparks/EpoxyDuino
git clone --depth 1 https://github.com/bxparks/acetimec
git clone --depth 1 https://github.com/bxparks/acetimepy
git clone https://github.com/eggert/tz
- name: Set up Python 3.7
Expand All @@ -49,23 +50,30 @@ jobs:
python -m pip install --upgrade pip
pip install -r ../AceTimeTools/requirements.txt
pip install -e ../AceTimeTools
pip install -r ../AceTimePython/requirements.txt
pip install -e ../AceTimePython
pip install -r ../acetimepy/requirements.txt
pip install -e ../acetimepy
- name: Install libcurl4-openssl-dev
run: |
sudo apt update
sudo apt install -y libcurl4-openssl-dev
# Run the validations from AceTimeValidations (BasicHinnantDateTest,
# ExtendedHinnantDateTest, BasicAcetzTest, ExtendedAcetzTest). We don't run
# the others because when a new TZDB version comes out, the Python
# zoneinfo, Python pytz, Python dateutil, and Java validation tests will
# fail because they depend on the obsolete TZ database on the host
# Operating System. The 'make validations' will also compile the binary in
- name: Build Compare tools
run: |
make -C ../acetimec/src
make -C ../AceTimeValidation/tools/compare_acetimec
make -C ../AceTimeValidation/tools/compare_libc
make -C ../AceTimeValidation/tools/compare_hinnant
# Run the tests in AceTimeValidations (HinnantBasicTest,
# HinnantExtendedTest, AcetzBasicTest, AcetzExtendedTest). We don't run the
# others because when a new TZDB version comes out, the Python zoneinfo,
# Python pytz, Python dateutil, and Java validation tests will fail because
# they depend on the obsolete TZ database on the host Operating System. The
# 'make validations' will also compile the binary in
# AceTimeValidation/compare_cpp/ as necessary.
- name: AceTimeValidation
run: |
cd ../AceTimeValidation
make validations
make runvalidations
make -C tests tests
make -C tests runtests
61 changes: 50 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
# Changelog

* Unreleased
* 2.2.3 (2023-05-31, TZDB version 2023c)
* Update `ace_time/testing/*` classes to support splitting the test data
into 2 separate lists: `transitions` and `samples`.
* Required to support new `validation_data.json` from AceTimeValidation.
* Update `AceTimeValidation` test names to `tests/Xxx{Basic,Extended}Test`.
* Add `ZonedExtra::kAbbrevSize` to define the `char` buffer size needed to
hold an abbreviation.
* Change `ZonedExtra::kInvalidMinutes` from public to private.
* This is an implementation detail.
* Use `ZonedExtra::isError()` instead.
* Rename AceTimePython to acetimepy.
* ZoneProcessor transition cache
* Save the epoch year, and automatically invalidate and regenerate the
cache when the `Epoch::currentEpochYear()` is modified.
* Remove cache invalidation methods which are no longer needed:
* `ZoneProcessor::resetTransitionCache()`
* `ZoneProcessorCache::resetZoneProcessors()`
* `ZoneManager::resetZoneProcessors()`
* Rename "Converter Epoch" to "Internal Epoch".
* Change `daysToCurrentEpochFromConverterEpoch()` to
`daysToCurrentEpochFromInternalEpoch()`.
* This is an internal implementation detail, exposed only for testing
purposes.
* Update supported boards and tiers
* Add SAMD21 and SAMD51 boards to Tier 1
* Add Adafruit ItsyBitsy M4 (SAMD51 120MHz ARM Cortex-M4)
* SAMD21 and SAMD51 boards are back in Tier 1, as long as they use
the traditional Arduino API instead of the new
[Arduino-Core](https://github.com/arduino/ArduinoCore-api).
* Fortunately most third party SAMD21 and SAMD51 boards continue to
use the traditional Arduino API.
* Move Teensy 3.2 to Tier 2
* This board is entering end-of-life.
* As well, the Teensyduino environment integrates with the Arduino
IDE and CLI in a way that's different than all other third-party
Arduino boards. Some of my automation scripts do not work with
Teensyduino, so it becomes very time consuming to test the Teensy
boards.
* All Teensy boards are now in Tier 2 ("Should work but not tested
often").
* 2.2.2 (2023-04-01, TZDB version 2023c)
* Upgrade TZDB from 2023b to 2023c.
* https://mm.icann.org/pipermail/tz-announce/2023-March/000079.html
Expand Down Expand Up @@ -387,7 +427,7 @@
* All of these methods were intended for internal debugging so these
changes are not considered to be an API change.
* The semantics of these methods are now closer to the algorithm in
`AceTimePython/zone_processor.ZoneProcessor`.
`acetimepy/zone_processor.py`.
* **Breaking Change**: Extract `BasicZoneProcessorCache` and
`ExtendedZoneProcessorCache` out of `BasicZoneManager` and
`ExtendedZoneManager`. Remove all pure `virtual` methods from
Expand Down Expand Up @@ -448,19 +488,19 @@
* They are now considered to happen at the same time if any of the 'w'
time, 's' time, or 'u' time are equal.
* The behavior of `ExtendedZoneProcessor.h` should now be identical
to `zone_processor.py` in the `AceTimePython` library.
to `zone_processor.py` in the `acetimepy` library.
* Seems to affect only `Europe/Lisbon` in 1992, which is not a part of
the predefined `zonedb` or `zonedbx` database, which normally include
only 2000 until 2050.
* Testing
* Create [AceTimePython](https://github.com/bxparks/AceTimePython)
* Create [acetimepy](https://github.com/bxparks/acetimepy)
library extracted from the previously split
[AceTimeTools](https://github.com/bxparks/AceTimeTools) project.
* Update `ace_time/testing/ExtendedTransitionTest.h` to validate
the exact equality between the observed maximum buffer size of
TransitionStorage as observed by `ExtendedZoneProcessor` and the
buffer size calculated by AceTimeTools using `zone_processor.py` of
`AceTimePython` library.
`acetimepy` library.
* Create `examples/DebugZoneProcessor` for debugging the internal logic
of `ExtendedZoneProcessor`.
* Tool Chain
Expand Down Expand Up @@ -543,12 +583,11 @@
* Run the Noda Time `TzdbCompiler` manually to generate custom
`tzdata$(TZ_VERSION).nzd` for the specific TZDB version specified in
the Makefile.
* Add `tests/validation/BasicNodaTest` which matches AceTime completely
from year 2000 until 2050.
* Add `tests/validation/tests/NodaBasicTest` which matches AceTime
completely from year 2000 until 2050.
* Add `tests/validation/ExtendedNodaTest` which maches AceTime
completely from year 1974 until 2050.
* Identical results to `BasicHinnantDateTest` and
`ExtendedHinnantDateTest`.
* Identical results to `HinnantBasicTest` and `HinnantExtendedTest`.
* Add `ace_time::clock::Stm32F1Clock` and `ace_time::hw::Stm32F1Rtc`
* Specialized classes for the STM32F1 chip, particularly the Blue Pill
board, using the `LSE_CLOCK` (low speed external clock).
Expand All @@ -575,7 +614,7 @@
but only 50-60 bytes on other 32-bit processors.
* Finish a working implementation of `acetz.py`.
* Includes support for `fold`.
* Create `BasicAcetzTest` and `ExtendedAcetzTest` and verify all zones
* Create `AcetzBasicTest` and `AcetzExtendedTest` and verify all zones
validate.
* Time zone short names are printed with spaces instead of underscore.
* Various `printShortNameTo()` and `printShortTo()` methods now print
Expand Down Expand Up @@ -912,8 +951,8 @@
* Upgrade to TZDB 2020c
(https://mm.icann.org/pipermail/tz-announce/2020-October/000060.html)
* "Fiji starts DST later than usual, on 2020-12-20."
* Restrict GitHub Actions workflow to run just BasicHinnantDateTest and
ExtendedHinnantDateTest, because the other Python and Java tests break
* Restrict GitHub Actions workflow to run just HinnantBasicTest and
HinnantExtendedTest, because the other Python and Java tests break
every time a new TZDB version comes out.
* Add `DEVELOPER.md` file containing notes mostly for myself.
* 1.1 (2020-04-25, TZ DB version 2020a)
Expand Down
82 changes: 41 additions & 41 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,38 @@ integration tests under `./tests/validation` were moved into the
[AceTimeValidations](https://github.com/bxparks/AceTimeValidation) project. Then
on 2021-09-08, the Python timezone classes (`zone_processor.py`, `acetz.py`,
etc) were moved into the
[AceTimePython](https://github.com/bxparks/AceTimePython) project.
[acetimepy](https://github.com/bxparks/acetimepy) project.

Here is the dependency diagram among these projects.

```
AceTimeTools --------
^ ^ ^ \ artransformer.py
creating / | \ creating \ -> bufestimator.py
zonedb[x] / | \ zonedb \ -> zone_processor.py
/ | \ v
AceTime | AceTimePython
zonedb[x] / | \ zonedb / -> zone_processor.py
/ | \ v
AceTime | acetimepy
^ ^ | ^
/ \ | /
/ \ | /
AceTimeClock AceTimeValidation
```

There is slight circular dependency between `AceTimeTools` and `AceTimePython`.
There is slight circular dependency between `AceTimeTools` and `acetimepy`.

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

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

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

Expand Down Expand Up @@ -585,19 +585,19 @@ available.
should be a sibling to the `AceTime` repo:
* `$ cd ../date`
* `$ git pull`
* Update the zonedb files for AceTimePython (needed by BasicAcetzTest and
ExtendedAcetzTest):
* `$ cd AceTimePython/src/acetime/zonedb`
* Update the zonedb files for acetimepy (needed by AcetzBasicTest and
AcetzExtendedTest):
* `$ cd acetimepy/src/acetime/zonedb`
* Update the `TZ_VERSION` variable in `Makefile`.
* `$ make`
* Verify that `AceTimeValidation` passes (which compares AceTime with
AceTimePython and the Hinnant `date` library):
acetimepy and the Hinnant `date` library):
* `$ cd ../AceTimeValidation`
* Update the `TZ_VERSION` variable in the following files:
* `BasicAcetzTest/Makefile`
* `ExtendedAcetzTest/Makefile`
* `BasicHinnantDateTest/Makefile`
* `ExtendedHinnantDateTest/Makefile`
* `tests/AcetzBasicTest/Makefile`
* `tests/AcetExtendedzTest/Makefile`
* `tests/HinnantBasicTest/Makefile`
* `tests/HinnantExtendedTest/Makefile`
* `$ make clean`
* `$ make validations`
* `$ make runvalidations`
Expand All @@ -607,7 +607,7 @@ available.
* `$ make`
* Update CHANGELOGs
* AceTime/CHANGELOG.md
* AceTimePython/CHANGELOG.md
* acetimepy/CHANGELOG.md
* AceTimeValidation/CHANGELOG.md
* Commit the changes to git
* `$ git add ...`
Expand All @@ -616,18 +616,18 @@ available.
There are 12 other validation tests in the AceTimeValidation project that
compare AceTime with various other third party libraries:

* `BasicDateUtilTest`
* `BasicGoTest`
* `BasicJavaTest`
* `BasicNodaTest`
* `BasicPytzTest`
* `BasicZoneInfoTest`
* `ExtendedDateUtilTest`
* `ExtendedGoTest`
* `ExtendedJavaTest`
* `ExtendedNodaTest`
* `ExtendedPytzTest`
* `ExtendedZoneInfoTest`
* `DateUtilBasicTest`
* `DateUtilExtendedTest`
* `GoBasicTest`
* `GoExtendedTest`
* `JavaBasicTest`
* `JavaExtendedTest`
* `NodaBasicTest`
* `NodaExtendedTest`
* `PytzBasicTest`
* `PytzExtendedTest`
* `ZoneInfoBasicTest`
* `ZoneInfoExtendedTest`

Unfortunately, they all seem to use the underlying TZDB version provided by the
Operating System, and I have not been able to figure out how to manually update
Expand Down Expand Up @@ -657,9 +657,9 @@ fail until the underlying timezone database of the OS is updated.
* `$ git add .`
* `$ git commit -m "..."`
* `$ git push`
* (Optional) Create a new Release of AceTimePython
* (Optional) Create a new Release of acetimepy
* (This should be done first, before AceTime)
* Go to https://github.com/bxparks/AceTimePython
* Go to https://github.com/bxparks/acetimepy
* Bump version number on `develop`.
* Merge `develop` into `master`.
* Click on "Releases"
Expand All @@ -670,7 +670,7 @@ fail until the underlying timezone database of the OS is updated.
from `CHANGELOG.md`.
* Click Publish release.
* (Optional) Create a new Release of AceTimeTools
* (Depends on AceTimePython)
* (Depends on acetimepy)
* Go to https://github.com/bxparks/AceTimeTools
* Click on "Releases"
* Click on "Draft a new release"
Expand All @@ -680,7 +680,7 @@ fail until the underlying timezone database of the OS is updated.
from `CHANGELOG.md`.
* Click Publish release.
* (Optional) Create a new Release of AceTimeValidation.
* (Depends on AceTimePython)
* (Depends on acetimepy)
* Go to https://github.com/bxparks/AceTimeTools
* Click on "Releases"
* Click on "Draft a new release"
Expand All @@ -690,7 +690,7 @@ fail until the underlying timezone database of the OS is updated.
from `CHANGELOG.md`.
* Click Publish release.
* Create a new Release of AceTime (third, depends on AceTimeValidation).
* (Depends on AceTimePython, AceTimeValidation)
* (Depends on acetimepy, AceTimeValidation)
* Go to https://github.com/bxparks/AceTime
* Merge the `develop` branch into `master` by creating a Pull Request.
* Approve and merge the PR.
Expand All @@ -701,9 +701,9 @@ fail until the underlying timezone database of the OS is updated.
* Enter the release notes. I normally just copy and paste the latest changes
from `CHANGELOG.md`.
* Click Publish release.
* Add corresponding tags on AceTimePython, AceTimeTools and AceTimeValidation
* Add corresponding tags on acetimepy, AceTimeTools and AceTimeValidation
for reference.
* AceTimePython
* acetimepy
* `$ git tag -a 'atX.Y.Z' -m 'AceTime vX.Y.Z'`
* `$ git push --tags`
* AceTimeTools
Expand Down
Loading

0 comments on commit 403f08e

Please sign in to comment.