Skip to content

Commit

Permalink
Merge pull request #15 from jarrodmillman/doc-refactor
Browse files Browse the repository at this point in the history
Doc refactor
  • Loading branch information
jarrodmillman committed Apr 1, 2018
2 parents 4ee091c + c067c5d commit 845007c
Show file tree
Hide file tree
Showing 22 changed files with 138 additions and 65 deletions.
58 changes: 58 additions & 0 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Install
=======

NetworkX requires Python 3.4, 3.5, or 3.6. If you do not already
have a Python environment configured on your computer, please see the
instructions for installing the full `scientific Python stack
<https://scipy.org/install.html>`_.

.. note::
If you are on Windows and want to install optional packages (e.g., `scipy`),
then you will need to install a Python distribution such as
`Anaconda <https://www.anaconda.com/download/>`_,
`Enthought Canopy <https://www.enthought.com/product/canopy>`_,
`Python(x,y) <http://python-xy.github.io/>`_,
`WinPython <https://winpython.github.io/>`_, or
`Pyzo <http://www.pyzo.org/>`_.
If you use one of these Python distribution, please refer to their online
documentation.

Below we assume you have the default Python environment already configured on
your computer and you intend to install ``grave`` inside of it. If you want
to create and work with Python virtual environments, please follow instructions
on `venv <https://docs.python.org/3/library/venv.html>`_ and `virtual
environments <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_.

First, make sure you have the latest version of ``pip`` (the Python package manager)
installed. If you do not, refer to the `Pip documentation
<https://pip.pypa.io/en/stable/installing/>`_ and install ``pip`` first.

Install the released version
----------------------------

To be added.

Install the development version
-------------------------------

If you have `Git <https://git-scm.com/>`_ installed on your system, it is also
possible to install the development version of ``networkx``.

Before installing the development version, you may need to uninstall the
standard version of ``grave`` using ``pip``::

$ pip uninstall grave

Then do::

$ git clone https://github.com/networkx/grave.git
$ cd grave
$ pip install -e .

The ``pip install -e .`` command allows you to follow the development branch as
it changes by creating links in the right places and installing the command
line scripts to the appropriate locations.

Then, if you want to update ``grave`` at any time, in the same directory do::

$ git pull
57 changes: 31 additions & 26 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
BSD 3-Clause License
License
=======

Copyright (c) 2018, NetworkX: Python software for complex networks
All rights reserved.
Grave is distributed with the 3-clause BSD license.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
::

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2018, Grave---Dead simple graph visualization
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</table>
</div>

GraVE is a Graph Visualization Package combining ideas from
Grave is a Graph Visualization Package combining ideas from
Matplotlib, NetworkX, and seaborn. Its goal is to provide a
network drawing API that covers the most use cases with sensible
defaults and simple style configuration. Currently, it supports
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = GraVE
SPHINXPROJ = Grave
SOURCEDIR = .
BUILDDIR = _build

Expand Down
4 changes: 2 additions & 2 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The GraVE API
=============
Reference
=========

Basic Plotting
--------------
Expand Down
23 changes: 11 additions & 12 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# GraVE documentation build configuration file, created by
# Grave documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 28 22:56:04 2018.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -35,7 +35,6 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
Expand All @@ -61,9 +60,9 @@
master_doc = 'index'

# General information about the project.
project = 'GraVE'
copyright = '2018, GraVE developers'
author = 'GraVE developers'
project = 'Grave'
copyright = '2018, Grave developers'
author = 'Grave developers'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -130,7 +129,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'GraVEdoc'
htmlhelp_basename = 'Gravedoc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -157,8 +156,8 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'GraVE.tex', 'GraVE Documentation',
'GraVE developers', 'manual'),
(master_doc, 'Grave.tex', 'Grave Documentation',
'Grave developers', 'manual'),
]


Expand All @@ -167,7 +166,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'grave', 'GraVE Documentation',
(master_doc, 'grave', 'Grave Documentation',
[author], 1)
]

Expand All @@ -178,8 +177,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'GraVE', 'GraVE Documentation',
author, 'GraVE', 'One line description of project.',
(master_doc, 'Grave', 'Grave Documentation',
author, 'Grave', 'Dead simple graph visualization.',
'Miscellaneous'),
]

Expand Down Expand Up @@ -210,4 +209,4 @@
'sklearn': ('http://scikit-learn.org/stable', None),
'sphinx': ('http://www.sphinx-doc.org/en/stable', None),
'networkx': ('https://networkx.github.io/', None),
}
}
1 change: 1 addition & 0 deletions doc/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Developer Guide

contribute
gitwash/index
notes
File renamed without changes.
13 changes: 3 additions & 10 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
GraVE - Dead simple graph visualization
Grave---Dead simple graph visualization
=======================================

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

install
api
developer/index
license
gallery/index
notes

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
1 change: 1 addition & 0 deletions doc/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../INSTALL.rst
1 change: 1 addition & 0 deletions doc/license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../LICENSE
2 changes: 1 addition & 1 deletion doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=GraVE
set SPHINXPROJ=Grave

if "%1" == "" goto help

Expand Down
2 changes: 1 addition & 1 deletion examples/plot_dominators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
GraVE Documentation
Grave Documentation
-------------------
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_jarrod_graphxd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
GraVE Documentation
Grave Documentation
-------------------
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Different layouts
=================
GraVE supports different layouts by default.
Grave supports different layouts by default.
"""

import networkx as nx
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_layout_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Using a custom layout
=====================
The default layouts available through GraVE may not be sufficient for ones
need. Hence, GraVE also support custom layouts.
The default layouts available through Grave may not be sufficient for ones
need. Hence, Grave also support custom layouts.
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/plot_use_attributes_centrality.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
GraVE Documentation
Grave Documentation
-------------------
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/sprint_notes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
GraVE Documentation
Grave Documentation
-------------------
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/sprint_notes2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
GraVE Documentation
Grave Documentation
-------------------
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/style_attr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
GraVE Documentation
Grave Documentation
-------------------
"""
Expand Down
15 changes: 15 additions & 0 deletions grave/tests/test_grave.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pytest

import networkx as nx

import matplotlib as mpl
mpl.use('PS', warn=False)
import matplotlib.pyplot as plt
plt.rcParams['text.usetex'] = False

from grave import plot_network


def test_empty_graph():
G = nx.barbell_graph(10, 14)
plot_network(G)
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from setuptools import setup
from setuptools import find_packages

setup(name = "GraVE",
setup(name = "Grave",
version = "0.0.1",
description = "Dead simple graph visualization",
long_description = "GraVE is a Graph Visualization Package "\
long_description = "Grave is a Graph Visualization Package "\
"combining ideas from Matplotlib and NetworkX",
url = "http://github.com/networkx/grave",
author = "NetworkX Developers",
author = "Grave Developers",
author_email = "networkx-discuss@googlegroups.com",
license = "BSD",
packages = find_packages(),
Expand Down

0 comments on commit 845007c

Please sign in to comment.