spack/var/spack/repos/builtin/packages/r-dtw/package.py
Tom Scogland 18c2f1a57a
refactor: packages import spack.package explicitly (#30404)
Explicitly import package utilities in all packages, and corresponding fallout.

This includes:

* rename `spack.package` to `spack.package_base`
* rename `spack.pkgkit` to `spack.package`
* update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *`
* update spack style
  * ensure packages include the import
  * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit`
    from packages when using `--fix`
  * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES
    is set in the environment
* fix all type checking errors in packages in spack upstream
* update spack create to include the new imports
* update spack repo to inject the new import, injection persists to allow for a deprecation period

Original message below:
 
As requested @adamjstewart, update all packages to use pkgkit.  I ended up using isort to do this,
so repro is easy:

```console
$ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py
$ spack style --fix
```

There were several line spacing fixups caused either by space manipulation in isort or by packages
that haven't been touched since we added requirements, but there are no functional changes in here.

* [x] add config to isort to make sure this is maintained going forward
2022-05-28 12:55:44 -04:00

32 lines
1.6 KiB
Python

# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RDtw(RPackage):
"""Dynamic Time Warping Algorithms.
A comprehensive implementation of dynamic time warping (DTW) algorithms in
R. DTW computes the optimal (least cumulative distance) alignment between
points of two time series. Common DTW variants covered include local
(slope) and global (window) constraints, subsequence matches, arbitrary
distance definitions, normalizations, minimum variance matching, and so on.
Provides cumulative distances, alignments, specialized plot styles, etc.,
as described in Giorgino (2009) <doi:10.18637/jss.v031.i07>."""
cran = "dtw"
version('1.22-3', sha256='df7cf9adf613422ddb22a160597eb5f5475ab6c67c0d790092edb7f72ba98f00')
version('1.20-1', sha256='43ca1a47a7c81a2b5d5054da1be8b8af79a85d6f9ce7b4512e9ed91f790f60f0')
version('1.18-1', sha256='d9dab25bdf61705f9f28dc5ca1c96a7465b269233e878516c52c01b5a0da21ad')
version('1.17-1', sha256='0fc3afcebc58135c78abd7545a3549466ac051a058f913db16214c12141a6e4d')
version('1.16', sha256='7d7e34c41ff6021991bcf8a913b2b6b82680018f65fdd90af2150a07457e9cdb')
version('1.15', sha256='28ba2110d4c305f332fad93337cdae24b9de4163b8ddf33d476f9dddc63160f1')
version('1.14-3', sha256='6989358d8d97428418c2b34ae38647efcee2e0ce095800a657d5d83d7083c9e3')
depends_on('r@2.10.0:', type=('build', 'run'))
depends_on('r-proxy', type=('build', 'run'))