Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alleviating the dependency conflict between scipy and cartopy #451

Merged
merged 9 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions doc_build/anaconda_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ Users may find it preferable to install the minimalist "miniconda" package.
Step 1: Download the installation script for miniconda3
""""""""""""""""""""""""""""""""""""""""""""""""""""""""

MacOS
-----
macOS (Intel)
'''''''''''''

.. code-block:: bash

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

macOS (Apple Silicon)
'''''''''''''''''''''

.. code-block:: bash

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh

Linux
-----
.. code-block:: bash
Expand Down
9 changes: 7 additions & 2 deletions doc_build/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ Once the pyleo environment is activated, you'll want to first install Cartopy:

.. code-block:: bash

conda install -c conda-forge cartopy=0.21
conda install cartopy

To avoid a recent (July 2023) conflict between Cartopy and SciPy v1.11, once may install Statsmodels from conda so that SciPy v1.10 will be installed:

.. code-block:: bash

conda install statsmodels

(note: under Python 3.10, cartopy>=0.21 will be installed by default, so specifying this version is unnecessary).
Then install Pyleoclim through Pypi, which contains the most stable version of Pyleoclim:

.. code-block:: bash
Expand Down
4 changes: 1 addition & 3 deletions doc_build/rtd_env.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: rtd_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- numpy
- python>=3.9
- cartopy
- pip:
- Sphinx<6.0
Expand Down
12 changes: 2 additions & 10 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,21 @@
# packages for this repo including running the test suite.
name: pyleo
channels:
- LinkedEarth
- conda-forge
- default
dependencies:
- python>=3.9
- cartopy
- matplotlib
- nitime
- numba
- numpy
- pathos
- pip
- pytest
- pyyaml
- requests
- scikit-learn
- scipy=1.10.1
- seaborn
- statsmodels
- tabulate
- tqdm
- wget
- pip
- pytest
- pip:
- pyhht
- '-e .'
- pandas>=2.0
6 changes: 3 additions & 3 deletions pyleoclim/utils/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,7 @@ def smoothing(coeff, snorm, dj, smooth_factor=smooth_factor):

"""
def fft_kwargs(signal, **kwargs):
return {'n': np.int(2 ** np.ceil(np.log2(len(signal))))}
return {'n': int(2 ** np.ceil(np.log2(len(signal))))}

W = coeff.transpose()
m, n = np.shape(W)
Expand All @@ -2402,7 +2402,7 @@ def fft_kwargs(signal, **kwargs):

# Smooth in scale
wsize = 0.6 / dj * 2
win = rect(np.int(np.round(wsize)), normalize=True)
win = rect(int(np.round(wsize)), normalize=True)
T = signal.convolve2d(T, win[:, np.newaxis], 'same')
S = T.transpose()

Expand Down Expand Up @@ -2876,7 +2876,7 @@ def tc_wavelet(Y, dt, scale, mother, param, pad=False):
if pad == True:
# power of 2 nearest to N
base2 = np.fix(np.log(n1) / np.log(2) + 0.4999)
nzeroes = (2 ** (base2 + 1) - n1).astype(np.int64)
nzeroes = int(2 ** (base2 + 1) - n1)
x = np.concatenate((x, np.zeros(nzeroes)))

n = len(x)
Expand Down
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ def read(fname):
install_requires=[
"LiPD==0.2.8.8",
"pandas>=2.0.0",
"numpy<=1.24.0",
"matplotlib>=3.6.0",
"scipy>=1.9.1",
"kneed>=0.7.0",
"statsmodels>=0.13.2",
"seaborn>=0.12.0",
"scikit-learn>=0.24.2",
Expand All @@ -44,7 +42,6 @@ def read(fname):
"nitime>=0.9",
"tabulate>=0.8.9",
"Unidecode>=1.1.1",
"kneed>=0.7.0",
"pyyaml",
],
python_requires=">=3.9.0"
Expand Down