[Git][debian-gis-team/cftime][master] 6 commits: New upstream version 1.6.1
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Thu Jun 30 16:31:00 BST 2022
Bas Couwenberg pushed to branch master at Debian GIS Project / cftime
Commits:
f0fc1320 by Bas Couwenberg at 2022-06-30T16:49:17+02:00
New upstream version 1.6.1
- - - - -
054a037f by Bas Couwenberg at 2022-06-30T16:49:19+02:00
Update upstream source from tag 'upstream/1.6.1'
Update to upstream version '1.6.1'
with Debian dir 8cf09e45d7a3faf5606693eca93d9f89a5aab01b
- - - - -
2e255ae3 by Bas Couwenberg at 2022-06-30T16:49:29+02:00
New upstream release.
- - - - -
ac59ad00 by Bas Couwenberg at 2022-06-30T16:59:03+02:00
Drop repacking, fixed upstream.
- - - - -
9a5eef35 by Bas Couwenberg at 2022-06-30T16:59:03+02:00
Update lintian overrides.
- - - - -
ec1e403d by Bas Couwenberg at 2022-06-30T16:59:03+02:00
Set distribution to unstable.
- - - - -
22 changed files:
- − .appveyor.yml.legacy
- + .github/workflows/deploy-docs.yml
- − .github/workflows/miniconda.yml
- + .github/workflows/publish.yml
- + .github/workflows/tests_conda.yml
- .github/workflows/build.yml → .github/workflows/tests_latest.yml
- .gitignore
- − .travis.yml.legacy
- Changelog
- README.md
- debian/changelog
- debian/copyright
- + debian/source/lintian-overrides
- debian/watch
- − docs/_static/.gitkeep
- docs/api.rst
- docs/conf.py
- docs/installing.rst
- setup.cfg
- setup.py
- src/cftime/__init__.py
- src/cftime/_cftime.pyx
Changes:
=====================================
.appveyor.yml.legacy deleted
=====================================
@@ -1,47 +0,0 @@
-environment:
- PYTHON: "C:\\myminiconda3"
- matrix:
-
- - TARGET_ARCH: x64
- NPY: 1.17
- PY: 3.7
-
- - TARGET_ARCH: x64
- NPY: 1.17
- PY: 3.8
-
-init:
- - "ECHO %PYTHON_VERSION% %MINICONDA%"
-
-install:
- # If there is a newer build queued for the same PR, cancel this one.
- # The AppVeyor 'rollout builds' option is supposed to serve the same
- # purpose but it is problematic because it tends to cancel builds pushed
- # directly to master instead of just PR builds (or the converse).
- # credits: JuliaLang developers.
- - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
- https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
- Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
- throw "There are newer queued builds for this pull request, failing early." }
-
- # Add path, activate `conda` and update conda.
-
- - set URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe"
- - curl -fsS -o miniconda3.exe %URL%
- - start /wait "" miniconda3.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%PYTHON%
- - "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- - call %PYTHON%\Scripts\activate
- - conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- - conda config --add channels conda-forge --force
- - set PYTHONUNBUFFERED=1
- - conda install conda-build vs2008_express_vc_python_patch
- - call setup_x64
- - conda create --name TEST python=%PY% numpy=%NPY% cython pip pytest pytest-cov
- - conda activate TEST
-
-# Skip .NET project specific build phase.
-build: off
-
-test_script:
- - python -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
- - py.test -vv test
=====================================
.github/workflows/deploy-docs.yml
=====================================
@@ -0,0 +1,47 @@
+name: Build and Deploy docs
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build-docs:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: checkout
+ uses: actions/checkout at v3
+ with:
+ fetch-depth: 0
+
+ - name: Setup Mamba
+ uses: mamba-org/provision-with-micromamba at main
+ with:
+ environment-file: false
+
+ - name: Build environment
+ shell: bash -l {0}
+ run: |
+ micromamba create --name TEST python=3 --file requirements.txt --file requirements-dev.txt --channel conda-forge
+ micromamba activate TEST
+ python -m pip install -e . --no-deps --force-reinstall
+
+ - name: Get the version
+ id: get_version
+ run: echo ::set-output name=VERSION::$(python setup.py --version)
+
+ - name: Build documentation
+ shell: bash -l {0}
+ run: |
+ set -e
+ micromamba activate TEST
+ pushd docs
+ make html linkcheck O=-W
+ popd
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages at v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: docs/_build/html
=====================================
.github/workflows/miniconda.yml deleted
=====================================
@@ -1,85 +0,0 @@
-name: cftime test
-
-on:
- pull_request:
- push:
- branches: [master]
-
-jobs:
- run:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- python-version: [ "3.7", "3.8", "3.9", "3.10" ]
- os: [windows-latest, ubuntu-latest, macos-latest]
- platform: [x64, x32]
-# debug on a single os/platform/python version
-# python-version: [ "3.9"]
-# os: [ubuntu-latest]
-# platform: [x64]
- exclude:
- - os: macos-latest
- platform: x32
-
- env:
- TRAVIS_BUILD_DIR: ${{ github.workspace }}
- TRAVIS_REPO_SLUG: ${{ github.repository }}
-
- steps:
-
- - uses: actions/checkout at v2
-
- - name: Setup Conda
- uses: s-weigand/setup-conda at v1
- with:
- activate-conda: false
- conda-channels: conda-forge
-
- - name: Setup Conda Env
- shell: bash -l {0}
- run: |
- conda create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt
- source activate TEST
- # enabling coverage slows down the tests dramaticaly
- #CYTHON_COVERAGE=1 pip install -v -e . --no-deps --force-reinstall
- pip install -v -e . --no-deps --force-reinstall
- conda info --all
- conda list
-
- - name: Run Tests
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- shell: bash -l {0}
- run: |
- source activate TEST
- py.test -vv test
-
-# - name: Coveralls
-# env:
-# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-# if: ${{ matrix.os =='ubuntu-latest' && matrix.python-version == '3.9' && matrix.platform == 'x64' }}
-# run: |
-# source activate TEST
-# coveralls --service=github-actions
-
- - name: Tarball
- if: startsWith(matrix.os,'ubuntu') && matrix.python-version == '3.9'
- shell: bash -l {0}
- run: |
- source activate TEST
- python setup.py --version ;
- pip wheel . -w dist --no-deps ;
- check-manifest --verbose ;
- twine check dist/* ;
-
- - name: Docs
- if: startsWith(matrix.os,'ubuntu') && matrix.python-version == '3.9'
- shell: bash -l {0}
- run: |
- source activate TEST
- pushd docs && make html linkcheck O=-W && popd;
- #rm -f docs/build/html/_static/jquery-*.js
- #rm -f docs/build/html/_static/underscore-*.js
- #rm -f docs/build/html/.buildinfo
- #sh ./ci/deploy_docs.sh
=====================================
.github/workflows/publish.yml
=====================================
@@ -0,0 +1,48 @@
+name: Publish to PyPI
+
+on: ["push", "pull_request"]
+
+jobs:
+ packages:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout at v3
+
+ - name: Set up Python
+ uses: actions/setup-python at v4
+ with:
+ python-version: 3.x
+
+ - name: Get tags
+ run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
+ shell: bash
+
+ - name: Install build tools
+ run: |
+ python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine check-manifest numpy
+
+ shell: bash
+
+ - name: Build binary wheel
+ run: python -m build --sdist --wheel . --outdir dist
+
+ - name: CheckFiles
+ run: |
+ ls dist
+ shell: bash
+
+ - name: Test wheels and sdist
+ run: |
+ python setup.py --version
+ check-manifest --verbose
+ cd dist && python -m pip install cftime*.whl
+ python -m twine check *
+
+ shell: bash
+
+ - name: Publish a Python distribution to PyPI
+ if: ${{ github.event_name == 'release' }}
+ uses: pypa/gh-action-pypi-publish at master
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_PASSWORD }}
=====================================
.github/workflows/tests_conda.yml
=====================================
@@ -0,0 +1,40 @@
+name: TESTS-CONDA-ENV
+
+on:
+ pull_request:
+ push:
+ branches: [master]
+
+jobs:
+ run:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: [ "3.7", "3.8", "3.9", "3.10" ]
+ os: [windows-latest, ubuntu-latest, macos-latest]
+ platform: [x64, x32]
+ exclude:
+ - os: macos-latest
+ platform: x32
+
+ steps:
+ - uses: actions/checkout at v3
+
+ - name: Setup Mamba
+ uses: mamba-org/provision-with-micromamba at main
+ with:
+ environment-file: false
+
+ - name: Setup micromamba Env
+ shell: bash -l {0}
+ run: |
+ micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
+ micromamba activate TEST
+ pip install -v -e . --no-deps --force-reinstall
+
+ - name: Run Tests
+ shell: bash -l {0}
+ run: |
+ micromamba activate TEST
+ pytest -vv test
=====================================
.github/workflows/build.yml → .github/workflows/tests_latest.yml
=====================================
@@ -9,10 +9,10 @@ jobs:
python-version: ["3.11-dev"]
steps:
- - uses: actions/checkout at v2
+ - uses: actions/checkout at v3
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python at v2
+ uses: actions/setup-python at v4
with:
python-version: ${{ matrix.python-version }}
@@ -22,13 +22,12 @@ jobs:
- name: Install cftime dependencies via pip
run: |
- python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
- name: Install cftime
run: |
- python setup.py install
+ python -m pip install .
- name: Test cftime
run: |
- py.test -vv test
+ pytest -vv test
=====================================
.gitignore
=====================================
@@ -7,3 +7,4 @@ build/
__pycache__
.pytest_cache/
dist/
+docs/_build/*
=====================================
.travis.yml.legacy deleted
=====================================
@@ -1,85 +0,0 @@
-# Based on http://conda.pydata.org/docs/travis.html
-language: minimal
-
-sudo: false # use container based build
-
-notifications:
- email: false
-
-matrix:
- fast_finish: true
- include:
-# - name: "python-2.7"
-# env: PY=2.7
- - name: "python-3.7"
- env: PY=3.7
- - name: "python-3.8"
- env: PY=3.8
- - name: "tarball"
- env: PY=3
- - name: "docs"
- env: PY=3
-
-#jobs:
-# allow_failures:
-# - env: PY=2.7
-
-before_install:
- # Build the conda testing environment.
- - >
- echo "Installing miniconda and cftime dependencies...";
- wget http://bit.ly/miniconda -O miniconda.sh;
- bash miniconda.sh -b -p ${HOME}/miniconda;
- export PATH="${HOME}/miniconda/bin:${PATH}";
- conda update conda --yes --all;
- conda config --add channels conda-forge --force;
- export ENV_NAME="test-environment";
- conda create --yes -n ${ENV_NAME} python=${PY} --file requirements.txt --file requirements-dev.txt;
- source activate ${ENV_NAME};
-
- # Log the conda environment and package details.
- - conda list -n ${ENV_NAME}
- - conda list -n ${ENV_NAME} --explicit
- - conda info -a
-
-install:
- # Install cftime.
- - echo "Installing cftime..."
- - CYTHON_COVERAGE=1 pip install -e . --no-deps --force-reinstall
-
-script:
- - if [[ $TRAVIS_JOB_NAME == python-* ]]; then
- cp -r test/ /tmp ;
- pushd /tmp && pytest && popd ;
- fi
-
- - if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
- pushd docs && make html linkcheck O=-W && popd;
- fi
-
- - if [[ $TRAVIS_JOB_NAME == 'tarball' ]]; then
- python setup.py --version ;
- pip wheel . -w dist --no-deps ;
- check-manifest --verbose ;
- twine check dist/* ;
- fi
-
-after_success:
- - coveralls
-
-before_deploy:
- # Remove unused, unminified javascript from sphinx
- - |
- if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
- rm -f docs/build/html/_static/jquery-*.js
- rm -f docs/build/html/_static/underscore-*.js
- rm -f docs/build/html/.buildinfo
- fi
-
-deploy:
- - provider: script
- script: ci/deploy_docs.sh
- skip_cleanup: true
- on:
- branch: master
- condition: '$TRAVIS_JOB_NAME == "tarball"'
=====================================
Changelog
=====================================
@@ -1,3 +1,8 @@
+version 1.6.1 (release tag v1.6.1rel)
+=====================================
+ * fix failing tests on windows with numpy 1.23.0 (issue #278)
+ * expose to_tuple module function in public API.
+
version 1.6.0 (release tag v1.6.0rel)
=====================================
* fix for masked array inputs (issue #267).
=====================================
README.md
=====================================
@@ -12,6 +12,8 @@ Time-handling functionality from netcdf4-python
## News
For details on the latest updates, see the [Changelog](https://github.com/Unidata/cftime/blob/master/Changelog).
+6/30/2022: Version 1.6.1 released. Fixes for numpy 1.23.0, updated CI/CD.
+
3/4/2022: Version 1.6.0 released. Big speed-ups for num2date, date2index bugfix for select != 'exact' when select='exact' works, fix for date2num with masked array inputs.
1/22/2022: Version 1.5.2 released (wheels for Apple M1 available on pypi for python 3.8,3.9 and 3.10). is_leap_year
=====================================
debian/changelog
=====================================
@@ -1,8 +1,11 @@
-cftime (1.6.0+ds-2) UNRELEASED; urgency=medium
+cftime (1.6.1-1) unstable; urgency=medium
+ * New upstream release.
* Bump Standards-Version to 4.6.1, no changes.
+ * Drop repacking, fixed upstream.
+ * Update lintian overrides.
- -- Bas Couwenberg <sebastic at debian.org> Tue, 21 Jun 2022 07:06:03 +0200
+ -- Bas Couwenberg <sebastic at debian.org> Thu, 30 Jun 2022 16:50:23 +0200
cftime (1.6.0+ds-1) unstable; urgency=medium
=====================================
debian/copyright
=====================================
@@ -2,9 +2,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: cftime
Upstream-Contact: Jeff Whitaker <jeffrey.s.whitaker at noaa.gov>
Source: https://github.com/Unidata/cftime
-Comment: Pre-built documentation is excluded from the upstream tarball.
-Files-Excluded:
- docs/_build/*
Files: *
Copyright: 2008, Jeffrey Whitaker
=====================================
debian/source/lintian-overrides
=====================================
@@ -0,0 +1,3 @@
+# Build uses setuptools.
+missing-prerequisite-for-pyproject-backend setuptools.build_meta *
+
=====================================
debian/watch
=====================================
@@ -2,7 +2,6 @@ version=4
opts=\
dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$//,\
uversionmangle=s/(\d)rel$/$1/g;s/_/./g;s/(\d)[_\.\-\+]?((RC|rc|pre|dev|gamma|beta|alpha|b|a)[\-\.]?(\d*))$/$1~$3$4/;s/RC/rc/;s/\.cd$//,\
-filenamemangle=s/(?:.*?)?[vr]?(\d[\d\.\-\w]*)\.(tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))/cftime-$1.$2/,\
-repacksuffix=+ds \
+filenamemangle=s/(?:.*?)?[vr]?(\d[\d\.\-\w]*)\.(tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))/cftime-$1.$2/ \
https://github.com/Unidata/cftime/tags \
(?:.*?/archive/(?:.*?/)?)?(?:rel|v|r|cftime|)[\-\_]?(\d[\d\-\.\w]+)\.(?:tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
=====================================
docs/_static/.gitkeep deleted
=====================================
=====================================
docs/api.rst
=====================================
@@ -2,5 +2,5 @@ API
===
.. automodule:: cftime
- :members: datetime, date2num, num2date, num2pydate, date2index, time2index, is_leap_year
+ :members: datetime, date2num, num2date, num2pydate, date2index, time2index, is_leap_year, to_tuple
:show-inheritance:
=====================================
docs/conf.py
=====================================
@@ -60,7 +60,7 @@ master_doc = 'index'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-language = None
+language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -87,7 +87,7 @@ html_theme = 'alabaster'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css"..
-html_static_path = ['_static']
+# html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
=====================================
docs/installing.rst
=====================================
@@ -4,8 +4,8 @@ Installation
Required dependencies
---------------------
-- Python: >3.2
-- `numpy <http://www.numpy.org/>`__ (1.7 or later)
+- Python: >=3.7
+- `numpy <https://numpy.org/>`__ (1.13.3 or later)
Instructions
@@ -15,9 +15,9 @@ The easiest way to get everything installed is to use conda_ command line tool::
$ conda install cftime
-.. _conda: http://conda.io/
+.. _conda: https://docs.conda.io/en/latest/
-We recommend using the community maintained `conda-forge <https://conda-forge.github.io/>`__ channel if you need difficult\-to\-build dependencies such as cartopy or pynio::
+We recommend using the community maintained `conda-forge <https://conda-forge.org/>`__ channel if you need difficult\-to\-build dependencies such as cartopy or pynio::
$ conda install -c conda-forge cftime
@@ -35,7 +35,7 @@ Developing
When developing we recommend cloning the GitHub repository,
-building the extension in-place with `cython <http://cython.org/>`__ 0.19 or later
+building the extension in-place with `cython <https://cython.org/>`__ 0.19 or later
``python setup.py build_ext --inplace``
and running the test suite to check if the changes are passing the tests
=====================================
setup.cfg
=====================================
@@ -20,4 +20,4 @@ ignore =
docs
docs/*
test
- test/*
\ No newline at end of file
+ test/*
=====================================
setup.py
=====================================
@@ -113,17 +113,18 @@ setup(
install_requires=load('requirements.txt'),
tests_require=load('requirements-dev.txt'),
license='License :: OSI Approved :: MIT License',
+ python_requires=">=3.7",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: MIT License'],
)
=====================================
src/cftime/__init__.py
=====================================
@@ -1,6 +1,6 @@
from ._cftime import (datetime, real_datetime,
_parse_date, _dateparse, _datesplit, is_leap_year)
-from ._cftime import num2date, date2num, date2index, time2index, num2pydate
+from ._cftime import num2date, date2num, date2index, time2index, num2pydate, to_tuple
from ._cftime import (microsec_units, millisec_units,
sec_units, hr_units, day_units, min_units,
UNIT_CONVERSION_FACTORS)
=====================================
src/cftime/_cftime.pyx
=====================================
@@ -38,7 +38,7 @@ cdef int[12] _dayspermonth_leap = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 3
cdef int[13] _cumdayspermonth = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]
cdef int[13] _cumdayspermonth_leap = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]
-__version__ = '1.6.0'
+__version__ = '1.6.1'
# Adapted from http://delete.me.uk/2005/03/iso8601.html
# Note: This regex ensures that all ISO8601 timezone formats are accepted - but, due to legacy support for other timestrings, not all incorrect formats can be rejected.
@@ -379,7 +379,9 @@ def cast_to_int(num, units=None):
if num.dtype.kind in "iu":
return num
else:
- if np.any(num < _MIN_INT64) or np.any(num > _MAX_INT64):
+ #if np.any(num < _MIN_INT64) or np.any(num > _MAX_INT64):
+ # use this instead to avoid test failures on windows with numpy 1.23.0 (issue #279)
+ if np.any(np.less(num,_MIN_INT64,casting='same_kind')) or np.any(np.greater(num,_MAX_INT64,casting='same_kind')):
raise OverflowError('time values outside range of 64 bit signed integers')
if isinstance(num, np.ma.core.MaskedArray):
int_num = np.ma.masked_array(np.rint(num), dtype=np.int64)
@@ -985,7 +987,7 @@ cdef _toscalar(a):
else:
return a
-cdef to_tuple(dt):
+def to_tuple(dt):
"""Turn a datetime.datetime instance into a tuple of integers. Elements go
in the order of decreasing significance, making it easy to compare
datetime instances. Parts of the state that don't affect ordering
View it on GitLab: https://salsa.debian.org/debian-gis-team/cftime/-/compare/29eee6301e852b1ec63d5cbf08db1073225b8904...ec1e403dc339e0b348e1a509c1da27eaada1f0ab
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/cftime/-/compare/29eee6301e852b1ec63d5cbf08db1073225b8904...ec1e403dc339e0b348e1a509c1da27eaada1f0ab
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220630/7d15e149/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list