Skip to content

Commit

Permalink
Merge pull request #34 from materials-data-facility/forge-dev
Browse files Browse the repository at this point in the history
Forge dev
  • Loading branch information
jgaff authored Jan 18, 2019
2 parents b9950f8 + 38e7b3e commit d300774
Show file tree
Hide file tree
Showing 28 changed files with 2,444 additions and 1,932 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Untitled*.ipynb

*temp/*

*/build/*
*/dist/*
**/build/
**/dist/
*.egg*

travis.tar
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ pip install -e .
```

# Documentation and examples
Forge documentation can be found on [Read the Docs](http://mdf-forge.readthedocs.io/en/master/).
Tutorials and examples can be found in the `docs` directory. The Jupyter notebooks can be viewed on GitHub or run interactively with ![Jupyter](http://jupyter.org/install).
Forge documentation can be found on [Read the Docs](https://mdf-forge.readthedocs.io/en/master/) and [GitHub](https://github.com/materials-data-facility/forge/tree/master/docs/).
Tutorials and examples can be found in the `docs` directory. The Jupyter notebooks can be viewed on GitHub or run interactively with [Jupyter](http://jupyter.org/install).

# Requirements
* Forge requires Python 3.5 or greater.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Aggregating data with MDF"
"# Example Aggregations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Aggregating data with MDF"
]
},
{
Expand Down Expand Up @@ -37,7 +44,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## aggregate_source - NIST XPS DB\n",
"### aggregate_source - NIST XPS DB\n",
"Example: We want to collect all records from the NIST XPS Database and analyze the binding energies. This database has almost 30,000 records, so we have to use `aggregate()`."
]
},
Expand Down Expand Up @@ -152,7 +159,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## aggregate - Multiple Datasets\n",
"### aggregate - Multiple Datasets\n",
"Example: We want to analyze how often elements are studied with Gallium (Ga), and what the most frequent elemental pairing is. There are more than 10,000 records containing Gallium data."
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example Statistics\n",
"# Example Statistics - MDF Datasets\n",
"Example: We want to know how many datasets are in MDF and which datasets have the most records.\n",
"\n",
"## Note: This example is not kept up-to-date with the latest statistics.\n",
"**Note: This example is not kept up-to-date with the latest statistics.**\n",
"\n",
"If you want the current MDF statistics, you must run this code yourself."
]
},
Expand Down
44 changes: 21 additions & 23 deletions docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,19 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../../..'))
sys.path.insert(0, os.path.abspath('../../../mdf_forge'))
sys.path.insert(0, os.path.abspath('../../../tests'))
import sphinx_bootstrap_theme


# -- Project information -----------------------------------------------------

project = 'MDF Forge'
copyright = 'Apache License, Version 2.0'
author = 'Jonathon Gaff'
copyright = '2018, The University of Chicago'
author = 'The University of Chicago'

# The short X.Y version
version = '0.5'
version = ''
# The full version, including alpha/beta/rc tags
release = '0.5.1'
release = ''


# -- General configuration ---------------------------------------------------
Expand All @@ -42,11 +38,12 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.ifconfig',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.mathjax',
'IPython.sphinxext.ipython_console_highlighting',
'm2r',
'nbsphinx'
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -68,7 +65,7 @@
# '.md': CommonMarkParser,
# }

source_suffix = ['.rst', '.md']
source_suffix = ['.rst', '.md', '.ipynb']

# The master toctree document.
master_doc = 'index'
Expand All @@ -83,7 +80,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
exclude_patterns = ['_build', '**.ipynb_checkpoints']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
Expand All @@ -93,7 +90,7 @@
# You may only specify the root package of the dependencies themselves and ommit the sub-modules:
# See also:
# http://www.sphinx-doc.org/en/stable/ext/autodoc.html#confval-autodoc_mock_importshttps://github.com/sphinx-doc/sphinx/issues/4182
autodoc_mock_imports = ['mdf_toolbox', 'pytest', 'globus_sdk.exc']
# autodoc_mock_imports = ['mdf_toolbox', 'pytest', 'globus_sdk.exc']

# This value selects what content will be inserted into the main body of an autoclass directive.
# The possible values are:
Expand All @@ -102,7 +99,7 @@
# to autoclass.
# “both”: Both the class ’ and the init method’s docstring are concatenated and inserted.
# “init”: Only the init method’s docstring is inserted.
autoclass_content = 'both'
# autoclass_content = 'class'

# -- Options for HTML output -------------------------------------------------

Expand All @@ -111,18 +108,19 @@
# List of themes: basic, alabaster, classic, sphinxdoc, scrolls, agoago, nature,
# pyramid, haiku, traditional, epub, bizstyle
#
html_theme = 'sphinxdoc'
html_theme = 'bootstrap'

# 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
# documentation.
#
# html_theme_options = {}
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()

# 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 = ['_static']
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -164,7 +162,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'mdf-forge.tex', u'mdf-forge Documentation',
(master_doc, 'mdf-forge.tex', 'mdf-forge Documentation',
'Jonathon Gaff', 'manual'),
]

Expand All @@ -174,7 +172,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'mdf-forge', u'mdf-forge Documentation',
(master_doc, 'mdf-forge', 'mdf-forge Documentation',
[author], 1)
]

Expand All @@ -187,7 +185,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'mdf-forge', u'mdf-forge Documentation',
(master_doc, 'mdf-forge', 'mdf-forge Documentation',
author, 'mdf-forge', 'One line description of project.',
'Miscellaneous'),
]
Expand All @@ -208,7 +206,7 @@
# see http://www.sphinx-doc.org/en/stable/ext/napoleon.html
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = False
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
Expand Down
8 changes: 8 additions & 0 deletions docs/sphinx/source/example_list.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Forge Examples
==============

.. toctree::

examples/Example_Aggregations
examples/Example_Statistics-MDF_Datasets

1 change: 1 addition & 0 deletions docs/sphinx/source/examples
56 changes: 0 additions & 56 deletions docs/sphinx/source/forge_quickstart.rst

This file was deleted.

113 changes: 9 additions & 104 deletions docs/sphinx/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,110 +1,15 @@
.. highlight:: rst

MDF Forge
=========

Forge is the Materials Data Facility Python package to interface and
leverage the MDF Data Discovery service. Forge allows users to perform
simple queries and facilitiates moving and synthesizing results.
Index
=====

.. toctree::
:titlesonly:
.. toctree::
:maxdepth: 2
:titlesonly:

forge_quickstart

Installation
============

.. code-block:: bash
pip install mdf_forge
.. toctree::
:titlesonly:

installation_guide.rst

For Developers
--------------

.. image:: https://img.shields.io/pypi/v/mdf_forge.svg
:target: https://pypi.python.org/pypi/mdf-forge
.. image:: https://travis-ci.org/materials-data-facility/forge.svg?branch=master
:target: https://travis-ci.org/materials-data-facility/forge
.. image:: https://coveralls.io/repos/github/materials-data-facility/forge/badge.svg?branch=master
:target: https://coveralls.io/github/materials-data-facility/forge?branch=master

.. code-block:: bash
git clone https://github.com/materials-data-facility/forge.git
cd forge
pip install -e .
.. toctree::
:maxdepth: 2

requirements_link
mdf_forge

Documentation and examples
==========================

Documentation, including tutorials and examples, can be found in the
``docs`` directory.

Tutorials
---------

#. Introduction (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/tutorials/1%20-%20Introduction.ipynb/>`_)
#. Core Query Builder Functions (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/tutorials/2%20-%20Core%20Query%20Builder%20Functions.ipynb/>`_)
#. Expanded Query Builder Functions (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/tutorials/3%20-%20Expanded%20Query%20Builder%20Functions.ipynb/>`_)
#. General Helper Functions (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/tutorials/4%20-%20General%20Helper%20Functions.ipynb/>`_)
#. Field-Specific Helper Functions (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/tutorials/5%20-%20Field-Specific%20Helper%20Functions.ipynb/>`_)
#. Data Retrieval Functions (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/tutorials/6%20-%20Data%20Retrieval%20Functions.ipynb/>`_)

