Skip to content

Commit

Permalink
Moved examples/ to src/microstructpy/examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kip-hart committed Nov 7, 2019
1 parent 3a61bde commit d41d7e8
Show file tree
Hide file tree
Showing 51 changed files with 97 additions and 89 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.

`1.1.2`_ - 2019-11-07
---------------------
Fixed
'''''
- Paths to demo files in CLI, moved into source directory.

`1.1.1`_ - 2019-11-05
---------------------
Added
Expand Down Expand Up @@ -51,7 +57,8 @@ Added

.. LINKS
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.1.1...HEAD
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.1.2...HEAD
.. _`1.1.2`: https://github.com/kip-hart/MicroStructPy/compare/v1.1.1...v1.1.2
.. _`1.1.1`: https://github.com/kip-hart/MicroStructPy/compare/v1.1.0...v1.1.1
.. _`1.1.0`: https://github.com/kip-hart/MicroStructPy/compare/v1.0.1...v1.1.0
.. _`1.0.1`: https://github.com/kip-hart/MicroStructPy/compare/v1.0.0...v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
graft docs
graft examples
graft src
graft tests

Expand All @@ -16,12 +15,13 @@ include requirements.txt

prune docs/source/auto_examples
prune docs/build*
prune src/*/examples/*
prune tests/tmp_out
prune examples/*
prune *.yml

exclude examples/*.png
include examples/aluminum_micro.png
exclude examples/*.txt
exclude src/*/examples/.gitignore

global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store *.log Icon*
2 changes: 1 addition & 1 deletion docs/source/cli/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The three fields of the input file that MicroStructPy looks for are:
``<material>``, ``<domain>``, and ``<settings>`` (optional).
For example:

.. literalinclude:: ../../../examples/minimal_paired.xml
.. literalinclude:: ../../../src/microstructpy/examples/minimal_paired.xml
:language: xml


Expand Down
2 changes: 1 addition & 1 deletion docs/source/cli/material.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Single Material
MicroStructPy supports an arbitrary number of materials, including just one.
For example:

.. literalinclude:: ../../../examples/minimal.xml
.. literalinclude:: ../../../src/microstructpy/examples/minimal.xml
:language: xml

This input file will produce a microstructure with nearly circular grains
Expand Down
10 changes: 5 additions & 5 deletions docs/source/examples/cli/basalt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The file can be run using this command::

The full text of the file is:

.. literalinclude:: ../../../../examples/basalt_circle.xml
.. literalinclude:: ../../../../src/microstructpy/examples/basalt_circle.xml
:language: xml


Expand Down Expand Up @@ -72,19 +72,19 @@ These three plots are shown in
:numref:`f_ex_basalt_seeds` - :numref:`f_ex_basalt_tri`.

.. _f_ex_basalt_seeds:
.. figure:: ../../../../examples/basalt_circle/seeds.png
.. figure:: ../../../../src/microstructpy/examples/basalt_circle/seeds.png
:alt: Seed geometries.

Picritic basalt example - seed geometries

.. _f_ex_basalt_poly:
.. figure:: ../../../../examples/basalt_circle/polymesh.png
.. figure:: ../../../../src/microstructpy/examples/basalt_circle/polymesh.png
:alt: Polygonal mesh.

Picritic basalt example - polygonal mesh

.. _f_ex_basalt_tri:
.. figure:: ../../../../examples/basalt_circle/trimesh.png
.. figure:: ../../../../src/microstructpy/examples/basalt_circle/trimesh.png
:alt: Triangular mesh.

Picritic basalt example - triangular mesh
Expand All @@ -94,7 +94,7 @@ generated by MicroStructPy.
The grain size distribution comparison is given in :numref:`f_ex_basalt_verif`.

.. _f_ex_basalt_verif:
.. figure:: ../../../../examples/basalt_circle/verification/size_cdf.png
.. figure:: ../../../../src/microstructpy/examples/basalt_circle/verification/size_cdf.png
:alt: Comparing input and output CSDs.

Picritic basalt example - input and output crystal size
Expand Down
8 changes: 4 additions & 4 deletions docs/source/examples/cli/colormap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The file can be run using this command::

The full text of the script is:

.. literalinclude:: ../../../../examples/colormap.xml
.. literalinclude:: ../../../../src/microstructpy/examples/colormap.xml
:language: xml


Expand Down Expand Up @@ -63,19 +63,19 @@ These three plots are shown in :numref:`f_ex_colormap_seeds` -
:numref:`f_ex_colormap_tri`.

.. _f_ex_colormap_seeds:
.. figure:: ../../../../examples/colormap/seeds.png
.. figure:: ../../../../src/microstructpy/examples/colormap/seeds.png
:alt: Seed geometries.

Colormap example - seed geometries.

.. _f_ex_colormap_poly:
.. figure:: ../../../../examples/colormap/polymesh.png
.. figure:: ../../../../src/microstructpy/examples/colormap/polymesh.png
:alt: Polygonal mesh.

Colormap example - polygonal mesh.

.. _f_ex_colormap_tri:
.. figure:: ../../../../examples/colormap/trimesh.png
.. figure:: ../../../../src/microstructpy/examples/colormap/trimesh.png
:alt: Triangular mesh.

Colormap example - triangular mesh.
Expand Down
8 changes: 4 additions & 4 deletions docs/source/examples/cli/elliptical_grains.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The file can be run using this command::

The full text of the file is:

.. literalinclude:: ../../../../examples/elliptical_grains.xml
.. literalinclude:: ../../../../src/microstructpy/examples/elliptical_grains.xml
:language: xml


Expand Down Expand Up @@ -73,19 +73,19 @@ These three plots are shown in :numref:`f_ex_ell_seeds` -
:numref:`f_ex_ell_tri`.

.. _f_ex_ell_seeds:
.. figure:: ../../../../examples/elliptical_grains/seeds.png
.. figure:: ../../../../src/microstructpy/examples/elliptical_grains/seeds.png
:alt: Seed geometries.

Elliptical grain example - seed geometries.

.. _f_ex_ell_poly:
.. figure:: ../../../../examples/elliptical_grains/polymesh.png
.. figure:: ../../../../src/microstructpy/examples/elliptical_grains/polymesh.png
:alt: Polygonal mesh.

Elliptical grain example - polygonal mesh.

.. _f_ex_ell_tri:
.. figure:: ../../../../examples/elliptical_grains/trimesh.png
.. figure:: ../../../../src/microstructpy/examples/elliptical_grains/trimesh.png
:alt: Triangular mesh.

Elliptical grain example - triangular mesh.
Expand Down
8 changes: 4 additions & 4 deletions docs/source/examples/cli/minimal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The file can be run using this command::

The full text of the file is:

.. literalinclude:: ../../../../examples/minimal_paired.xml
.. literalinclude:: ../../../../src/microstructpy/examples/minimal_paired.xml
:language: xml


Expand Down Expand Up @@ -55,19 +55,19 @@ These three plots are shown in :numref:`f_ex_min_seeds` -
:numref:`f_ex_min_tri`.

.. _f_ex_min_seeds:
.. figure:: ../../../../examples/minimal/seeds.png
.. figure:: ../../../../src/microstructpy/examples/minimal/seeds.png
:alt: Seed geometries.

Minimal example - seed geometries.

.. _f_ex_min_poly:
.. figure:: ../../../../examples/minimal/polymesh.png
.. figure:: ../../../../src/microstructpy/examples/minimal/polymesh.png
:alt: Polygonal mesh.

Minimal example - polygonal mesh.

.. _f_ex_min_tri:
.. figure:: ../../../../examples/minimal/trimesh.png
.. figure:: ../../../../src/microstructpy/examples/minimal/trimesh.png
:alt: Triangular mesh.

Minimal example - triangular mesh.
8 changes: 4 additions & 4 deletions docs/source/examples/cli/two_phase_3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The file can be run using this command::

The full text of the file is:

.. literalinclude:: ../../../../examples/two_phase_3D.xml
.. literalinclude:: ../../../../src/microstructpy/examples/two_phase_3D.xml
:language: xml


Expand Down Expand Up @@ -54,19 +54,19 @@ These three plots are shown in :numref:`f_ex_2p3d_seeds` -
:numref:`f_ex_2p3d_tri`.

.. _f_ex_2p3d_seeds:
.. figure:: ../../../../examples/two_phase_3D/seeds.png
.. figure:: ../../../../src/microstructpy/examples/two_phase_3D/seeds.png
:alt: Seed geometries.

Two phase 3D example - seed geometries.

.. _f_ex_2p3d_poly:
.. figure:: ../../../../examples/two_phase_3D/polymesh.png
.. figure:: ../../../../src/microstructpy/examples/two_phase_3D/polymesh.png
:alt: Polygonal mesh.

Two phase 3D example - polygonal mesh.

.. _f_ex_2p3d_tri:
.. figure:: ../../../../examples/two_phase_3D/trimesh.png
.. figure:: ../../../../src/microstructpy/examples/two_phase_3D/trimesh.png
:alt: Triangular mesh.

Two phase 3D example - triangular mesh.
36 changes: 18 additions & 18 deletions docs/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,37 @@ Input File Introduction

.. only:: html

.. image:: ../../../examples/intro_1_basic/trimesh.png
.. image:: ../../../src/microstructpy/examples/intro_1_basic/trimesh.png
:alt: Triangular mesh from first intro example.
:width: 32%
:target: intro/intro_1.html


.. image:: ../../../examples/intro_2_quality/trimesh.png
.. image:: ../../../src/microstructpy/examples/intro_2_quality/trimesh.png
:alt: Triangular mesh from second intro example.
:width: 32%
:target: intro/intro_2.html


.. image:: ../../../examples/intro_3_size_shape/trimesh.png
.. image:: ../../../src/microstructpy/examples/intro_3_size_shape/trimesh.png
:alt: Triangular mesh from third intro example.
:width: 32%
:target: intro/intro_3.html


.. image:: ../../../examples/intro_4_oriented/trimesh.png
.. image:: ../../../src/microstructpy/examples/intro_4_oriented/trimesh.png
:alt: Triangular mesh from fourth intro example.
:width: 32%
:target: intro/intro_4.html


.. image:: ../../../examples/intro_5_plotting/trimesh.png
.. image:: ../../../src/microstructpy/examples/intro_5_plotting/trimesh.png
:alt: Triangular mesh from fifth intro example.
:width: 32%
:target: intro/intro_5.html


.. image:: ../../../examples/intro_6_culmination/trimesh.png
.. image:: ../../../src/microstructpy/examples/intro_6_culmination/trimesh.png
:alt: Triangular mesh from sixth intro example.
:width: 32%
:target: intro/intro_6.html
Expand All @@ -78,27 +78,27 @@ CLI Examples

.. only:: html

.. image:: ../../../examples/elliptical_grains/trimesh.png
.. image:: ../../../src/microstructpy/examples/elliptical_grains/trimesh.png
:alt: Triangular mesh with elliptical grains.
:width: 64%
:target: cli/elliptical_grains.html

.. image:: ../../../examples/minimal/polymesh.png
.. image:: ../../../src/microstructpy/examples/minimal/polymesh.png
:alt: Polygonal mesh from minimal example.
:width: 32%
:target: cli/minimal.html

.. image:: ../../../examples/basalt_circle/trimesh.png
.. image:: ../../../src/microstructpy/examples/basalt_circle/trimesh.png
:alt: Triangular mesh from basalt example.
:width: 32%
:target: cli/basalt.html

.. image:: ../../../examples/two_phase_3D/polymesh.png
.. image:: ../../../src/microstructpy/examples/two_phase_3D/polymesh.png
:alt: Polygonal mesh from 3D two phase example.
:width: 32%
:target: cli/two_phase_3d.html

.. image:: ../../../examples/colormap/trimesh.png
.. image:: ../../../src/microstructpy/examples/colormap/trimesh.png
:alt: Triangular mesh from 3D colormap example.
:width: 32%
:target: cli/colormap.html
Expand All @@ -123,36 +123,36 @@ Python Package Examples

.. only:: html

.. image:: ../../../examples/standard_voronoi/voronoi_diagram.png
.. image:: ../../../src/microstructpy/examples/standard_voronoi/voronoi_diagram.png
:alt: Standard Voronoi diagram.
:height: 210px
:target: package/standard_voronoi.html

.. image:: ../../../examples/uniform_seeding/voronoi_diagram.png
.. image:: ../../../src/microstructpy/examples/uniform_seeding/voronoi_diagram.png
:alt: Voronoi diagram with uniformly-spaced seeds, colored by area.
:height: 210px
:target: package/uniform_seeding.html

.. image:: ../../../examples/foam/trimesh.png
.. image:: ../../../src/microstructpy/examples/foam/trimesh.png
:alt: Mesh of foam microstructure.
:height: 210px
:target: package/foam.html

.. image:: ../../../examples/logo/logo.png
.. image:: ../../../src/microstructpy/examples/logo/logo.png
:alt: MicroStructPy logo.
:height: 210px
:target: package/logo.html

.. image:: ../../../examples/grain_neighborhoods/trimesh.png
.. image:: ../../../src/microstructpy/examples/grain_neighborhoods/trimesh.png
:alt: Triangular mesh of microstructure with seed neighborhoods.
:height: 210px
:target: package/grain_neighborhoods.html

.. image:: ../../../examples/from_image/trimesh.png
.. image:: ../../../src/microstructpy/examples/from_image/trimesh.png
:alt: Triangular mesh of aluminum microstructure.
:height: 210px
:target: package/from_image.html

.. image:: ../../../examples/docs_banner/banner.png
.. image:: ../../../src/microstructpy/examples/docs_banner/banner.png
:alt: Microstructure meshing process..
:target: package/mesh_process.html
8 changes: 4 additions & 4 deletions docs/source/examples/intro/intro_1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The file can be run using this command::

The full text of the file is:

.. literalinclude:: ../../../../examples/intro_1_basic.xml
.. literalinclude:: ../../../../src/microstructpy/examples/intro_1_basic.xml
:language: xml


Expand Down Expand Up @@ -66,19 +66,19 @@ These three plots are shown in :numref:`f_ex_1_basic_seeds` -
:numref:`f_ex_1_basic_tri`.

.. _f_ex_1_basic_seeds:
.. figure:: ../../../../examples/intro_1_basic/seeds.png
.. figure:: ../../../../src/microstructpy/examples/intro_1_basic/seeds.png
:alt: Seed geometries.

Introduction 1 - seed geometries.

.. _f_ex_1_basic_poly:
.. figure:: ../../../../examples/intro_1_basic/polymesh.png
.. figure:: ../../../../src/microstructpy/examples/intro_1_basic/polymesh.png
:alt: Polygonal mesh.

Introduction 1 - polygonal mesh.

.. _f_ex_1_basic_tri:
.. figure:: ../../../../examples/intro_1_basic/trimesh.png
.. figure:: ../../../../src/microstructpy/examples/intro_1_basic/trimesh.png
:alt: Triangular mesh.

Introduction 1 - triangular mesh.

0 comments on commit d41d7e8

Please sign in to comment.