Skip to content

Commit

Permalink
data version 2023d (#212)
Browse files Browse the repository at this point in the history
* oetry dependency group specification

closing issue #199

* add python 3.12 tests

* remove tox.ini

* update pre commit hooks

* move GHA build  token write permission

* add tests for docs building

* data version 2023d

* v6.3.0
  • Loading branch information
jannikmi authored Feb 1, 2024
1 parent 5f5b028 commit 2090029
Show file tree
Hide file tree
Showing 22 changed files with 1,275 additions and 2,313 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: build

permissions:
id-token: write

on:
pull_request:
push:
Expand Down Expand Up @@ -51,6 +48,9 @@ jobs:
runs-on: ubuntu-latest
needs: test
if: endsWith(github.ref, '/master')
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3

Expand Down
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast # Is it valid Python?
- id: debug-statements # no debbuging statements used
Expand All @@ -18,26 +18,26 @@ repos:
- id: detect-private-key

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: [ "--profile", "black", "--filter-files" ]

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.1.1
hooks:
- id: black
language_version: python3
args:
- --line-length=120

- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.16.0
hooks:
- id: blacken-docs

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
exclude: ^(docs|scripts|tests)/|build.py
Expand All @@ -52,18 +52,18 @@ repos:

# TODO also check docs/. make compatible with sphinx
- repo: https://github.com/myint/rstcheck
rev: 'v6.1.2'
rev: 'v6.2.0'
hooks:
- id: rstcheck
exclude: ^(docs/)

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.12.1
rev: v0.16
hooks:
- id: validate-pyproject

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.0
hooks:
- id: pyupgrade

Expand All @@ -74,7 +74,7 @@ repos:
# - id: pylint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
rev: v1.8.0
hooks:
- id: mypy
exclude: ^((tests|scripts)/)
Expand All @@ -87,6 +87,6 @@ repos:
# additional_dependencies: [ numpy, poetry==1.1.11 ]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v15.0.7
rev: v17.0.6
hooks:
- id: clang-format
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,21 @@ Changelog
TBA (TBA)
------------------

--

6.3.0 (2024-02-01)
------------------

* updated the data to `2023d <https://github.com/evansiroky/timezone-boundary-builder/releases/tag/2023d>`__.

internal:

* added docstrings. Thanks to `Tyler Huntley <https://github.com/Ty1776>`__
* automatically skip GitHub actions publishing when the version already exists. useful for minor improvements without publishing a version. build would always fail otherwise
* enable tests for python 3.11 with numba
* enable tests for python 3.12
* added tests for generating the documentation
* use poetry dependency group specification (closing #199)


6.2.0 (2023-03-26)
Expand Down
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ SHELL=/bin/bash
install:
@echo "installing the development dependencies..."
@#poetry install --no-dev
@poetry install --extras "numba" --no-root --sync
@poetry install --all-extras --no-root --sync

update:
@echo "pinning the dependencies specified in 'pyproject.toml':"
@poetry update -vv
#poetry export -f requirements.txt --output docs/requirements.txt --without-hashes
@poetry update
#poetry export -f requirements.txt --output docs/requirements_docs.txt --without-hashes


env:
Expand All @@ -27,7 +27,12 @@ data:
bash parse_data.sh

test:
@python ./runtests.py
@pytest

test1: test

test2:
@tox --parallel auto

hook:
@pre-commit install
Expand Down
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
https://stackoverflow.com/questions/60073711/how-to-build-c-extensions-via-poetry
https://github.com/libmbd/libmbd/blob/master/build.py
"""

import pathlib
import re
import warnings
Expand Down
60 changes: 26 additions & 34 deletions current_data_statistics.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
... parsing done. found:
1,276 polygons from
1,375 polygons from
444 timezones with
713 holes
155,395 maximal amount of coordinates in one polygon
21,500 maximal amount of coordinates in a hole polygon
13,787,196 floats in all the polygons (2 per point)
updating the zone names in /Users/jcm/github/timezonefinder/timezonefinder/timezone_names.json now.
writing json to /Users/jcm/github/timezonefinder/timezonefinder/timezone_names.json
...Done.
719 holes
156,382 maximal amount of coordinates in one polygon
21,551 maximal amount of coordinates in a hole polygon
14,482,734 floats in all the polygons (2 per point)

shortcut statistics:

Expand All @@ -16,15 +13,15 @@ highest amount in one shortcut is 59
0.0 % of all shortcuts are empty
frequencies of entry amounts:
0: 0
1: 30674
2: 8777
3: 1408
4: 226
5: 40
6: 15
7: 7
1: 30667
2: 8768
3: 1412
4: 228
5: 45
6: 17
7: 9
8: 5
9: 5
9: 4
10: 1
11: 0
12: 0
Expand All @@ -46,7 +43,7 @@ frequencies of entry amounts:
28: 0
29: 0
30: 0
31: 0
31: 1
32: 1
33: 0
34: 0
Expand All @@ -58,7 +55,7 @@ frequencies of entry amounts:
40: 0
41: 0
42: 0
43: 1
43: 2
44: 0
45: 0
46: 0
Expand All @@ -76,20 +73,20 @@ frequencies of entry amounts:
58: 0
59: 1
relative accumulated frequencies [%]:
[0.0, 74.52, 95.84, 99.26, 99.81, 99.91, 99.95, 99.96, 99.98, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
[0.0, 74.5, 95.8, 99.23, 99.79, 99.9, 99.94, 99.96, 99.97, 99.98, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
missing relative accumulated frequencies [%]:
[100.0, 25.48, 4.16, 0.74, 0.19, 0.09, 0.05, 0.04, 0.02, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
[100.0, 25.5, 4.2, 0.77, 0.21, 0.1, 0.06, 0.04, 0.03, 0.02, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
--------------------------------

amount of different timezones per shortcut
highest amount in one shortcut is 25
0.0 % of all shortcuts are empty
frequencies of entry amounts:
0: 0
1: 30680
2: 9017
3: 1291
4: 152
1: 30674
2: 9010
3: 1302
4: 154
5: 17
6: 3
7: 1
Expand All @@ -112,17 +109,12 @@ frequencies of entry amounts:
24: 0
25: 1
relative accumulated frequencies [%]:
[0.0, 74.53, 96.44, 99.58, 99.95, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
[0.0, 74.52, 96.41, 99.57, 99.95, 99.99, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
missing relative accumulated frequencies [%]:
[100.0, 25.47, 3.56, 0.42, 0.05, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
[100.0, 25.48, 3.59, 0.43, 0.05, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
--------------------------------

validating shortcut mapping
validating shortcut completeness...
validating polygon 1275
function validate_shortcut_mapping(...) executed in 11.3s

function compile_shortcut_mapping(...) executed in 2088.4s
the polygon data makes up 95.58% of the data
the shortcuts make up 1.02% of the data
holes make up 3.41% of the data
the polygon data makes up 95.67% of the data
the shortcuts make up 0.97% of the data
holes make up 3.37% of the data
Loading

0 comments on commit 2090029

Please sign in to comment.