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

Dependencies #73

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d60de0c
Sort current imports
zmoon Dec 17, 2021
19d7eb5
cartopy as extra
zmoon Dec 17, 2021
77f316e
envs and tests
zmoon Dec 18, 2021
7906638
Include ffmpeg in both CI test envs
zmoon Dec 18, 2021
c72cb87
Use dask-core in the test envs
zmoon Dec 20, 2021
3cbd37e
dask optional
zmoon Dec 20, 2021
00b8c78
Initial RTD pip requirements
zmoon Dec 20, 2021
c1027ac
Address some sphinx warnings
zmoon Dec 20, 2021
c3b1bfb
Add initial whats-new
zmoon Dec 20, 2021
b4c6714
Add ffmpeg notes in install docs
zmoon Dec 20, 2021
3cb27d4
Remove ffmpeg from the docs dev env
zmoon Dec 20, 2021
378abbe
PR # in whats-new [skip ci]
zmoon Dec 20, 2021
c90be02
Merge branch 'master' into deps
jbusecke Mar 16, 2022
91a0b17
Initial req-checking decorator
zmoon Mar 28, 2022
62e9f91
Use new req-checking deco in presets
zmoon Mar 28, 2022
5ae6fcb
Update tests with xarray-style req check
zmoon Mar 28, 2022
a377ce6
Test one of the req check messages
zmoon Mar 28, 2022
0a5f42e
Merge branch 'master' into deps
zmoon Mar 28, 2022
9a174d4
Update whats-new
zmoon Mar 28, 2022
4b38de6
Add some no-cover
zmoon Mar 28, 2022
4965010
Merge branch 'master' into deps
zmoon May 3, 2022
d6cfe7b
format
zmoon May 3, 2022
ac77f5a
Merge branch 'master' into deps
zmoon May 3, 2022
8643ace
Include tqdm in main test env
zmoon Jul 31, 2022
48873c4
Merge branch 'master' into deps
zmoon Jul 31, 2022
fb79751
Test cartopy req check for more fns
zmoon Jul 31, 2022
99755b4
sp
zmoon Jul 31, 2022
9dd742c
Fix and test add coast/land non-geoax raise
zmoon Jul 31, 2022
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
channels: conda-forge
mamba-version: '*'
channel-priority: strict
activate-environment: test_env_xmovie # Defined in ci/environment*.yml
activate-environment: xmovie-test # Defined in ci/environment*.yml
auto-update-conda: false
python-version: ${{ matrix.python-version }}
environment-file: ci/environment.yml
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment-core-deps.yml') }}
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test_env_xmovie # Defined in ci/environment*.yml
activate-environment: xmovie-test-core # Defined in ci/environment*.yml
auto-update-conda: false
python-version: 3.9
python-version: '3.9'
environment-file: ci/environment-core-deps.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Set up conda environment
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ var/
.installed.cfg
*.egg

# Virtual environment
venv*/

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
4 changes: 4 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: 2

python:
install:
- requirements: docs/requirements-rtd.txt

