dlmmc 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dlmmc-2.1.0/LICENSE +21 -0
- dlmmc-2.1.0/PKG-INFO +150 -0
- dlmmc-2.1.0/README.md +129 -0
- dlmmc-2.1.0/pyproject.toml +29 -0
- dlmmc-2.1.0/setup.cfg +4 -0
- dlmmc-2.1.0/src/dlmmc/__init__.py +6 -0
- dlmmc-2.1.0/src/dlmmc/_stan_models.py +1501 -0
- dlmmc-2.1.0/src/dlmmc/api.py +372 -0
- dlmmc-2.1.0/src/dlmmc/mpi.py +274 -0
- dlmmc-2.1.0/src/dlmmc.egg-info/PKG-INFO +150 -0
- dlmmc-2.1.0/src/dlmmc.egg-info/SOURCES.txt +13 -0
- dlmmc-2.1.0/src/dlmmc.egg-info/dependency_links.txt +1 -0
- dlmmc-2.1.0/src/dlmmc.egg-info/requires.txt +15 -0
- dlmmc-2.1.0/src/dlmmc.egg-info/top_level.txt +1 -0
- dlmmc-2.1.0/tests/test_api.py +134 -0
dlmmc-2.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Justin Alsing
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dlmmc-2.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dlmmc
|
|
3
|
+
Version: 2.1.0
|
|
4
|
+
Summary: Dynamical linear models for time-series analysis using CmdStanPy
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: cmdstanpy>=1.2
|
|
9
|
+
Requires-Dist: numpy>=1.24
|
|
10
|
+
Requires-Dist: pandas>=2.0
|
|
11
|
+
Requires-Dist: platformdirs>=4
|
|
12
|
+
Requires-Dist: xarray>=2024.1
|
|
13
|
+
Provides-Extra: diagnostics
|
|
14
|
+
Requires-Dist: arviz>=0.17; extra == "diagnostics"
|
|
15
|
+
Provides-Extra: mpi
|
|
16
|
+
Requires-Dist: mpi4py>=3.1; extra == "mpi"
|
|
17
|
+
Requires-Dist: netCDF4>=1.6; extra == "mpi"
|
|
18
|
+
Provides-Extra: test
|
|
19
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
[](https://github.com/sean-m-davis-NOAA/dlmmc/releases/latest)
|
|
23
|
+
# DLMMC
|
|
24
|
+
|
|
25
|
+
### Note: This Python 3 package uses CmdStanPy for Stan model fitting.
|
|
26
|
+
|
|
27
|
+
**Dynamical Linear Modelling** (DLM) regression code in python for analysis of time-series data. The code is targeted at atmospheric time-series analysis, with a detailed worked example (and data) included for stratospheric ozone, but is a fairly general suite of state space model that can be applied or extended to a wide range of problems.
|
|
28
|
+
|
|
29
|
+
The core of this package is a suite of DLM models implemented in [stan](https://mc-stan.org), using a combination of HMC sampling and Kalman filtering to infer the DLM model parameters (trend, seasonal cycle, auto-regressive processes etc) given some time-series data. To make the code as accessible as possible, I provide a step-by-step tutorial in python for how to read in your data, run the DLM model(s), and process the outputs to make nice plots. Once you've worked through this tutorial you should have all the tools you need to apply DLM to your own data!
|
|
30
|
+
|
|
31
|
+
Note: some basic working knowledge of python and jupyter notebooks is required to make the most of this package (but it's not too onerous).
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
Clone the repository and navigate into the directory:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/sean-m-davis-NOAA/dlmmc.git
|
|
39
|
+
cd dlmmc
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Installation with conda (recommended)
|
|
43
|
+
|
|
44
|
+
The recommended way to get started is with Conda and the CmdStanPy backend.
|
|
45
|
+
|
|
46
|
+
CmdStan produces native compiled Stan executables, and CmdStanPy provides the Python interface.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
# create and activate a modern environment
|
|
50
|
+
conda create -n dlmmc-cmdstanpy -c conda-forge python=3.10 cmdstanpy netCDF4 numpy scipy xarray arviz tqdm mpi4py openmpi matplotlib jupyter ipykernel pandas -y
|
|
51
|
+
conda activate dlmmc-cmdstanpy
|
|
52
|
+
python -m pip install -e .
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Notes:
|
|
56
|
+
- CmdStan requires a C++ toolchain to compile models. On macOS install Xcode command-line tools (`xcode-select --install`) or use a conda-provided compiler on CI.
|
|
57
|
+
- The CmdStanPy environment command includes the dependencies for the MPI example. On HPC systems, use the site-provided MPI implementation and ensure `mpi4py` is built against it instead of mixing in a separate Conda MPI implementation.
|
|
58
|
+
- To keep a macOS laptop awake while compiling/sampling use `caffeinate -i <command>` or run the job on a remote server or in a tmux session.
|
|
59
|
+
|
|
60
|
+
Finally, if you want to see what a successful installation looks like, see [INSTALL.md](INSTALL.md)
|
|
61
|
+
|
|
62
|
+
## Getting Started
|
|
63
|
+
|
|
64
|
+
The recommended path below uses the CmdStanPy environment above. Run commands from the repository root.
|
|
65
|
+
|
|
66
|
+
1. **Install CmdStan.** A C++ toolchain is required; see the installation notes above.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python -c "import cmdstanpy; cmdstanpy.install_cmdstan()"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
2. **Optionally precompile the packaged models.** Models compile lazily on the first `fit()` call; this command precompiles all models up front.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python compile_stan_models.py
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
3. **Run the benchmark.** This is the quickest end-to-end check of data loading, model compilation, and CmdStanPy sampling.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python dlm_benchmark.py
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The benchmark writes a timestamped JSON file under `results/`. Confirm it contains `compile_seconds`, `fit_seconds`, and posterior dimensions.
|
|
85
|
+
|
|
86
|
+
4. **Work through the tutorial.** Open `dlm_tutorial.ipynb` in JupyterLab or VS Code, select the CmdStanPy environment as the kernel, and run the cells in order. The tutorial uses four chains with 1,000 warmup and 2,000 sampling iterations per chain, so it takes longer than the benchmark.
|
|
87
|
+
|
|
88
|
+
5. **Run the validation suite.** Open `dlm_validation_tests.ipynb` and run the cells in order. It performs synthetic parameter-recovery tests for four model variants using short chains. Review the recovery intervals, R-hat/ESS values, and divergences; the short settings demonstrate the workflow and are not a guarantee of convergence.
|
|
89
|
+
|
|
90
|
+
6. **Optionally test the gridded MPI workflow.** This fits the example pressure/latitude grid in parallel and streams results to one NetCDF writer. It requires a working MPI implementation and `mpi4py`; on a local Open MPI setup:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
mpirun -np 4 python dlm_lat_alt_mpi_run.py
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The MPI example defaults to very short chains for a pipeline smoke test, not scientific inference. See [MPI-README.md](MPI-README.md) for output verification and HPC launch details.
|
|
97
|
+
|
|
98
|
+
### Installation with pip
|
|
99
|
+
|
|
100
|
+
In an existing Python environment with the required dependencies and CmdStan installed, install the package from the repository root with `python -m pip install .`. For editable development installs, use `python -m pip install -e .`.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
**Platforms**
|
|
104
|
+
|
|
105
|
+
CmdStan requires a supported C++ toolchain on each platform. On HPC systems, follow the site's compiler and MPI guidance in `INSTALL.md` and `MPI-README.md`.
|
|
106
|
+
|
|
107
|
+
## Usage
|
|
108
|
+
|
|
109
|
+
Follow the [Getting Started](#getting-started) sequence for setup and examples. A basic no-regressor fit from xarray data looks like this:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
import xarray as xr
|
|
113
|
+
import dlmmc
|
|
114
|
+
|
|
115
|
+
with xr.open_dataset("data/BASIC_V1_2017_lotus_seascyc_gcsw2017_fac2.nc") as ds:
|
|
116
|
+
series = ds["o3"].isel(pressure=22, latitude=8)
|
|
117
|
+
uncertainty = ds["o3_sigma"].isel(pressure=22, latitude=8)
|
|
118
|
+
posterior = dlmmc.fit(
|
|
119
|
+
series,
|
|
120
|
+
uncertainty=uncertainty,
|
|
121
|
+
model="noregs_ar1",
|
|
122
|
+
chains=4,
|
|
123
|
+
warmup=500,
|
|
124
|
+
samples=1000,
|
|
125
|
+
)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The returned posterior is an xarray Dataset with `chain`, `draw`, and `time` coordinates. For regressors and plots, see `dlm_tutorial.ipynb`. For grid workloads, see `dlm_lat_alt_mpi_run.py` and [MPI-README.md](MPI-README.md).
|
|
129
|
+
|
|
130
|
+
**Model descriptions**
|
|
131
|
+
|
|
132
|
+
Mathematical descriptions of each of the DLM models implemented in this package can be found in the file `models/model_descriptions/model_descriptions.pdf`. This file contains a concise description of the parameters of each model, their physical meanings, and how to refer to them in the code: make sure you have read and understand the model description before running a new model!
|
|
133
|
+
|
|
134
|
+
## Validation
|
|
135
|
+
|
|
136
|
+
`dlm_validation_tests.ipynb` provides synthetic parameter-recovery demonstrations for four CmdStanPy model variants. Interpret its recovery intervals and sampler diagnostics as evidence for each run, not as a guarantee that every parameter is well identified under all settings.
|
|
137
|
+
|
|
138
|
+
## Citing this code
|
|
139
|
+
|
|
140
|
+
There is a JOSS paper describing dlmmc v1, which can be found [here](http://joss.theoj.org/papers/10.21105/joss.01157). Please cite this paper if you use or refer to this code, as:
|
|
141
|
+
|
|
142
|
+
_Alsing, (2019). dlmmc: Dynamical linear model regression for atmospheric time-series analysis. Journal of Open Source Software, 4(37), 1157, https://doi.org/10.21105/joss.01157_
|
|
143
|
+
|
|
144
|
+
A close description of the vanilla DLM model implemented here can be found in [Laine et al 2014](https://www.atmos-chem-phys.net/14/9707/2014/acp-14-9707-2014.pdf), and this model/code was used for analyzing ozone data in [Ball et al 2017](https://www.research-collection.ethz.ch/handle/20.500.11850/202027) and [Ball et al 2018](https://www.atmos-chem-phys.net/18/1379/2018/acp-18-1379-2018.html). Please consider citing these papers too when you use this code.
|
|
145
|
+
|
|
146
|
+
## Contributing
|
|
147
|
+
|
|
148
|
+
Contributions, issues, and feature requests are welcome!
|
|
149
|
+
|
|
150
|
+
If you are interested in improving `dlmmc` or fixing a bug, please review our [Contributing Guide](CONTRIBUTING.md) for detailed instructions on how to get started and submit a Pull Request.
|
dlmmc-2.1.0/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
[](https://github.com/sean-m-davis-NOAA/dlmmc/releases/latest)
|
|
2
|
+
# DLMMC
|
|
3
|
+
|
|
4
|
+
### Note: This Python 3 package uses CmdStanPy for Stan model fitting.
|
|
5
|
+
|
|
6
|
+
**Dynamical Linear Modelling** (DLM) regression code in python for analysis of time-series data. The code is targeted at atmospheric time-series analysis, with a detailed worked example (and data) included for stratospheric ozone, but is a fairly general suite of state space model that can be applied or extended to a wide range of problems.
|
|
7
|
+
|
|
8
|
+
The core of this package is a suite of DLM models implemented in [stan](https://mc-stan.org), using a combination of HMC sampling and Kalman filtering to infer the DLM model parameters (trend, seasonal cycle, auto-regressive processes etc) given some time-series data. To make the code as accessible as possible, I provide a step-by-step tutorial in python for how to read in your data, run the DLM model(s), and process the outputs to make nice plots. Once you've worked through this tutorial you should have all the tools you need to apply DLM to your own data!
|
|
9
|
+
|
|
10
|
+
Note: some basic working knowledge of python and jupyter notebooks is required to make the most of this package (but it's not too onerous).
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
Clone the repository and navigate into the directory:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git clone https://github.com/sean-m-davis-NOAA/dlmmc.git
|
|
18
|
+
cd dlmmc
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Installation with conda (recommended)
|
|
22
|
+
|
|
23
|
+
The recommended way to get started is with Conda and the CmdStanPy backend.
|
|
24
|
+
|
|
25
|
+
CmdStan produces native compiled Stan executables, and CmdStanPy provides the Python interface.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
# create and activate a modern environment
|
|
29
|
+
conda create -n dlmmc-cmdstanpy -c conda-forge python=3.10 cmdstanpy netCDF4 numpy scipy xarray arviz tqdm mpi4py openmpi matplotlib jupyter ipykernel pandas -y
|
|
30
|
+
conda activate dlmmc-cmdstanpy
|
|
31
|
+
python -m pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Notes:
|
|
35
|
+
- CmdStan requires a C++ toolchain to compile models. On macOS install Xcode command-line tools (`xcode-select --install`) or use a conda-provided compiler on CI.
|
|
36
|
+
- The CmdStanPy environment command includes the dependencies for the MPI example. On HPC systems, use the site-provided MPI implementation and ensure `mpi4py` is built against it instead of mixing in a separate Conda MPI implementation.
|
|
37
|
+
- To keep a macOS laptop awake while compiling/sampling use `caffeinate -i <command>` or run the job on a remote server or in a tmux session.
|
|
38
|
+
|
|
39
|
+
Finally, if you want to see what a successful installation looks like, see [INSTALL.md](INSTALL.md)
|
|
40
|
+
|
|
41
|
+
## Getting Started
|
|
42
|
+
|
|
43
|
+
The recommended path below uses the CmdStanPy environment above. Run commands from the repository root.
|
|
44
|
+
|
|
45
|
+
1. **Install CmdStan.** A C++ toolchain is required; see the installation notes above.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
python -c "import cmdstanpy; cmdstanpy.install_cmdstan()"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
2. **Optionally precompile the packaged models.** Models compile lazily on the first `fit()` call; this command precompiles all models up front.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
python compile_stan_models.py
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
3. **Run the benchmark.** This is the quickest end-to-end check of data loading, model compilation, and CmdStanPy sampling.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
python dlm_benchmark.py
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The benchmark writes a timestamped JSON file under `results/`. Confirm it contains `compile_seconds`, `fit_seconds`, and posterior dimensions.
|
|
64
|
+
|
|
65
|
+
4. **Work through the tutorial.** Open `dlm_tutorial.ipynb` in JupyterLab or VS Code, select the CmdStanPy environment as the kernel, and run the cells in order. The tutorial uses four chains with 1,000 warmup and 2,000 sampling iterations per chain, so it takes longer than the benchmark.
|
|
66
|
+
|
|
67
|
+
5. **Run the validation suite.** Open `dlm_validation_tests.ipynb` and run the cells in order. It performs synthetic parameter-recovery tests for four model variants using short chains. Review the recovery intervals, R-hat/ESS values, and divergences; the short settings demonstrate the workflow and are not a guarantee of convergence.
|
|
68
|
+
|
|
69
|
+
6. **Optionally test the gridded MPI workflow.** This fits the example pressure/latitude grid in parallel and streams results to one NetCDF writer. It requires a working MPI implementation and `mpi4py`; on a local Open MPI setup:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
mpirun -np 4 python dlm_lat_alt_mpi_run.py
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The MPI example defaults to very short chains for a pipeline smoke test, not scientific inference. See [MPI-README.md](MPI-README.md) for output verification and HPC launch details.
|
|
76
|
+
|
|
77
|
+
### Installation with pip
|
|
78
|
+
|
|
79
|
+
In an existing Python environment with the required dependencies and CmdStan installed, install the package from the repository root with `python -m pip install .`. For editable development installs, use `python -m pip install -e .`.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
**Platforms**
|
|
83
|
+
|
|
84
|
+
CmdStan requires a supported C++ toolchain on each platform. On HPC systems, follow the site's compiler and MPI guidance in `INSTALL.md` and `MPI-README.md`.
|
|
85
|
+
|
|
86
|
+
## Usage
|
|
87
|
+
|
|
88
|
+
Follow the [Getting Started](#getting-started) sequence for setup and examples. A basic no-regressor fit from xarray data looks like this:
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
import xarray as xr
|
|
92
|
+
import dlmmc
|
|
93
|
+
|
|
94
|
+
with xr.open_dataset("data/BASIC_V1_2017_lotus_seascyc_gcsw2017_fac2.nc") as ds:
|
|
95
|
+
series = ds["o3"].isel(pressure=22, latitude=8)
|
|
96
|
+
uncertainty = ds["o3_sigma"].isel(pressure=22, latitude=8)
|
|
97
|
+
posterior = dlmmc.fit(
|
|
98
|
+
series,
|
|
99
|
+
uncertainty=uncertainty,
|
|
100
|
+
model="noregs_ar1",
|
|
101
|
+
chains=4,
|
|
102
|
+
warmup=500,
|
|
103
|
+
samples=1000,
|
|
104
|
+
)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The returned posterior is an xarray Dataset with `chain`, `draw`, and `time` coordinates. For regressors and plots, see `dlm_tutorial.ipynb`. For grid workloads, see `dlm_lat_alt_mpi_run.py` and [MPI-README.md](MPI-README.md).
|
|
108
|
+
|
|
109
|
+
**Model descriptions**
|
|
110
|
+
|
|
111
|
+
Mathematical descriptions of each of the DLM models implemented in this package can be found in the file `models/model_descriptions/model_descriptions.pdf`. This file contains a concise description of the parameters of each model, their physical meanings, and how to refer to them in the code: make sure you have read and understand the model description before running a new model!
|
|
112
|
+
|
|
113
|
+
## Validation
|
|
114
|
+
|
|
115
|
+
`dlm_validation_tests.ipynb` provides synthetic parameter-recovery demonstrations for four CmdStanPy model variants. Interpret its recovery intervals and sampler diagnostics as evidence for each run, not as a guarantee that every parameter is well identified under all settings.
|
|
116
|
+
|
|
117
|
+
## Citing this code
|
|
118
|
+
|
|
119
|
+
There is a JOSS paper describing dlmmc v1, which can be found [here](http://joss.theoj.org/papers/10.21105/joss.01157). Please cite this paper if you use or refer to this code, as:
|
|
120
|
+
|
|
121
|
+
_Alsing, (2019). dlmmc: Dynamical linear model regression for atmospheric time-series analysis. Journal of Open Source Software, 4(37), 1157, https://doi.org/10.21105/joss.01157_
|
|
122
|
+
|
|
123
|
+
A close description of the vanilla DLM model implemented here can be found in [Laine et al 2014](https://www.atmos-chem-phys.net/14/9707/2014/acp-14-9707-2014.pdf), and this model/code was used for analyzing ozone data in [Ball et al 2017](https://www.research-collection.ethz.ch/handle/20.500.11850/202027) and [Ball et al 2018](https://www.atmos-chem-phys.net/18/1379/2018/acp-18-1379-2018.html). Please consider citing these papers too when you use this code.
|
|
124
|
+
|
|
125
|
+
## Contributing
|
|
126
|
+
|
|
127
|
+
Contributions, issues, and feature requests are welcome!
|
|
128
|
+
|
|
129
|
+
If you are interested in improving `dlmmc` or fixing a bug, please review our [Contributing Guide](CONTRIBUTING.md) for detailed instructions on how to get started and submit a Pull Request.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dlmmc"
|
|
7
|
+
version = "2.1.0"
|
|
8
|
+
description = "Dynamical linear models for time-series analysis using CmdStanPy"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"cmdstanpy>=1.2",
|
|
13
|
+
"numpy>=1.24",
|
|
14
|
+
"pandas>=2.0",
|
|
15
|
+
"platformdirs>=4",
|
|
16
|
+
"xarray>=2024.1",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.optional-dependencies]
|
|
20
|
+
diagnostics = ["arviz>=0.17"]
|
|
21
|
+
mpi = ["mpi4py>=3.1", "netCDF4>=1.6"]
|
|
22
|
+
test = ["pytest>=8"]
|
|
23
|
+
|
|
24
|
+
[tool.setuptools.packages.find]
|
|
25
|
+
where = ["src"]
|
|
26
|
+
include = ["dlmmc*"]
|
|
27
|
+
|
|
28
|
+
[tool.pytest.ini_options]
|
|
29
|
+
testpaths = ["tests"]
|
dlmmc-2.1.0/setup.cfg
ADDED