Skip to content

Organize documentation and sync ipython notebooks instead of nbconvert-generated RST files #47

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

Merged
merged 151 commits into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
0422fbb
Initial pull request
lukelbd Sep 18, 2019
baabc93
Merge pull request #55 from lukelbd/2dlatlon-bug
lukelbd Oct 21, 2019
dc48320
Construct base class skeletons and add folder search funcs
lukelbd Oct 22, 2019
8a4956e
Move config files and standardize searching locations
lukelbd Oct 24, 2019
8addbd0
Code quality changes
lukelbd Oct 24, 2019
b48f147
Cleanup, flesh out base classes
lukelbd Oct 25, 2019
a64a18e
Default transform bugfix
lukelbd Oct 25, 2019
473c489
Define wrappers on BasemapAxes for consistency with CartopyAxes
lukelbd Oct 25, 2019
9b720aa
Update docs regarding .proplotrc
lukelbd Oct 25, 2019
3bffca3
Update rcdocs
lukelbd Oct 25, 2019
4425813
Merge branch 'master' into custom-cmaps-cycles
lukelbd Oct 25, 2019
e9b2bea
Implement colormap modifying features on classes
lukelbd Oct 28, 2019
771dddb
Cleanup
lukelbd Oct 28, 2019
d6cd771
Revert to old config file/folder layout
lukelbd Oct 28, 2019
42ef8c2
Fill default ~/.proplotrc file with commented out lines
lukelbd Oct 28, 2019
f835850
Rename rc categories
lukelbd Oct 28, 2019
f11c283
Cleanup
lukelbd Oct 28, 2019
33e384c
Rename rc dicts again
lukelbd Oct 28, 2019
1203055
Rename Colormap.copy() --> from_cmap(), cleanup
lukelbd Oct 28, 2019
4b6d1a5
Bugfix
lukelbd Oct 28, 2019
47dd70f
Segmentdata bugs
lukelbd Oct 28, 2019
fab23de
Cleanup and standardize names
lukelbd Oct 29, 2019
5974268
Make concatenate + copy non-static, misc bugfixes
lukelbd Oct 29, 2019
fd420c6
Remove duplicate reverse features, more misc bugfixes
lukelbd Oct 29, 2019
ceb98fd
Various bugfixes (from testing colors.ipynb)
lukelbd Oct 29, 2019
683c6d7
Address codacy complaints
lukelbd Oct 29, 2019
49ef944
Update docs, fix save methods, add __repr__
lukelbd Oct 29, 2019
a4b9b6d
Fix save() bug, tweak __repr__()
lukelbd Oct 30, 2019
fd79457
Unused import
lukelbd Oct 30, 2019
31439dd
Merge pull request #57 from lukelbd/custom-cmaps-cycles
lukelbd Oct 30, 2019
0fe3bfc
Add new classes to __all__
lukelbd Oct 30, 2019
e1712e7
Repair save() docs
lukelbd Oct 30, 2019
f32e950
Fix merge conflict
lukelbd Oct 30, 2019
923f6b4
Cleanup save() extensions table
lukelbd Oct 30, 2019
704c7d3
Merge branch 'master' into dualax-factoryfunc-fixes
lukelbd Oct 30, 2019
629cf55
Typo in save() docs
lukelbd Oct 30, 2019
5ae9b22
Fix sphinx links
lukelbd Oct 30, 2019
5e61499
Plural classes
lukelbd Oct 30, 2019
26fae3b
Rename Colormap.copy --> Colormap.new, cleanup benchmarking code
lukelbd Oct 30, 2019
8984497
CmapDict docs
lukelbd Oct 30, 2019
894e454
ColorCacheDict docs
lukelbd Oct 30, 2019
89db9c0
ColorCacheDict docs
lukelbd Oct 30, 2019
200c2c9
Merge branch 'master' into dualax-factoryfunc-fixes
lukelbd Oct 30, 2019
774e7f8
Change back dualx/dualy syntax
lukelbd Oct 30, 2019
ee43c53
Fix bugs due to resetting scale at drawtime
lukelbd Oct 30, 2019
02bd8fe
Add back gridliner label warnings
lukelbd Oct 30, 2019
09ed143
Update notebooks
lukelbd Oct 30, 2019
f5eff48
Implement log/symlog formatter overrides on classes
lukelbd Oct 30, 2019
552a2a4
Merge pull request #52 from lukelbd/dualax-factoryfunc-fixes
lukelbd Oct 30, 2019
4a1247b
Use mixin _Scale class, better default dualx/y locators/formatters
lukelbd Oct 30, 2019
0ea6609
Dualx/y bugfix
lukelbd Oct 30, 2019
ef51e0f
Update cartesian axes examples
lukelbd Oct 31, 2019
a2708f6
Add ETA to README
lukelbd Oct 31, 2019
20a354c
Rename _Scale-->_ScaleBase
lukelbd Oct 31, 2019
633b0ad
Move notebooks folders
lukelbd Oct 31, 2019
53142b3
Colormap() converts input matplotlib cmaps to subclass
lukelbd Oct 31, 2019
170e51d
Remove commented out code from panels-to-parasites
lukelbd Oct 31, 2019
6e98b80
Fix CartopyAxes.text() bug
lukelbd Oct 31, 2019
b547de2
Fix lonlines bug
lukelbd Oct 31, 2019
d7430ba
Default cartopy transform bugfix
lukelbd Nov 1, 2019
9ce261b
Update geophysical data example
lukelbd Nov 1, 2019
1027fb3
Permit loading arbitrary colormap files
lukelbd Nov 6, 2019
86f35f1
Rename new() --> updated()
lukelbd Nov 11, 2019
b6fbd42
Merge branch 'master' into nbsphinx-docs
lukelbd Nov 13, 2019
56c945a
Restructure docs, add new pages
lukelbd Nov 13, 2019
f1f9c6f
Add git comments to why-proplot
lukelbd Nov 13, 2019
42d81f3
Why proplot section
lukelbd Nov 13, 2019
645ad8e
Why proplot
lukelbd Nov 15, 2019
4ca91e6
Various changes, fix Parameters tables
lukelbd Nov 16, 2019
20fb6f6
Update from stash
lukelbd Nov 16, 2019
010b1cc
Revert back to :parameters: so can list multiple params at once
lukelbd Nov 17, 2019
e285557
Add light theme stylesheet, remove unused rtd clone
lukelbd Nov 18, 2019
cda6963
Fix light theme sidebar
lukelbd Nov 18, 2019
a1e703b
Light mode final CSS edits
lukelbd Nov 18, 2019
b42fd81
Slightly darker background
lukelbd Nov 18, 2019
050e0eb
Make table colors grayscale
lukelbd Nov 18, 2019
63d1311
Contribute instructions
lukelbd Nov 18, 2019
20b4fdb
Lots of writing
lukelbd Nov 18, 2019
0e7940c
My hands are writing words
lukelbd Nov 18, 2019
d1ca33e
My hands are writing words
lukelbd Nov 18, 2019
67243e1
Initial commit of notebook files
lukelbd Nov 18, 2019
6749022
Use nbsphinx fork
lukelbd Nov 18, 2019
4a6e609
Set markdown cells to raw+RST, no more nbsphinx fork
lukelbd Nov 18, 2019
fc7747b
Travis CI
lukelbd Nov 18, 2019
45c6d5c
Link fixes, minor CSS changes, overview edits
lukelbd Nov 18, 2019
252244d
Parameter header edits
lukelbd Nov 18, 2019
d40a441
Add to quick overview, various other changes
lukelbd Nov 18, 2019
63cc63e
Links, better homepage, axistools cleanup
lukelbd Nov 19, 2019
43f7767
Quick overview and links cleanup
lukelbd Nov 19, 2019
5a53690
Split user guide notebooks into smaller sections
lukelbd Nov 19, 2019
c5e83a2
Contribution guide
lukelbd Nov 19, 2019
3288d58
proj.py docs
lukelbd Nov 19, 2019
c1f843a
API ref main page
lukelbd Nov 19, 2019
1a95106
Split up figure notebook sections
lukelbd Nov 19, 2019
4021238
Compare APIs in why-proplot, not user guide
lukelbd Nov 19, 2019
9c0781a
Split color usage notebook into 3 notebooks
lukelbd Nov 19, 2019
c12451c
Rename the axes classes
lukelbd Nov 19, 2019
c3a1aa5
Better admonition blocks, fix broken links
lukelbd Nov 19, 2019
120501c
Thinner tables, docs cleanup
lukelbd Nov 19, 2019
1060158
External links
lukelbd Nov 19, 2019
d0db1bf
Docs cleanup, add manifest, add INSTALL.rst
lukelbd Nov 20, 2019
0148841
Why proplot
lukelbd Nov 20, 2019
f28706f
Misc docs changes
lukelbd Nov 20, 2019
b270941
Fix notebook links, rename cmapline --> parametric
lukelbd Nov 20, 2019
cbb956b
Add parametric method to docs
lukelbd Nov 20, 2019
a1330ef
Fix wrapper docs links
lukelbd Nov 20, 2019
5459654
Fix sidebar colors for deeply nested entries
lukelbd Nov 20, 2019
33074ee
Figures notebook cleanup
lukelbd Nov 20, 2019
3015729
Tight layout notebook
lukelbd Nov 20, 2019
3554b57
Remove add-subplot workflow refs, fix sidebar colors/buttons
lukelbd Nov 20, 2019
7b49a86
Remove remaining add-subplot refs
lukelbd Nov 21, 2019
7b07b4a
subplots() docstring
lukelbd Nov 21, 2019
97d4ec7
Dark/light mode toggle (!), zerotrim bugfix
lukelbd Nov 24, 2019
0da79e3
API page changes
lukelbd Nov 24, 2019
a9673e5
Minor changes
lukelbd Nov 24, 2019
3f7f337
Stop documenting Circle() func
lukelbd Nov 24, 2019
4631ee7
Really fix zerotrim
lukelbd Nov 24, 2019
d3b0f0b
Faq, overview, fix links, align nbsphinx output
lukelbd Nov 24, 2019
f99fbdc
Dark/light mode toggles pygments stylesheet (!)
lukelbd Nov 24, 2019
c922439
Fix dark-light toggler
lukelbd Nov 24, 2019
bccf8d7
Use rubric:: for API page subheaders
lukelbd Nov 24, 2019
76c79e5
Style tweaks, misc changes
lukelbd Nov 24, 2019
ef7843e
Style tweaks, misc changes
lukelbd Nov 24, 2019
29ea57e
Use local pygment css files, cleanup, tweaks
lukelbd Nov 24, 2019
75ce94f
Test
lukelbd Nov 24, 2019
506c491
Larger fonts in examples, docs cleanup, custom_roles cleanup, misc bu…
lukelbd Nov 25, 2019
6b79f2f
Clean notebook output
lukelbd Nov 25, 2019
f47345d
Update contribution instructions
lukelbd Nov 25, 2019
98f9652
Fix merge conflict
lukelbd Nov 25, 2019
d6a7c5a
Stylesheet bugfixes
lukelbd Nov 25, 2019
fb64eb0
Overview, faq, why proplot
lukelbd Nov 25, 2019
8bbe050
Remove units section
lukelbd Nov 25, 2019
efb4475
Why proplot
lukelbd Nov 25, 2019
e43db85
Why proplot
lukelbd Nov 25, 2019
cebc74e
Why proplot
lukelbd Nov 25, 2019
62d94e0
Codacy complaints
lukelbd Nov 25, 2019
2c1e3e1
Why and overview
lukelbd Nov 25, 2019
6736ea6
Overview and why-proplot, split nb_setup() into 3 funcs
lukelbd Nov 26, 2019
e9e8634
Why proplot
lukelbd Nov 26, 2019
53aff70
Code qaulity, Colormap.from_list improvements, cyclic + transparent m…
lukelbd Nov 27, 2019
b08e52d
Merge branch 'master' into nbsphinx-docs
lukelbd Nov 27, 2019
1f4ba46
Physical units descrip
lukelbd Nov 27, 2019
f1d2e9d
Physical units
lukelbd Nov 27, 2019
0d5127e
Remove 'default' formatter, code quality fixes
lukelbd Nov 27, 2019
acffc34
Use setuptools_scm, no more hardcoded version / MANIFEST
lukelbd Nov 27, 2019
8743b85
Travis fix (just notebooks for now)
lukelbd Nov 27, 2019
b49f54f
Fix sphinx-build requirements
lukelbd Nov 27, 2019
ab0ca7e
Use conda for documentation build reqs
lukelbd Nov 27, 2019
c7dbcae
Fix conda activate
lukelbd Nov 27, 2019
d34d888
Fix proplot not found issue
lukelbd Nov 27, 2019
0c6d581
Bugfix (travis caught it! awesome!)
lukelbd Nov 27, 2019
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
2 changes: 1 addition & 1 deletion .codacy.yaml → .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
exclude_paths:
- 'docs/**'
- 'proplot/tests/**'
- 'proplot/fonts/**'
- 'proplot/colors/**'
- 'proplot/cycles/**'
- 'proplot/cmaps/**'
- 'proplot/cmaps_rejects/**'
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Strips notebook output for diffs and when staging files
# Download with 'pip install nbstripout'
# See: https://github.com/kynan/nbstripout
*.ipynb filter=nbstripout
*.ipynb diff=ipynb

