Skip to content

Commit 4201ea9

Browse files
Merge pull request #184 from respec/conda_tweaks
Conda tweaks and Fix Example Notebook 1
2 parents e99feb6 + 30f8c9e commit 4201ea9

File tree

6 files changed

+5125
-8202
lines changed

6 files changed

+5125
-8202
lines changed

README.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Install From Pre-built Packages
7171
-------------------------------
7272
Python Package Index (PyPI)
7373
+++++++++++++++++++++++++++
74-
Starting with version 0.11.0a1 we provide a PyPI wheel package for HSP2 which
74+
Starting with version 0.11.0a1 we provide `a PyPI wheel package for HSP2`_ which
7575
should work on any supported platform for Python 3.10, 3.11, and 3.12.
7676

7777
.. code-block:: console
@@ -113,13 +113,17 @@ Option 1: Install using "conda"
113113
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114114
Follow these steps to install using the conda_ package manager.
115115

116-
1. Install the Anaconda Python Distribution
116+
1. Install Miniconda or Anaconda Python Distribution
117117
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118-
Install the `latest release`_ of the Anaconda Distribution, which includes the
119-
conda package manager, a complete Python (and R) data science stack, and the
120-
Anaconda Navigator GUI. Follow `Anaconda Installation`_ documentation.
118+
We recommend installing the light-weight Miniconda_ that includes Python, the
119+
conda_ environment and package management system, and their dependencies.
120+
121+
NOTE: Follow conda defaults to install in your local user directory. DO NOT
122+
install for all users, to avoid substantial headaches with permissions.
123+
124+
If you have already installed the Anaconda Distribution, you can use it to
125+
complete the next steps, but you may need to update to the `latest release`_.
121126

122-
A lighter-weight alternative is to install Miniconda_.
123127

124128
2. Create a Conda Environment for HSP2 Modeling (optional)
125129
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -147,6 +151,14 @@ Install the necessary and optional packages for HSP2 in the new environment:
147151
cd /path/to/module/hsp2
148152
pip install . # or "pip install -e ." to install in editable mode
149153
154+
**Alternately**, you can replace all of the create and install steps above by
155+
creating the new environment from the included `environment.yml` file
156+
from this single line of code:
157+
158+
.. code-block:: console
159+
160+
conda env create --file=environment.yml --solver=libmamba
161+
150162
You should now be able to run the Tutorials and create your own Jupyter
151163
Notebooks!
152164

@@ -223,6 +235,7 @@ The HSP2 API is designed to be used in Python scripts and Jupyter notebooks.
223235
.. _`initial release`: https://github.com/respec/HSPsquared/releases/tag/0.7.7
224236
.. _`GNU Affero General Public License (AGPL), copyrighted 2017 by RESPEC`: https://github.com/respec/HSPsquared/blob/master/LICENSE
225237
.. _JupyterLab: https://jupyterlab.readthedocs.io/en/stable/
238+
.. _`a PyPI wheel package for HSP2`: https://pypi.org/project/hsp2/
226239
.. _conda: https://docs.conda.io/en/latest/
227240
.. _`latest release`: https://docs.anaconda.com/anaconda/reference/release-notes/
228241
.. _`Anaconda Installation`: https://docs.anaconda.com/anaconda/install/

environment.yml

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,50 @@
11
---
2-
name: hsp2_py38
2+
name: hsp2_py310
33
channels:
4-
- conda-forge
4+
- conda-forge
5+
- nodefaults # Speeds solving env, by limiting the number of options
56

67
dependencies:
7-
# Aligned with Anaconda 2021.05 (May 13, 2021)
8-
# package management
9-
- conda
10-
- conda-build
11-
- pip
8+
# Python 3.10 was default for Anaconda 2023.03-0 (Mar 20, 2023)
9+
# https://docs.anaconda.com/free/anaconda/release-notes/#anaconda-2023-03-0-mar-20-2023
10+
# package management
11+
- conda
12+
- conda-build
13+
- conda-libmamba-solver
14+
- pip
1215