build:
os: "ubuntu-20.04"
tools:
Expand Down
27 changes: 15 additions & 12 deletions ci/environment-core-deps.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: test_env_xmovie
# Conda environment for testing xmovie in CI
name: xmovie-test-core
channels:
- conda-forge
- nodefaults
dependencies:
- xarray
- dask
- scipy
- numpy
- pytest
- future
- python
#
# xmovie core
- matplotlib
- cartopy
- pykdtree
- numpy
- xarray
#
- ffmpeg
#
# Tests
- opencv
- pip:
- codecov
- pytest-cov
- pillow
- pytest
- pytest-cov
35 changes: 22 additions & 13 deletions ci/environment.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
name: test_env_xmovie
# Conda environment for testing xmovie in CI
name: xmovie-test
channels:
- conda-forge
- nodefaults
dependencies:
- xarray
- dask
- scipy
- numpy
- pytest
- future
- python
#
# xmovie core
- matplotlib
- cartopy
- pykdtree
- numpy
- xarray
#
- ffmpeg
- tqdm
#
# Extras
- cartopy
# - cftime
- dask-core
# - nc-time-axis
# - scipy
# - tqdm
#
# Test
- opencv
- pip:
- codecov
- pytest-cov
- pillow
- pytest
- pytest-cov
28 changes: 17 additions & 11 deletions ci/environment-docs.yml → docs/environment-docs-dev.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# Conda environment for docs development,
# including running the example notebooks
name: xmovie-docs
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.8
# Core
- xarray
- pip
#
# xmovie core
- matplotlib
- cartopy
- ffmpeg
- numpy
- xarray
#
# Optional
- tqdm
- cartopy
- dask-core
# Examples
- pooch
- jupyterlab
- tqdm
#
# Example notebooks
- ipywidgets
- jupyterlab
- pooch
#
# Docs
- nbsphinx
- sphinx>=4.0
- sphinx-autobuild
- sphinx-book-theme
- nbsphinx
- sphinx-copybutton
#
- pip
- pip:
- sphinx-prompt
- '-e ../' # xmovie
- '-e ../' # xmovie itself
20 changes: 10 additions & 10 deletions docs/examples/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![movie_fast.gif](movie_fast.gif)\n",
"![movie_slow.gif](movie_slow.gif)"
"![fast GIF](movie_fast.gif)\n",
"![slow GIF](movie_slow.gif)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](movie_combo.gif)"
"![combo GIF](movie_combo.gif)"
]
},
{
Expand Down Expand Up @@ -297,7 +297,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![](lon_movie.gif)"
"![lon dim GIF](lon_movie.gif)"
]
},
{
Expand Down Expand Up @@ -355,7 +355,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![movie_rotating.gif](movie_rotating.gif)"
"![rotating GIF](movie_rotating.gif)"
]
},
{
Expand Down Expand Up @@ -395,7 +395,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![](movie_rotating_dark.gif)"
"![rotating dark GIF](movie_rotating_dark.gif)"
]
},
{
Expand Down Expand Up @@ -440,8 +440,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![](movie_cont.gif)\n",
"![](movie_contf.gif)"
"![rotating contour GIF](movie_cont.gif)\n",
"![rotating contourf GIF](movie_contf.gif)"
]
},
{
Expand Down Expand Up @@ -509,7 +509,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![](movie_rasm.gif)"
"![RASM GIF](movie_rasm.gif)"
]
},
{
Expand Down Expand Up @@ -666,7 +666,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"![](movie_custom.gif)"
"![custom plotfunc movie](movie_custom.gif)"
]
}
],
Expand Down
18 changes: 18 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,18 @@ The main aims of this module are:
Installation
------------

.. important::

`ffmpeg`_ is required in order to create the movies from the saved PNG frames.
See `their installation instructions <https://ffmpeg.org/download.html>`_.
``ffmpeg``\'s location must be in the OS search path (``PATH``) for movie creation to work.

.. note::

For now, ``dask(-core)`` and ``cartopy`` are included with ``xmovie``,
but they may be optional dependencies in the future.


Conda
~~~~~

Expand All @@ -69,6 +76,15 @@ The easiest way to install ``xmovie`` is via ``conda``:

conda install -c conda-forge xmovie


zmoon marked this conversation as resolved.
Show resolved Hide resolved
.. note::

conda-forge includes a recipe for ffmpeg. To install both:

.. prompt:: bash

conda install -c conda-forge xmovie ffmpeg

Pip
~~~

Expand Down Expand Up @@ -103,3 +119,5 @@ If you want to install the latest version from GitHub, simply run
.. _xarray: https://xarray.pydata.org
.. _Matplotlib: https://matplotlib.org
.. _Dask: https://dask.org
.. _ffmpeg: https://ffmpeg.org/
.. _ffmpeg-download: https://ffmpeg.org/download.html
9 changes: 9 additions & 0 deletions docs/requirements-rtd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# pip requirements to build the docs on RTD
# (example notebook deps are not needed since we do not run them in the docs build)
../
ipython
nbsphinx
sphinx ~= 4.0
sphinx-book-theme
sphinx-copybutton
sphinx-prompt
8 changes: 8 additions & 0 deletions docs/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ What's New
v0.3.0 (unreleased)
-------------------

Packaging
~~~~~~~~~
- ``cartopy`` (used in the :func:`~xmovie.rotating_globe` preset)
and ``dask`` (used for parallel frame saving)
are now optional extras instead of package requirements
(:pull:`73`).
By `zmoon <https://github.com/zmoon>`_.

Documentation
~~~~~~~~~~~~~
- Sphinx docs build, published to Read the Docs (:pull:`67`).
Expand Down
Loading