diff --git a/docs/sphinx/source/installation.rst b/docs/sphinx/source/installation.rst index 3f7d19b581..f2a6b7a5d0 100644 --- a/docs/sphinx/source/installation.rst +++ b/docs/sphinx/source/installation.rst @@ -73,6 +73,10 @@ non-editable way, use one of the following commands to install pvlib-python:: # best option if you know what you are doing pip install pvlib + # get pvlib and optional dependencies from the Python Package Index + # another option if you know what you are doing + pip install pvlib[optional] + If your system complains that you don't have access privileges or asks for a password then you're probably trying to install pvlib into your system's Python distribution. This is usually a bad idea and you should @@ -163,9 +167,9 @@ referred to as *conda environments*, but they're the same for our purposes. #. **Create** a new conda environment for pvlib and pre-install the required packages into the environment: ``conda create --name pvlibdev python pandas scipy`` -#. **Activate** the new conda environment: ``source activate pvlibdev`` +#. **Activate** the new conda environment: ``conda activate pvlibdev`` #. **Install** additional packages into your development environment: - ``conda install jupyter ipython matplotlib seaborn pytest nose flake8`` + ``conda install jupyter ipython matplotlib pytest nose flake8`` The `conda documentation `_ has more information on how to use conda virtual environments. You can also add @@ -181,10 +185,12 @@ Good news -- installing the source code is the easiest part! With your conda/virtual environment still active... #. **Install** pvlib-python in "development mode" by running - ``pip install -e /path/to/your/pvlib-python``. - You remember this path from the clone step, right? It's probably - something like ``C:\Users\%USER%\Documents\GitHub\pvlib-python`` - (Windows) or ``/Users/%USER%/Documents/pvlib-python`` (Mac). + ``pip install -e .`` from within the directory you previously cloned. + Consider installing pvlib using ``pip install -e .[all]`` so that + you can run the unit tests and build the documentation. + Your clone directory is probably similar to + ``C:\Users\%USER%\Documents\GitHub\pvlib-python``(Windows) or + ``/Users/%USER%/Documents/pvlib-python`` (Mac). #. **Test** your installation by running ``python -c 'import pvlib'``. You're good to go if it returns without an exception. @@ -229,6 +235,11 @@ include: The Anaconda distribution includes most of the above packages. +Alternatively, users may install all optional dependencies using + + pip install pvlib[optional] + + .. _nrelspa: NREL SPA algorithm diff --git a/docs/sphinx/source/whatsnew/v0.6.0.rst b/docs/sphinx/source/whatsnew/v0.6.0.rst index a7457a6487..14a9ee4df4 100644 --- a/docs/sphinx/source/whatsnew/v0.6.0.rst +++ b/docs/sphinx/source/whatsnew/v0.6.0.rst @@ -117,8 +117,13 @@ Enhancements * Add irradiance.clearness_index_zenith_independent function. (:issue:`396`) * Add checking for consistency between module_parameters and dc_model. (:issue:`417`) * Add DC model methods ``'desoto'`` and ``'pvsyst'`` to ModelChain (:issue:`487`) -* Add the CEC module model in `pvsystem.calcparams_cec` and `ModelChain.cec`. (:issue:`463`) +* Add the CEC module model in `pvsystem.calcparams_cec` and `ModelChain.cec`. (:issue:`463`) * Add DC model methods desoto and pvsyst to ModelChain (:issue:`487`) +* pvlib now ships with a pvlib[optional] installation option to automatically + install packages needed to support additional pvlib features: + ``pip install pvlib[optional]``. Additional installation options include + `doc` (requirements for minimal documentation build), `test` (requirements + for testing), and `all` (optional + doc + test). (:issue:`553`, :issue:`483`) * Set default alpha to 1.14 in :func:`~pvlib.atmosphere.angstrom_aod_at_lambda` (:issue:`563`) diff --git a/readthedocs.yml b/readthedocs.yml index e86f8376d8..df675e2a79 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,5 +1,6 @@ -conda: - file: docs/environment.yml python: - version: 2 - setup_py_install: true \ No newline at end of file + version: 3 + use_system_site_packages: true + pip_install: true + extra_requirements: + - all \ No newline at end of file diff --git a/setup.py b/setup.py index 2119b9ef5c..f37f872230 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,14 @@ 'pytz', 'six', ] -TESTS_REQUIRE = ['pytest', 'nose'] +TESTS_REQUIRE = ['pytest', 'pytest-cov', 'pytest-mock', 'nose'] +EXTRAS_REQUIRE = { + 'optional': ['scipy', 'tables', 'numba', 'siphon', 'netcdf4', 'ephem'], + 'doc': ['sphinx', 'ipython', 'sphinx_rtd_theme', 'numpydoc', + 'matplotlib'], + 'test': TESTS_REQUIRE +} +EXTRAS_REQUIRE['all'] = sorted(set(sum(EXTRAS_REQUIRE.values(), []))) CLASSIFIERS = [ 'Development Status :: 4 - Beta', @@ -94,6 +101,7 @@ cmdclass=versioneer.get_cmdclass(), packages=PACKAGES, install_requires=INSTALL_REQUIRES, + extras_require=EXTRAS_REQUIRE, tests_require=TESTS_REQUIRE, ext_modules=extensions, description=DESCRIPTION,