From 4e21e4b7038239c99e3e9826242f9699ea6883b3 Mon Sep 17 00:00:00 2001 From: Eirik Rolland Enger Date: Thu, 5 Oct 2023 09:27:51 +0200 Subject: [PATCH] build(deps): bump superposed-pulses from 1.2 to 1.3 (#201) * build(deps): bump superposed-pulses from 1.2 to 1.3 * refactor(superposed-pulses): update module name The superposed-pulses package changed its module name from `model` to the now much more intuitive name `superposedpulses`. --- poetry.lock | 79 ++----------------- pyproject.toml | 2 +- .../modules/create/create_frc.py | 10 ++- 3 files changed, 13 insertions(+), 78 deletions(-) diff --git a/poetry.lock b/poetry.lock index a34944b..db7caa8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "attrs" version = "22.1.0" description = "Classes Without Boilerplate" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -22,7 +21,6 @@ tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy name = "black" version = "22.12.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -58,7 +56,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "cfgv" version = "3.3.1" description = "Validate configuration and produce human readable error messages." -category = "dev" optional = false python-versions = ">=3.6.1" files = [ @@ -70,7 +67,6 @@ files = [ name = "cftime" version = "1.6.2" description = "Time-handling functionality from netcdf4-python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -104,7 +100,6 @@ numpy = ">1.13.3" name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -119,7 +114,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "cloudpickle" version = "2.2.0" description = "Extended pickling support for Python objects" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -131,7 +125,6 @@ files = [ name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -143,7 +136,6 @@ files = [ name = "contourpy" version = "1.0.5" description = "Python library for calculating contours of 2D quadrilateral grids" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -232,7 +224,6 @@ test-no-codebase = ["Pillow", "matplotlib", "pytest"] name = "cosmoplots" version = "0.1.6" description = "Routines to get a sane default configuration for production quality plots." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -248,7 +239,6 @@ numpy = ">=1.15.0" name = "coverage" version = "7.0.3" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -315,7 +305,6 @@ toml = ["tomli"] name = "cycler" version = "0.11.0" description = "Composable style cycles" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -327,7 +316,6 @@ files = [ name = "darglint" version = "1.8.1" description = "A utility for ensuring Google-style docstrings stay up to date with the source code." -category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -339,7 +327,6 @@ files = [ name = "dask" version = "2023.2.0" description = "Parallel PyData with Task Scheduling" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -368,7 +355,6 @@ test = ["pandas[test]", "pre-commit", "pytest", "pytest-rerunfailures", "pytest- name = "distlib" version = "0.3.6" description = "Distribution utilities" -category = "dev" optional = false python-versions = "*" files = [ @@ -380,7 +366,6 @@ files = [ name = "exceptiongroup" version = "1.0.0" description = "Backport of PEP 654 (exception groups)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -395,7 +380,6 @@ test = ["pytest (>=6)"] name = "filelock" version = "3.8.0" description = "A platform independent file lock." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -411,7 +395,6 @@ testing = ["covdefaults (>=2.2)", "coverage (>=6.4.2)", "pytest (>=7.1.2)", "pyt name = "flake8" version = "5.0.4" description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" optional = false python-versions = ">=3.6.1" files = [ @@ -428,7 +411,6 @@ pyflakes = ">=2.5.0,<2.6.0" name = "fonttools" version = "4.38.0" description = "Tools to manipulate font files" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -454,7 +436,6 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] name = "fsspec" version = "2022.10.0" description = "File-system specification" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -489,7 +470,6 @@ tqdm = ["tqdm"] name = "identify" version = "2.5.8" description = "File identification library for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -504,7 +484,6 @@ license = ["ukkonen"] name = "importlib-metadata" version = "6.0.0" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -524,7 +503,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = "*" files = [ @@ -536,7 +514,6 @@ files = [ name = "isort" version = "5.11.4" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -554,7 +531,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "kiwisolver" version = "1.4.4" description = "A fast implementation of the Cassowary constraint solver" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -632,7 +608,6 @@ files = [ name = "locket" version = "1.0.0" description = "File-based locks for Python on Linux and Windows" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -644,7 +619,6 @@ files = [ name = "matplotlib" version = "3.6.2" description = "Python plotting package" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -706,7 +680,6 @@ python-dateutil = ">=2.7" name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -718,7 +691,6 @@ files = [ name = "mypy" version = "0.991" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -769,7 +741,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" optional = false python-versions = "*" files = [ @@ -781,7 +752,6 @@ files = [ name = "netcdf4" version = "1.6.2" description = "Provides an object-oriented python interface to the netCDF version 4 library." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -822,7 +792,6 @@ numpy = ">=1.9" name = "nodeenv" version = "1.7.0" description = "Node.js virtual environment builder" -category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -837,7 +806,6 @@ setuptools = "*" name = "numpy" version = "1.24.1" description = "Fundamental package for array computing in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -875,7 +843,6 @@ files = [ name = "packaging" version = "21.3" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -890,7 +857,6 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" name = "pandas" version = "1.5.1" description = "Powerful data structures for data analysis, time series, and statistics" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -938,7 +904,6 @@ test = ["hypothesis (>=5.5.3)", "pytest (>=6.0)", "pytest-xdist (>=1.31)"] name = "partd" version = "1.3.0" description = "Appendable key-value storage" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -957,7 +922,6 @@ complete = ["blosc", "numpy (>=1.9.0)", "pandas (>=0.19.0)", "pyzmq"] name = "pathspec" version = "0.10.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -969,7 +933,6 @@ files = [ name = "Pillow" version = "9.2.0" description = "Python Imaging Library (Fork)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1041,7 +1004,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "platformdirs" version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1057,7 +1019,6 @@ test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1073,7 +1034,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "2.21.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1092,7 +1052,6 @@ virtualenv = ">=20.10.0" name = "pre-commit-hooks" version = "4.4.0" description = "Some out-of-the-box hooks for pre-commit." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1108,7 +1067,6 @@ tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} name = "pycodestyle" version = "2.9.1" description = "Python style guide checker" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1120,7 +1078,6 @@ files = [ name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1132,7 +1089,6 @@ files = [ name = "pygments" version = "2.14.0" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1147,7 +1103,6 @@ plugins = ["importlib-metadata"] name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" optional = false python-versions = ">=3.6.8" files = [ @@ -1162,7 +1117,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pytest" version = "7.2.0" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1186,7 +1140,6 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2. name = "pytest-cov" version = "4.0.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1205,7 +1158,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1220,7 +1172,6 @@ six = ">=1.5" name = "pytz" version = "2022.5" description = "World timezone definitions, modern and historical" -category = "main" optional = false python-versions = "*" files = [ @@ -1232,7 +1183,6 @@ files = [ name = "pyupgrade" version = "3.3.1" description = "A tool to automatically upgrade syntax for newer versions." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1247,7 +1197,6 @@ tokenize-rt = ">=3.2.0" name = "PyWavelets" version = "1.4.1" description = "PyWavelets, wavelet transform module" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1285,7 +1234,6 @@ numpy = ">=1.17.3" name = "PyYAML" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1335,7 +1283,6 @@ files = [ name = "ruamel.yaml" version = "0.17.21" description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" -category = "dev" optional = false python-versions = ">=3" files = [ @@ -1354,7 +1301,6 @@ jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] name = "ruamel.yaml.clib" version = "0.2.7" description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1367,6 +1313,8 @@ files = [ {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:045e0626baf1c52e5527bd5db361bc83180faaba2ff586e763d3d5982a876a9e"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-macosx_12_6_arm64.whl", hash = "sha256:721bc4ba4525f53f6a611ec0967bdcee61b31df5a56801281027a3a6d1c2daf5"}, {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:41d0f1fa4c6830176eef5b276af04c89320ea616655d01327d5ce65e50575c94"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win32.whl", hash = "sha256:f6d3d39611ac2e4f62c3128a9eed45f19a6608670c5a2f4f07f24e8de3441d38"}, + {file = "ruamel.yaml.clib-0.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:da538167284de58a52109a9b89b8f6a53ff8437dd6dc26d33b57bf6699153122"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4b3a93bb9bc662fc1f99c5c3ea8e623d8b23ad22f861eb6fce9377ac07ad6072"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-macosx_12_0_arm64.whl", hash = "sha256:a234a20ae07e8469da311e182e70ef6b199d0fbeb6c6cc2901204dd87fb867e8"}, {file = "ruamel.yaml.clib-0.2.7-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:15910ef4f3e537eea7fe45f8a5d19997479940d9196f357152a09031c5be59f3"}, @@ -1398,7 +1346,6 @@ files = [ name = "scipy" version = "1.10.0" description = "Fundamental algorithms for scientific computing in Python" -category = "main" optional = false python-versions = "<3.12,>=3.8" files = [ @@ -1437,7 +1384,6 @@ test = ["asv", "gmpy2", "mpmath", "pooch", "pytest", "pytest-cov", "pytest-timeo name = "setuptools" version = "65.5.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1454,7 +1400,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1464,17 +1409,15 @@ files = [ [[package]] name = "superposed-pulses" -version = "1.2" +version = "1.3" description = "Python scripts used by the fusion energy group at UiT The Arctic University of Norway." -category = "main" optional = false python-versions = ">=3.0" files = [ - {file = "superposed-pulses-1.2.tar.gz", hash = "sha256:af167a2c23091f32e70d4744f56b9939d1e313aa7dcd2ce975e9c91cfe172d7a"}, + {file = "superposed-pulses-1.3.tar.gz", hash = "sha256:1b84a5c732e993c046e195c98b391d362fc420b06c60afd3c118b73949be2e10"}, ] [package.dependencies] -matplotlib = ">=3.2.0" numpy = ">=1.15.0" scipy = ">=1.4.0" tqdm = ">=4.50.2" @@ -1483,7 +1426,6 @@ tqdm = ">=4.50.2" name = "tokenize-rt" version = "5.0.0" description = "A wrapper around the stdlib `tokenize` which roundtrips." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1495,7 +1437,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1507,7 +1448,6 @@ files = [ name = "toolz" version = "0.12.0" description = "List processing tools and functional utilities" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1519,7 +1459,6 @@ files = [ name = "tqdm" version = "4.64.1" description = "Fast, Extensible Progress Meter" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" files = [ @@ -1540,7 +1479,6 @@ telegram = ["requests"] name = "typing-extensions" version = "4.4.0" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1552,7 +1490,6 @@ files = [ name = "virtualenv" version = "20.16.6" description = "Virtual Python Environment builder" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1573,7 +1510,6 @@ testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7 name = "wget" version = "3.2" description = "pure python download utility" -category = "main" optional = false python-versions = "*" files = [ @@ -1584,7 +1520,6 @@ files = [ name = "xarray" version = "2022.12.0" description = "N-D labeled arrays and datasets in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1609,7 +1544,6 @@ viz = ["matplotlib", "nc-time-axis", "seaborn"] name = "xdoctest" version = "1.1.0" description = "A rewrite of the builtin doctest module" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1635,7 +1569,6 @@ tests-strict = ["cmake (==3.21.2)", "codecov (==2.0.15)", "ninja (==1.10.2)", "p name = "zipp" version = "3.10.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1650,4 +1583,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.11" -content-hash = "510715359367790fdd54f8b1feb32ad1860996fdc88e71cf5e65933cfec80b39" +content-hash = "4f76b863069ee08beb50c25e180dd3feb7b0f60d6c97e52fc88c6619bdd4dfec" diff --git a/pyproject.toml b/pyproject.toml index b49280e..09ac729 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ PyWavelets = "^1.1.1" click = "^8.0.1" cftime = "^1.5.0" netCDF4 = "^1.5.8" -superposed-pulses = "^1.2" +superposed-pulses = "^1.3" xarray = ">=0.21.1,<2022.13.0" wget = "^3.2" dask = ">=2022.3,<2024.0" diff --git a/src/volcano_cooking/modules/create/create_frc.py b/src/volcano_cooking/modules/create/create_frc.py index 104e460..0b6c98e 100644 --- a/src/volcano_cooking/modules/create/create_frc.py +++ b/src/volcano_cooking/modules/create/create_frc.py @@ -3,9 +3,9 @@ from abc import ABC, abstractmethod from typing import Tuple -import model import numpy as np import scipy.stats as scp_stats +import superposedpulses class FrcGenerator(ABC): @@ -19,7 +19,7 @@ def __init__(self, fs: float = 12, total_pulses: int = 300) -> None: if total_pulses < 1: raise ValueError(f"Can't create empty arrays, {total_pulses} = .") self.gamma = 0.1 - self.my_frc = model.StandardForcingGenerator() + self.my_frc = superposedpulses.StandardForcingGenerator() self.my_frc.set_amplitude_distribution(lambda k: self.__lomax_amp(k, 1.8)) self.times = np.arange(0, (total_pulses + 1) / self.gamma, 1 / fs) @@ -39,8 +39,10 @@ class Frc(FrcGenerator): def __init__(self, fs: float = 1, size: int = 9999) -> None: # Lomax self.fs = fs - self.fpp = model.PointModel(gamma=0.1, total_duration=size, dt=1 / self.fs) - my_forcing_gen = model.StandardForcingGenerator() + self.fpp = superposedpulses.PointModel( + gamma=0.1, total_duration=size, dt=1 / self.fs + ) + my_forcing_gen = superposedpulses.StandardForcingGenerator() my_forcing_gen.set_amplitude_distribution(lambda k: self.__lomax_amp(k, 1.8)) self.fpp.set_custom_forcing_generator(my_forcing_gen)