Skip to content

Commit

Permalink
v6.0.2: Bump numpy dependency 1.22 (#145)
Browse files Browse the repository at this point in the history
* Update .pre-commit-config.yaml

* bump numpy dependency

* Create test_cli.py

* Delete setup.py

* Update tox.ini

* Update requirements_docs.txt

* Update pyproject.toml

* Update .pre-commit-config.yaml

* Delete VERSION

* Delete MANIFEST.in

* Delete setup.cfg

* Update build.yml

* Update CHANGELOG.rst

* Update conf.py

* linting changes

* Update build.yml

* Update build.yml

* Update build.yml

* zip_safe = False in setup.cfg

* Update build.yml

* Delete read_package_version.py

* rename tests folder

* remove runtests script

* Update build.yml

* remove toml dependency from docs build

* Update CHANGELOG.rst

* Update Makefile
  • Loading branch information
jannikmi authored Jul 9, 2022
1 parent 989c261 commit c0b92d4
Show file tree
Hide file tree
Showing 28 changed files with 499 additions and 876 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down Expand Up @@ -56,16 +55,20 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.8

- name: Install build dependencies
run: |
pip install poetry
- name: Fetch version
id: fetch_version
run: echo "::set-output name=version_nr::$(cat VERSION)"
run: echo "::set-output name=version_nr::$(poetry version -s)"

- name: Build a binary wheel and a source tarball
# Note: poetry build required to support CLI script entrypoint in pyproject.toml?!
run: |
pip install setuptools wheel
python setup.py sdist bdist_wheel --python-tag py37.py38.py39.py310
poetry build
- name: Test PyPI Publishing
uses: pypa/gh-action-pypi-publish@master
Expand Down
39 changes: 20 additions & 19 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.2.0
rev: v4.3.0
hooks:
- id: check-ast # Is it valid Python?
- id: debug-statements # no debbuging statements used
Expand All @@ -13,7 +13,6 @@ repos:
- id: pretty-format-json
args: [ "--autofix" ]
- id: check-merge-conflict
- id: name-tests-test
- id: check-docstring-first
- id: requirements-txt-fixer
- id: detect-private-key
Expand All @@ -25,10 +24,12 @@ repos:
args: [ "--profile", "black", "--filter-files" ]

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

- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
Expand All @@ -40,32 +41,25 @@ repos:
rev: 3.9.2
hooks:
- id: flake8
exclude: ^(docs|scripts|test)/
args: [ '--ignore',
'E402', # E402 module level import not at top of file
]
exclude: ^(docs|scripts|tests)/
args:
- --ignore=E402 # E402 module level import not at top of file
- --max-line-length=120

additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-tidy-imports

# TODO make compatible with poetry
# - repo: https://github.com/mgedmin/check-manifest
# rev: "0.48"
# hooks:
# - id: check-manifest
# args: [ "--no-build-isolation", "--ignore", "*.png,docs/*,build_n_install.py,publish.py,readthedocs.yml" ]
# additional_dependencies: [ numpy ]

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

- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
rev: v2.34.0
hooks:
- id: pyupgrade

Expand All @@ -76,7 +70,14 @@ repos:
# - id: pylint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.950
rev: v0.961
hooks:
- id: mypy
exclude: ^((test|scripts)/)
exclude: ^((tests|scripts)/)
#
# - repo: https://github.com/mgedmin/check-manifest
# rev: "0.48"
# hooks:
# - id: check-manifest
# args: [ "--no-build-isolation", "--ignore", "*.png,docs/*,publish.py,readthedocs.yml,poetry.lock" ]
# additional_dependencies: [ numpy, poetry==1.1.11 ]
11 changes: 8 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ Future TODOs:

* improve test locations, expected results for all different methods,
* parameterised tests
* write test cases for command line functionality
* document class attributes
* create variables for used dtype for each type of data (polygon address, coordinate...), write generic functions for reading binary files using the right data type, performance? many fct calls
* enable Numba ahead of time compilation
* convert all these todos into tickets in GitHub
* enable strict typing
* poetry only build process. use only pyproject.toml (includes single sourcing version number)


6.0.2 (2022-07-08)
------------------

* bump numpy dependency version to 1.22 (vulnerability fix)
* officially supported python versions `>=3.8,<3.11` (due to numpy and numba constraints)
* packaging now completely based on pyproject.toml (poetry)


6.0.1 (2022-05-20)
Expand Down
26 changes: 0 additions & 26 deletions MANIFEST.in

This file was deleted.

7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,10 @@ build:
#python -m build --sdist --wheel --outdir dist/ .
#poetry build

# documentation generation:
# https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html
docs:
(cd docs && make html)

.PHONY: clean test build

.PHONY: clean test build docs
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

13 changes: 5 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@


# ATTENTION: all required packages must be configured to be installed during the online build!
# import timezonefinder # needed for auto document


# -- Path setup --------------------------------------------------------------

Expand All @@ -16,6 +14,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.

import os
import subprocess
import sys

# Get the project root dir, which is the parent dir of this
Expand All @@ -29,19 +28,17 @@

import timezonefinder # needed for auto document, ATTENTION: must then be installed during online build!

print(timezonefinder)

# -- Project information -----------------------------------------------------

project = "timezonefinder"
copyright = "2016, Jannik Michelfeit"
author = "Jannik Michelfeit"


def get_version():
return open(os.path.join(project_root, "VERSION")).read()


# The full version, including alpha/beta/rc tags.
release = get_version()
release = subprocess.getoutput("poetry version -s")
print("release version:", release)

# -- General configuration ---------------------------------------------------

Expand Down
5 changes: 3 additions & 2 deletions docs/requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
h3>=3.7.3
# the minimal dependencies required to build the documentation
# python3.6+
numpy>=1.20.3
h3
numpy
Sphinx
sphinx_rtd_theme
Loading

0 comments on commit c0b92d4

Please sign in to comment.