7 changes: 7 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See: https://github.com/kynan/nbstripout
[diff "ipynb"]
textconv = nbstripout -t
[filter "nbstripout"]
clean = "f() { echo >&2 \"clean: nbstripout $1\"; nbstripout; }; f %f"
smudge = "f() { echo >&2 \"smudge: cat $1\"; cat; }; f %f"
required = true
20 changes: 9 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,29 @@
# PyPi stuff
build
dist
.eggs
*.egg-info

# Builds made during testing
# Local docs builds
docs/api
docs/_build

# Deleted
trash
notebooks*
garbage
# Notebook stuff
**/tests/*.ipynb
.ipynb_checkpoints

# Python extras
*.log
*.pyc
.*.pyc
__pycache__

# Notebooks
# NOTE: For now ignore, contributors just need RST files to build docs and
# have personal control over quickstart.
*.ipynb
.ipynb_checkpoints

# OS files
.DS_Store
.DS_Store?
._*
.Trashes

# Old files
trash
garbage
16 changes: 16 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# .readthedocs.yml
# Read the Docs configuration file
version: 2

# Sphinx config
sphinx:
builder: html
configuration: docs/conf.py

# Python config
build:
image: latest
python:
version: 3.6
conda:
environment: docs/environment.yml
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Travis Continuos Integration
# Currently only tests notebook files
# Based on http://conda.pydata.org/docs/travis.html
# Not sure why pip install . is necessary since conf.py adds it
# to the the path. Maybe nbsphinx executes in separate environment.
sudo: false # use container based build
language: python
notifications:
email: false

python:
- "3.6"

before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
- conda update -q conda
- conda info -a

install:
- conda env create -n proplot-dev --file docs/environment.yml
- source activate proplot-dev
- conda install pip
- conda list
- which conda
- which python
- pip install .
- python setup.py install --user

script:
- pushd docs
- make html
- popd

12 changes: 8 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
=================
Changelog History
Changelog history
=================

ProPlot v1.0.0
==============
First official release. Coming soon! Future changes and releases will be documented.
ProPlot v1.0
============
First official release (ETA: Spring 2020) after which we will start broadcasting this project more loudly. We will bump to this version when some major refactoring tasks have been completed.

ProPlot v0.1
============
This will be the first version when ProPlot is released on pypi. Changes thereafter will be listed here. Think of the v0 releases as "beta versions".

Internals/Minor Fixes
---------------------
Expand Down
200 changes: 200 additions & 0 deletions HOWTOCONTRIBUTE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
==================
Contribution guide
==================

Contributions are highly welcomed and appreciated. Every little help counts,
so do not hesitate! You can make a high impact on ProPlot just by using it and
reporting `issues <https://github.com/lukelbd/proplot/issues>`__.

The following sections cover some general guidelines
regarding development in ProPlot for maintainers and contributors.
Nothing here is set in stone and can't be changed.
Feel free to suggest improvements or changes in the workflow.

Feature requests and feedback
=============================

We are eager to hear about your requests for new features and any suggestions about the
API, infrastructure, and so on. Feel free to submit these as
`issues <https://github.com/lukelbd/proplot/issues/new>`__ with the label "feature."

Please make sure to explain in detail how the feature should work and keep the scope as
narrow as possible. This will make it easier to implement in small PRs.


Report bugs
===========

Report bugs for ProPlot in the `issue tracker <https://github.com/lukelbd/proplot/issues>`__
with the label "bug".

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting,
specifically the Python interpreter version, installed libraries, and ProPlot
version.
* Detailed steps to reproduce the bug.

If you can write a demonstration test that currently fails but *should* pass,
that is a very useful commit to make as well, even if you cannot fix the bug itself.


Fix bugs
========

Look through the `GitHub issues for bugs <https://github.com/lukelbd/proplot/labels/bug>`__.

Talk to developers to find out how you can fix specific bugs.

Write documentation
===================

ProPlot could always use better documentation. For small changes, you can edit documentation files directly in the GitHub web interface,
without using a local copy.

* The documentation is written in reStructuredText with `numpydoc <https://numpydoc.readthedocs.io/en/latest/>`__ style headers.
* The `default ReST role <https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-default_role>`__ is ``'py:obj'``. This is meant to encourage populating docstrings with links to the API reference. ProPlot uses `intersphinx <http://www.sphinx-doc.org/en/stable/ext/intersphinx.html>`__, so you can also link to sphinx documentation from other projects, e.g. matplotlib. In general, you should compress your links with a tilde, e.g. ``~path.to.function``.
* When editing the ipython notebooks found in ``docs``, make sure to put your example descriptions inside reStructedText cells, not markdown cells. This lets us populate the descriptions with sphinx links. See `this guide <https://nbsphinx.readthedocs.io/en/0.4.3/raw-cells.html#Usage>`__ for how to convert cells to ReST.

Some helpful ReST guides are located `here <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`__ and `here <https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst>`__.

.. note::
To build the documentation locally, use the following commands:

.. code:: bash

cd docs
pip install requirements.txt
make html

The built documentation should be available in the ``docs/_build/html``.

Preparing pull requests
=======================

#. Fork the
`proplot GitHub repository <https://github.com/lukelbd/proplot>`__. It's
fine to use ProPlot as your fork repository name because it will live
under your user.

#. Clone your fork locally using `git <https://git-scm.com/>`__, connect your repository
to the upstream (main project), and create a branch:

.. code-block:: bash

git clone git@github.com:YOUR_GITHUB_USERNAME/proplot.git
cd proplot
git remote add upstream git@github.com:lukelbd/proplot.git
git checkout -b your-bugfix-feature-branch-name master

If you need some help with git, follow the
`quick start guide <https://git.wiki.kernel.org/index.php/QuickStart>`__.

#. If you intend to make changes / add examples to the ipython notebooks,
you need to install and configure
`nbstripout <https://github.com/kynan/nbstripout>`__ with

.. code-block:: bash

cd proplot
pip install nbstripout
git config --local include.path ../.gitconfig

This strips notebook cell output when files are staged, which reduces the
repo storage size and lets us use
`nbsphinx <https://nbsphinx.readthedocs.io/en/0.4.3/>`__
to test each ``git push``, since ``nbsphinx`` must then re-run every cell.

The ``git config`` command associates the filters declared in
``proplot/.gitattributes`` with the operations described in ``proplot/.gitconfig``
by adding them to the *recognized* local configuration file
``proplot/.git/config``.

#. Make an editable install of ProPlot by running:

.. code-block:: bash

pip install -e .

This way when you ``import proplot``, your
local copy is used. Make sure matplotlib is already installed.

#. Break your edits up into reasonably sized commits.

.. code-block:: bash

git commit -a -m "<commit message>"
git push -u

The commit messages should be short, sweet, and use the imperative mood,
e.g. "Fix bug" instead of "Fixed bug".

..
#. Run all the tests. Now running tests is as simple as issuing this command:
.. code-block:: bash
coverage run --source proplot -m py.test
This command will run tests via the ``pytest`` tool against Python 3.7.

#. Create a new changelog entry in ``CHANGELOG.rst``:

- The entry should be entered as:

.. code-block::

<description> (:pr:`<PR number>`) `<author name>`_

where ``<description>`` is the description of the PR related to the change, ``<PR number>`` is the pull request number, and ``<author name>`` is your first and last name.

- Add yourself to list of authors at the end of ``CHANGELOG.rst`` file if not there yet, in alphabetical order.

#. Finally, submit a pull request through the GitHub website using this data:

.. code-block::

head-fork: YOUR_GITHUB_USERNAME/proplot
compare: your-branch-name

base-fork: lukelbd/proplot
base: master

Note that you can create the Pull Request while you're working on this. The PR will update
as you add more commits. ProPlot developers and contributors can then review your code
and offer suggestions.

Release procedure
=================

ProPlot will follow semantic versioning, e.g. v1.0.0. A major version causes incompatible
API changes, a minor version adds functionality, and a patch covers bug fixes.

#. Create a new branch ``release-vX.x.x`` with the version for the release.

#. Update ``CHANGELOG.rst``, and make sure all new changes, features are reflected in the documentation.

#. Open a new pull request for this branch targeting ``master``.

#. After all tests pass and the PR has been approved, merge the PR into ``master``.

#. Pull down the new version of master:

.. code-block:: bash

git checkout master
git pull

#. Tag a release and push to github:

.. code-block:: bash

git tag -a v1.0.0 -m "Version 1.0.0"
git push origin master --tags

#. Build and publish release on PyPI:

.. code-block:: bash

git clean -xfd # remove files not checked into git
python setup.py sdist bdist_wheel --universal # build package
twine upload dist/* # register and push to pypi

24 changes: 0 additions & 24 deletions HOWTORELEASE.rst

This file was deleted.

14 changes: 14 additions & 0 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installation
============

This package is a work-in-progress -- currently, there is no formal release
on PyPi (ETA: January 2020). For the time being, you may install directly from Github using:

.. code-block:: bash

pip install git+https://github.com/lukelbd/proplot.git

To upgrade to the latest version, run ``pip uninstall proplot``, then re-install.

The dependencies are `matplotlib <https://matplotlib.org/>`__ and `numpy <http://www.numpy.org/>`__. The optional geographic mapping features require `cartopy <https://scitools.org.uk/cartopy/docs/latest/>`__ and/or `basemap <https://matplotlib.org/basemap/index.html>`__.

Loading