13-
# Running HSP2
14-
- python =3.8*
15-
- scipy # Scipy also installs numpy
16-
# Pandas installs most scientific Python modules, such as Numpy, etc.
17-
- pandas ==1.2.*
18-
- numba ==0.53.1
19-
- numpy ==1.20.* # for compatibility with numba version <0.53
20-
# latest compatible with both versions of PyTables & h5py below
21-
# - doesn't work with setup.py
22-
- hdf5 ==1.10.6
23-
- pytables ==3.6.1
24-
- h5py >=3.1
25-
- hdf5plugin # HDF5 compression filters for h5py & jupyterlab_hdf
26-
- cltoolbox
16+
# Running HSP2
17+
- python =3.10
18+
- scipy # Scipy also installs numpy
19+
# Pandas installs most scientific Python modules, such as Numpy, etc.
20+
- pandas
21+
- numba
22+
- numpy
23+
- hdf5
24+
- pytables
25+
- h5py
26+
- hdf5plugin # HDF5 compression filters for h5py & jupyterlab_hdf
27+
- cltoolbox
2728

28-
# Interactivity & Visualization via Jupyter Notebooks
29-
# (optional, but required for tutorials)
30-
- jupyterlab ==3.0.* # also installs classic Jupyter notbook
31-
- ipympl # jupyter-matplotlib, https://github.com/matplotlib/ipympl
32-
- nodejs # required for many JupyterLab extensions
33-
# Conda environment & package access extension from within Jupyter
34-
- nb_conda
35-
# HoloViz, https://holoviz.org
36-
- hvplot # hvPlot installs most HoloViz libs, including matplotlib
37-
- ipywidgets # Required for HoloViz interactivity in Jupyter notebooks
29+
# Operational Model (om)
30+
- pyparsing
3831

39-
# Dev tools (optional)
40-
- python-language-server
41-
# Includes both the server extension (jupyter-lsp) and pyls third-party
42-
# server (python-language-server)
43-
- jupyter-lsp-python
44-
- jupyterlab-lsp # Docs at https://github.com/krassowski/jupyterlab-lsp
32+
# Interactivity & Visualization via Jupyter Notebooks (optional,
33+
# but required for tutorials)
34+
- jupyterlab # also installs classic Jupyter notbook
35+
- ipympl # jupyter-matplotlib, https://github.com/matplotlib/ipympl
36+
- nodejs # required for many JupyterLab extensions
37+
# HoloViz, https://holoviz.org
38+
- hvplot # hvPlot installs most HoloViz libs, including matplotlib
39+
- ipywidgets # Required for HoloViz interactivity in Jupyter notebooks
40+
- ipywidgets_bokeh
41+
- jupyter_bokeh # for VSCode
4542

46-
# Operational Model (om)
47-
- pyparsing
43+
# Dev tools (optional)
44+
- python-lsp-server # Language Server Protocol (LSP) extension for Python (pylsp)
45+
- jupyterlab-lsp # Provides both server extension and lab extension
4846

49-
# PIP install requirements only if it is not possible with conda
50-
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#using-pip-in-an-environment
51-
# Optional, but recommended for tutorials
52-
- pip:
53-
# https://github.com/lckr/jupyterlab-variableInspector
54-
# - lckr-jupyterlab-variableinspector
55-
# Explore HDF5 files in JupyterLab. Requires an additional step to install.
56-
# - jupyterlab_hdf
57-
# Installation instructions:
58-
# https://github.com/jupyterlab/jupyterlab-hdf5#installation
47+
# PIP install requirements only if it is not possible with conda
48+
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#using-pip-in-an-environment
49+
- pip:
50+
- hsp2

environment_dev.yml

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
---
22
name: hsp2_py311_dev
33
channels:
4-
- conda-forge
5-
- nodefaults # Speeds solving env, by limiting the number of options
4+
- conda-forge
5+
- nodefaults # Speeds solving env, by limiting the number of options
66

