Skip to content

Commit

Permalink
Install docs (#47)
Browse files Browse the repository at this point in the history
* add pytest cache dir to .gitignore

* installing instructions

* move cython to development instructions

* review actions

* sytle changes to index.html
  • Loading branch information
ocefpaf authored and Joe Hamman committed May 16, 2018
1 parent e249168 commit 6b58a27
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ build/
*.egg-info
_build/
__pycache__
.pytest_cache/
7 changes: 7 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
API
===

.. automodule:: cftime
:members: datetime, date2num, date2index, num2date, JulianDayFromDate, DatetimeJulian, DatetimeProlepticGregorian, DatetimeNoLeap, DatetimeAllLeap, DatetimeGregorian
:show-inheritance:
:noindex:
11 changes: 6 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ cftime
Python library for decoding time units and variable values in a netCDF file
conforming to the Climate and Forecasting (CF) netCDF conventions.

Contents
--------

.. toctree::
:maxdepth: 2
:caption: Contents:

.. automodule:: cftime
:members: datetime, date2num, date2index, num2date, JulianDayFromDate, DatetimeJulian, DatetimeProlepticGregorian, DatetimeNoLeap, DatetimeAllLeap, DatetimeGregorian
:show-inheritance:
installing
api

Indices and tables
==================
------------------

* :ref:`genindex`
* :ref:`modindex`
Expand Down
42 changes: 42 additions & 0 deletions docs/installing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Installation
============

Required dependencies
---------------------

- Python 2.7, 3.4, 3.5, or 3.6
- `numpy <http://www.numpy.org/>`__ (1.7 or later)


Instructions
------------

The easiest way to get everything installed is to use conda_ command line tool::

$ conda install cftime

.. _conda: http://conda.io/

We recommend using the community maintained `conda-forge <https://conda-forge.github.io/>`__ channel if you need difficult\-to\-build dependencies such as cartopy or pynio::

$ conda install -c conda-forge cftime

New releases may also appear in conda-forge before being updated in the default
channel.

If you don't use conda, be sure you have the required dependencies (numpy and
cython) installed first. Then, install cftime with pip::

$ pip install cftime


Developing
----------


When developing we recommend cloning the GitHub repository,
building the extension in-place with `cython <http://cython.org/>`__ 0.19 or later
``python setup.py build_ext --inplace``

and running the test suite to check if the changes are passing the tests
``pytest --pyargs test``

0 comments on commit 6b58a27

Please sign in to comment.