Examples
--------

#. Example Aggregations (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/examples/Example%20Aggregations.ipynb/>`_)
#. Example Statistics - MDF Datasets (`Jupyter Notebook <https://github.com/materials-data-facility/forge/blob/master/docs/examples/Example%20Statistics%20-%20MDF%20Datasets.ipynb/>`_)

Requirements
============

- Forge requires Python 2.7 or >=3.3
- To access data in the MDF, you must have an account recognized by
Globus Auth (including Google, ORCiD, many academic institutions, or
a `free Globus ID`_).

Contributions
=============

If you find a bug or want a feature, feel free to open an issue here on
GitHub (and please tag it accordingly). If you want to contribute code
yourself, we’re more than happy to accept merge requests.

Support
=======

This work was performed under financial assistance award 70NANB14H012
from U.S. Department of Commerce, National Institute of Standards and
Technology as part of the `Center for Hierarchical Material Design
(CHiMaD)`_. This work was also supported by the National Science
Foundation as part of the `Midwest Big Data Hub`_ under NSF Award
Number: 1636950 “BD Spokes: SPOKE: MIDWEST: Collaborative: Integrative
Materials Design (IMaD): Leverage, Innovate, and Disseminate”.

.. _free Globus ID: https://www.globusid.org/create
.. _Center for Hierarchical Material Design (CHiMaD): http://chimad.northwestern.edu
.. _Midwest Big Data Hub: http://midwestbigdatahub.org

----

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

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
MDF Forge Client <mdf_forge>
Tutorials <tutorial_list>
Examples <example_list>


.. mdinclude:: ../../../README.md
Loading

0 comments on commit d300774

Please sign in to comment.