77
dependencies:
8-
# Python 3.11 is supported by Anaconda since 2023.03-0 (Mar 20, 2023)
9-
# https://docs.anaconda.com/free/anaconda/release-notes/#anaconda-2023-03-0-mar-20-2023
10-
# package management
11-
- conda
12-
- conda-build
13-
- conda-libmamba-solver
14-
- pip
8+
# Python 3.11 was default for Anaconda 2023.07-0 (Jul 11, 2023)
9+
# https://docs.anaconda.com/free/anaconda/release-notes/#anaconda-2023-03-0-mar-20-2023
10+
# package management
11+
- conda
12+
- conda-build
13+
- conda-libmamba-solver
14+
- pip
1515

16-
# Running HSP2
17-
- python =3.11
18-
- scipy # Scipy also installs numpy
19-
# Pandas installs most scientific Python modules, such as Numpy, etc.
20-
- pandas >=2.0
21-
- numba
22-
- numpy
23-
- hdf5
24-
- pytables
25-
- h5py
26-
- hdf5plugin # HDF5 compression filters for h5py & jupyterlab_hdf
27-
# - dask # for future performance enhancements
28-
- cltoolbox
16+
# Running HSP2
17+
- python =3.11
18+
- scipy # Scipy also installs numpy
19+
# Pandas installs most scientific Python modules, such as Numpy, etc.
20+
- pandas >=2.0
21+
- numba
22+
- numpy
23+
- hdf5
24+
- pytables
25+
- h5py
26+
- hdf5plugin # HDF5 compression filters for h5py & jupyterlab_hdf
27+
# - dask # for future performance enhancements
28+
- cltoolbox
2929

30-
# Operational Model (om)
31-
- pyparsing
30+
# Operational Model (om)
31+
- pyparsing
3232

33-
# Interactivity & Visualization via Jupyter Notebooks (optional,
34-
# but required for tutorials)
35-
- jupyterlab # also installs classic Jupyter notbook
36-
- ipympl # jupyter-matplotlib, https://github.com/matplotlib/ipympl
37-
- nodejs # required for many JupyterLab extensions
38-
# HoloViz, https://holoviz.org
39-
- hvplot # hvPlot installs most HoloViz libs, including matplotlib
40-
- ipywidgets # Required for HoloViz interactivity in Jupyter notebooks
33+
# Interactivity & Visualization via Jupyter Notebooks (optional,
34+
# but required for tutorials)
35+
- jupyterlab # also installs classic Jupyter notbook
36+
- ipympl # jupyter-matplotlib, https://github.com/matplotlib/ipympl
37+
- nodejs # required for many JupyterLab extensions
38+
# HoloViz, https://holoviz.org
39+
- hvplot # hvPlot installs most HoloViz libs, including matplotlib
40+
- ipywidgets # Required for HoloViz interactivity in Jupyter notebooks
41+
- ipywidgets_bokeh
42+
- jupyter_bokeh # for VSCode
4143

42-
# Dev tools (optional)
43-
# Language Server Protocol (LSP) extension for Python (pylsp)
44-
- python-lsp-server
44+
# Dev tools (optional)
45+
# Language Server Protocol (LSP) extension for Python (pylsp)
46+
- python-lsp-server
4547
# Rope for Completions and renaming
4648
# Pyflakes linter to detect various errors
4749
# McCabe linter for complexity checking
@@ -51,9 +53,10 @@ dependencies:
5153
# YAPF for code formatting (preferred over autopep8)
5254
# flake8 for error checking (disabled by default)
5355
# pylint for code linting (disabled by default)
54-
- jupyterlab-lsp # Provides both server extension and lab extension
56+
- jupyterlab-lsp # Provides both server extension and lab extension
5557

5658

57-
# PIP install requirements only if it is not possible with conda
58-
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#using-pip-in-an-environment
59-
- pip:
59+
# PIP install requirements only if it is not possible with conda
60+
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#using-pip-in-an-environment
61+
- pip:
62+
# For Dev environment, we recommend using the `conda build` command to install

0 commit comments

Comments
 (0)