Skip to content

Commit

Permalink
Merge pull request #47 from KrishnaswamyLab/dev
Browse files Browse the repository at this point in the history
graphtools v1.4.0
  • Loading branch information
scottgigante authored Nov 11, 2019
2 parents 275c104 + 0c884ce commit 6b61152
Show file tree
Hide file tree
Showing 20 changed files with 2,003 additions and 1,348 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

script:
- pip install -U .[test]
- if [ "$TRAVIS_PYTHON_VERSION" != "3.5" ]; then black . --check --diff; fi
- python setup.py test
- pip install -U .[doc]
- cd doc; make html
Expand Down
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

Contributing to graphtools
============================

There are many ways to contribute to `graphtools`, with the most common ones
being contribution of code or documentation to the project. Improving the
documentation is no less important than improving the library itself. If you
find a typo in the documentation, or have made improvements, do not hesitate to
submit a GitHub pull request.

But there are many other ways to help. In particular answering queries on the
[issue tracker](https://github.com/KrishnaswamyLab/graphtools/issues),
investigating bugs, and [reviewing other developers' pull
requests](https://github.com/KrishnaswamyLab/graphtools/pulls)
are very valuable contributions that decrease the burden on the project
maintainers.

Another way to contribute is to report issues you're facing, and give a "thumbs
up" on issues that others reported and that are relevant to you. It also helps
us if you spread the word: reference the project from your blog and articles,
link to it from your website, or simply star it in GitHub to say "I use it".

Code Style and Testing
----------------------

`graphtools` is maintained at close to 100% code coverage. Contributors are encouraged to write tests for their code, but if you do not know how to do so, please do not feel discouraged from contributing code! Others can always help you test your contribution.

Code style is dictated by [`black`](https://pypi.org/project/black/#installation-and-usage). To automatically reformat your code when you run `git commit`, you can run `./autoblack.sh` in the root directory of this project to add a hook to your `git` repository.

Code of Conduct
---------------

We abide by the principles of openness, respect, and consideration of others
of the Python Software Foundation: https://www.python.org/psf/codeofconduct/.

Attribution
---------------

This `CONTRIBUTING.md` was adapted from [scikit-learn](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md).
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ graphtools
.. image:: https://img.shields.io/github/stars/KrishnaswamyLab/graphtools.svg?style=social&label=Stars
:target: https://github.com/KrishnaswamyLab/graphtools/
:alt: GitHub stars
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: black

Tools for building and manipulating graphs in Python.

Expand Down
14 changes: 14 additions & 0 deletions autoblack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cat <<EOF >> .git/hooks/pre-commit
#!/bin/sh
set -e
files=\$(git diff --staged --name-only --diff-filter=d -- "*.py")
for file in \$files; do
black -q \$file
git add \$file
done
EOF
chmod +x .git/hooks/pre-commit

78 changes: 44 additions & 34 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))

root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.insert(0, root_dir)
# print(sys.path)

# -- General configuration ------------------------------------------------
Expand All @@ -31,40 +33,43 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinxcontrib.bibtex']
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.doctest",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinxcontrib.bibtex",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['ytemplates']
templates_path = ["ytemplates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'graphtools'
copyright = '2018 Krishnaswamy Lab, Yale University'
author = 'Jay Stanley and Scott Gigante, Krishnaswamy Lab, Yale University'
project = "graphtools"
copyright = "2018 Krishnaswamy Lab, Yale University"
author = "Scott Gigante and Jay Stanley, Yale University"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1.3'
version_py = os.path.join(root_dir, "graphtools", "version.py")
# The full version, including alpha/beta/rc tags.
release = '0.1.3'
release = open(version_py).read().strip().split("=")[-1].replace('"', "").strip()
# The short X.Y version.
version = release.split("-")[0]

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -79,7 +84,7 @@
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -90,7 +95,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = "default"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -101,13 +106,13 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['ystatic']
html_static_path = ["ystatic"]


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'graphtoolsdoc'
htmlhelp_basename = "graphtoolsdoc"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -116,15 +121,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -134,19 +136,21 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'graphtools.tex', 'graphtools Documentation',
'Jay Stanley and Scott Gigante, Krishnaswamy Lab, Yale University', 'manual'),
(
master_doc,
"graphtools.tex",
"graphtools Documentation",
"Scott Gigante and Jay Stanley, Yale University",
"manual",
),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'graphtools', 'graphtools Documentation',
[author], 1)
]
man_pages = [(master_doc, "graphtools", "graphtools Documentation", [author], 1)]


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -155,7 +159,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'graphtools', 'graphtools Documentation',
author, 'graphtools', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"graphtools",
"graphtools Documentation",
author,
"graphtools",
"One line description of project.",
"Miscellaneous",
),
]
6 changes: 5 additions & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ graphtools

<a href="https://github.com/KrishnaswamyLab/graphtools/"><img src="https://img.shields.io/github/stars/KrishnaswamyLab/graphtools.svg?style=social&label=Stars" alt="GitHub stars"></a>

.. raw:: html

<a href="https://github.com/psf/black/"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"></a>

Tools for building and manipulating graphs in Python.

.. toctree::
Expand Down Expand Up @@ -65,4 +69,4 @@ To use `graphtools` with `pygsp`, create a `graphtools.Graph` class with `use_py
Help
====

If you have any questions or require assistance using graphtools, please contact us at https://krishnaswamylab.org/get-help
If you have any questions or require assistance using graphtools, please contact us at https://krishnaswamylab.org/get-help
Loading

0 comments on commit 6b61152

Please sign in to comment.