Commit graph

27 commits

Author SHA1 Message Date
190d66ba17
show doc badge 2022-10-09 12:34:40 -05:00
e19fe327e0
Merge pull request #5 from jepler/fold-ls
Set the 'fold' property of the leap second in tai_to_utc
2022-10-09 12:27:22 -05:00
def8d7dc41
modernize the pre-commit 2022-10-09 12:24:57 -05:00
059e715a71
must now ensure fold=True for leap seconds 2022-10-09 12:24:50 -05:00
8dc8bcb37e
Set the 'fold' property of the leap second in tai_to_utc 2022-10-09 12:24:49 -05:00
a83d6a4b86
Merge pull request #4 from jepler/py.types
Add PEP0561 py.typed, convert to package
2022-03-23 11:18:16 -05:00
15135d024b
Merge pull request #3 from jepler/issue2
Get leap seconds from network if local file doesn't exist
2022-03-23 11:16:37 -05:00
dd958418e4
Convert to package and add py.typed 2022-03-23 11:10:36 -05:00
de87dda19f
use future-annotations to simplify annotations (no need to stringify) 2022-03-23 10:58:27 -05:00
9835ebcd00
fix typing and coverage 2022-03-23 10:56:27 -05:00
15ea91682e
Skip a source if it can't be retrieved
This fixes #2, by going on to a network source if the local file
isn't present, such as on CentOS7.
2022-03-23 10:50:39 -05:00
9f6820dabf
Allow the 'from_url' method to return None, go to next source 2022-03-23 10:50:04 -05:00
e6dc7f1cc2
This file is on debian linux, but not CentOS 7 2022-03-23 10:49:39 -05:00
66185789ff doc fixes 2021-10-20 16:23:30 -05:00
47f044b3a4
Merge pull request #1 from jepler/rtd
Add sphinx / read-the-docs documentation
2021-10-20 15:07:59 -05:00
96bf05b0de 3.7ism 2021-10-20 15:00:26 -05:00
f157185120 fix workflow 2021-10-20 14:54:17 -05:00
4fb3e9ea7f Add sphinx / rtd documentation 2021-10-20 14:53:02 -05:00
8007b02dcc Add more TAI-wrangling
* leapseconddata.tai is a timezone object.  BEWARE, because of reasons,
   it compares equal to datetime.datetime.utc!

 * tai_offset can take either kind of timestamp

 * to_tai, tai_to_utc: convert to/from the TAI timescale.

 * is_leap_second: return True if the given second is a leap second.
   In the UTC timescale, the ":59" second returns True even though
   "only" the second repetition of :59 is a leap second
2021-10-20 14:44:34 -05:00
2dddcdf282
Update README.md 2021-10-18 19:48:42 -05:00
507255e040 fix workflow 2021-10-18 19:31:46 -05:00
632139c299 Add unittest and improve coverage 2021-10-18 19:29:14 -05:00
8a25adb764 improvements
* Our own error types (squee, such cute little classes)
 * check_validity of a timestamp without exceptions
 * tai_offset always returns a timedelta now
 * add from_standard_source, searches standard linux & freebsd locs, then
   goes to the network for ietf
 * reformat some test-run messages so they don't trigger my editor's
   "error on file and line" regular expression matching
 * lightly use logging
2021-10-18 14:15:57 -05:00
30d6bb889b version numbers important 2021-10-18 10:45:38 -05:00
59da27383f don't run coverage during release 2021-10-18 10:34:57 -05:00
9b2c42b376 package-ize 2021-10-18 10:22:33 -05:00
78d51b3d71 initial commit 2021-10-18 09:20:59 -05:00