Skip to content

Commit acc0378

Browse files
committed
Merge pull request #651 from enthought/docs/update-website
Update website for 0.6 release
2 parents e13dd9f + 8b546d7 commit acc0378

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6729
-59
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
==============================================================================
2+
DistArray 0.6 release
3+
==============================================================================
4+
5+
**Mailing List:** [email protected]
6+
7+
**Documentation:** http://distarray.readthedocs.org
8+
9+
**License:** Three-clause BSD
10+
11+
**Python versions:** 2.7, 3.4, and 3.5
12+
13+
**OS support:** \*nix and Mac OS X
14+
15+
What is DistArray?
16+
------------------
17+
18+
DistArray aims to bring the ease-of-use of NumPy to data-parallel
19+
high-performance computing. It provides distributed multi-dimensional NumPy
20+
arrays, distributed ufuncs, and distributed IO capabilities. It can
21+
efficiently interoperate with external distributed libraries like Trilinos.
22+
DistArray works with NumPy and builds on top of it in a flexible and natural
23+
way.
24+
25+
0.6 Release
26+
-----------
27+
28+
Noteworthy improvements in this release include:
29+
30+
* a new website, (http://docs.enthought.com/distarray/), with links to
31+
DistArray talks and presentations,
32+
* redistribution for block-distributed (and non-distributed) DistArrays,
33+
* experimental "quickstart" installation scripts,
34+
* an easier API for ``Context.apply``
35+
* expanded and improved example notebooks, including a new parallel Gaussian
36+
Elimination example by Prashant Mital,
37+
* compatibility with NumPy 1.9,
38+
* expanded TravisCI testing (OS X and Python 3.5),
39+
* logos by Erick Michaud, and
40+
* several bug-fixes and code improvements.
41+
42+
Existing features
43+
-----------------
44+
45+
DistArray
46+
47+
* supports NumPy-like slicing, reductions, and ufuncs on distributed
48+
multidimensional arrays;
49+
* has a client-engine process design -- data resides on the worker processes,
50+
commands are initiated from master;
51+
* allows full control over what is executed on the worker processes and
52+
integrates transparently with the master process;
53+
* allows direct communication between workers, bypassing the master process
54+
for scalability;
55+
* integrates with IPython.parallel for interactive creation and exploration of
56+
distributed data;
57+
* supports distributed ufuncs (currently without broadcasting);
58+
* builds on and leverages MPI via MPI4Py in a transparent and user-friendly
59+
way;
60+
* has basic support for unstructured arrays;
61+
* supports user-controllable array distributions across workers (block,
62+
cyclic, block-cyclic, and unstructured) on a per-axis basis;
63+
* has a straightforward API to control how an array is distributed;
64+
* has basic plotting support for visualization of array distributions;
65+
* separates the array’s distribution from the array’s data -- useful for
66+
slicing, reductions, redistribution, broadcasting, and other operations;
67+
* implements distributed random arrays;
68+
* supports ``.npy``-like flat-file IO and hdf5 parallel IO (via ``h5py``);
69+
leverages MPI-based IO parallelism in an easy-to-use and transparent way;
70+
and
71+
* supports the distributed array protocol [protocol]_, which allows
72+
independently developed parallel libraries to share distributed arrays
73+
without copying, analogous to the PEP-3118 new buffer protocol.
74+
75+
Planned features
76+
----------------
77+
78+
Planned features include
79+
80+
* array re-distribution capabilities for more distribution types;
81+
* lazy evaluation and deferred computation for latency hiding;
82+
* examples of interoperation with Trilinos [Trilinos]_;
83+
* distributed broadcasting support.
84+
* integration with other packages [petsc]_ that subscribe to the distributed
85+
array protocol [protocol]_;
86+
* distributed fancy indexing;
87+
* out-of-core computations;
88+
* support for distributed sorting and other non-trivial distributed
89+
algorithms; and
90+
* end-user control over communication and temporary array creation, and other
91+
performance aspects of distributed computations.
92+
93+
History and funding
94+
-------------------
95+
96+
Brian Granger started DistArray as a NASA-funded SBIR project in 2008.
97+
Enthought picked it up as part of a DOE Phase II SBIR [SBIR]_ to provide a
98+
generally useful distributed array package. It builds on NumPy, MPI, MPI4Py,
99+
IPython, IPython.parallel, and interfaces with the Trilinos suite of
100+
distributed HPC solvers (via PyTrilinos [Trilinos]_).
101+
102+
This material is based upon work supported by the Department of Energy under
103+
Award Number DE-SC0007699.
104+
105+
This report was prepared as an account of work sponsored by an agency of the
106+
United States Government. Neither the United States Government nor any agency
107+
thereof, nor any of their employees, makes any warranty, express or implied,
108+
or assumes any legal liability or responsibility for the accuracy,
109+
completeness, or usefulness of any information, apparatus, product, or process
110+
disclosed, or represents that its use would not infringe privately owned
111+
rights. Reference herein to any specific commercial product, process, or
112+
service by trade name, trademark, manufacturer, or otherwise does not
113+
necessarily constitute or imply its endorsement, recommendation, or favoring
114+
by the United States Government or any agency thereof. The views and opinions
115+
of authors expressed herein do not necessarily state or reflect those of the
116+
United States Government or any agency thereof.
117+
118+
119+
.. [protocol] http://distributed-array-protocol.readthedocs.org/en/rel-0.10.0/
120+
.. [Trilinos] http://trilinos.org/
121+
.. [petsc] http://www.mcs.anl.gov/petsc/
122+
.. [SBIR] http://www.sbir.gov/sbirsearch/detail/410257
123+
124+
.. vim:spell

docs/www/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ documentation).
2323
If you want to change major features or styling of the site, you can change
2424
settings in ``pelicanconf.py``. We're currently using the
2525
``pelican-bootstrap3`` theme for Pelican, and the ``flatly`` theme for
26-
Bootstrap. The easist way to change the look of the site is to choose another
26+
Bootstrap. The easiest way to change the look of the site is to choose another
2727
Bootstrap theme from `bootswatch`_, but there are also other `pelican themes`_
28-
available
28+
available.
2929

3030

3131
.. _pelican: http://blog.getpelican.com/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
:date: 2015-10-15
2+
:category: Release Notes
3+
:tags: releases
4+
5+
.. include:: ../../../sphinx/source/releases/release-0.6.rst
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.tox
2+
test_data/cache/
3+
test_data/output/theme/
4+
_nb_header.html

docs/www/pelican-plugins/liquid_tags/Readme.md

Lines changed: 78 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,50 @@ To insert a sized and labeled image in your document, enable the
2525

2626
{% img [class name(s)] path/to/image [width [height]] [title text | "title text" ["alt text"]] %}
2727

28+
### Base64 Image (inline image) tag
29+
30+
There is one more tag for image: ``b64img``. It is based on ``img`` tag, but instead of inserting link on image it acutally reads image and inserts it as base64 text into ``<img src=`` attribute.
31+
32+
To use it:
33+
34+
1. Enable ``liquid_tags.b64img``
35+
1. Insert tag as you'd insert image one: ``{% b64img [class name(s)] path/to/image [width [height]] [title text | "title text" ["alt text"]] %}``
36+
37+
Images are read on compilation phase so you can use any local path (just be sure that image will remain there on next compilation)
38+
39+
## Instagram Tag
40+
To insert a sized and labeled Instagram image in your document by its shortcode (such as ``pFI0CAIZna``), enable the ``liquid_tags.gram`` plugin and use the following:
41+
42+
{% gram shortcode [size] [width] [class name(s)] [title text | "title text" ["alt text"]] %}
43+
44+
You can specify a size with `t`, `m`, or `l`.
45+
46+
## Flickr Tag
47+
To insert a Flickr image to a post, follow these steps:
48+
49+
1. Enable ``liquid_tags.flickr``
50+
2. [Get an API key from Flickr](https://www.flickr.com/services/apps/create/apply)
51+
3. Add FLICKR_API_KEY to your config
52+
4. Add this to your document:
53+
54+
``{% flickr image_id [small|medium|large] ["alt text"|'alt text'] %}``
55+
56+
## Giphy Tag
57+
To insert a gif from Giphy in your document by its id (such as ``aMSJFS6oFX0fC``), enable the ``liquid_tags.giphy`` plugin and use the following:
58+
59+
{% giphy gif_id ["alt text"|'alt text'] %}
60+
61+
IMPORTANT: You have to request a production API key from giphy [here](https://api.giphy.com/submit).
62+
For the first runs you could also use the public beta key you can get [here](https://github.com/giphy/GiphyAPI).
63+
64+
## Soundcloud Tag
65+
To insert a Soundcloud Widget to a post, follow these steps:
66+
67+
1. Enable ``liquid_tags.soundcloud``
68+
2. Add this to your document:
69+
70+
``{% soundcloud track_url %}``
71+
2872
## Youtube Tag
2973
To insert youtube video into a post, enable the
3074
``liquid_tags.youtube`` plugin, and add to your document:
@@ -34,6 +78,8 @@ To insert youtube video into a post, enable the
3478
The width and height are in pixels, and can be optionally specified. If they
3579
are not, then the dimensions will be 640 (wide) by 390 (tall).
3680

81+
If you're experiencing issues with code generating (i.e. missing closing tags), add `SUMMARY_MAX_LENGTH = None` to your config.
82+
3783
## Vimeo Tag
3884
To insert a Vimeo video into a post, enable the
3985
``liquid_tags.vimeo`` plugin, and add to your document:
@@ -43,6 +89,8 @@ To insert a Vimeo video into a post, enable the
4389
The width and height are in pixels, and can be optionally specified. If they
4490
are not, then the dimensions will be 640 (wide) by 390 (tall).
4591

92+
If you're experiencing issues with code generating (i.e. missing closing tags), add `SUMMARY_MAX_LENGTH = None` to your config.
93+
4694
## Video Tag
4795
To insert flash/HTML5-friendly video into a post, enable the
4896
``liquid_tags.video`` plugin, and add to your document:
@@ -56,6 +104,19 @@ which is used as a preview of the video.
56104
To use a video from file, make sure it's in a static directory and put in
57105
the appropriate url.
58106

107+
## Audio Tag
108+
To insert HTML5 audio into a post, enable the ``liquid_tags.audio`` plugin,
109+
and add to your document:
110+
111+
{% audio url/to/audio [url/to/audio] [url/to/audio] %}
112+
113+
Up to 3 audio urls are possible. So you can add different versions of
114+
the audio file you want to post because not every browser support every
115+
file format.
116+
117+
To use a audio from file, make sure it's in a static directory and put in
118+
the appropriate url.
119+
59120
## Include Code
60121
To include code from a file in your document with a link to the original
61122
file, enable the ``liquid_tags.include_code`` plugin, and add to your
@@ -83,7 +144,8 @@ setting, e.g.:
83144
STATIC_PATHS = ['images', 'code']
84145

85146
## IPython notebooks
86-
To insert an ipython notebook into your post, enable the
147+
148+
To insert an [IPython][] notebook into your post, enable the
87149
``liquid_tags.notebook`` plugin and add to your document:
88150

89151
{% notebook filename.ipynb %}
@@ -97,7 +159,9 @@ config file:
97159
Because the conversion and rendering of notebooks is rather involved, there
98160
are a few extra steps required for this plugin:
99161

100-
- First, you will need to install IPython >= 1.0 [[1](#1)]
162+
- First, you will need to install IPython:
163+
164+
pip install ipython==2.4.1
101165

102166
- After typing "make html" when using the notebook tag, a file called
103167
``_nb_header.html`` will be produced in the main directory. The content
@@ -143,13 +207,22 @@ The notebook tag also has two optional arguments: ``cells`` and ``language``.
143207
### Collapsible Code in IPython Notebooks
144208

145209
The plugin also enables collapsible code input boxes. For this to work
146-
you first need to copy the file ``pelicanhtml_1.tpl`` (for IPython
147-
1.x) ``pelicanhtml_2.tpl`` (for IPython 2.x) to the top level of your
210+
you first need to copy the file ``pelicanhtml_3.tpl`` (for IPython
211+
3.x, ``pelicanhtml_2.tpl`` (for IPython 2.x)...) to the top level of your
148212
Pelican blog. Notebook input cells containing the comment line ``#
149213
<!-- collapse=True -->`` will be collapsed when the html page is
150214
loaded and can be expanded by clicking on them. Cells containing the
151215
comment line ``# <!-- collapse=False -->`` will be open on load but
152216
can be collapsed by clicking on their header. Cells without collapse
153217
comments are rendered as standard code input cells.
154218

155-
[<a name="1">1</a>] http://ipython.org/
219+
## Testing
220+
221+
To test the plugin in multiple environments we use [tox](http://tox.readthedocs.org/en/latest/), to run the entire test suite, just type:
222+
223+
```
224+
cd path/to/liquid_tags
225+
tox
226+
```
227+
228+
[IPython]: http://ipython.org/
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
"""
2+
Audio Tag
3+
---------
4+
This implements a Liquid-style audio tag for Pelican,
5+
based on the pelican video plugin [1]_
6+
7+
Syntax
8+
------
9+
{% audio url/to/audio [url/to/audio] [/url/to/audio] %}
10+
11+
Example
12+
-------
13+
{% audio http://example.tld/foo.mp3 http://example.tld/foo.ogg %}
14+
15+
Output
16+
------
17+
<audio controls><source src="http://example.tld/foo.mp3" type="audio/mpeg"><source src="http://example.tld/foo.ogg" type="audio/ogg">Your browser does not support the audio element.</audio>
18+
19+
[1] https://github.com/getpelican/pelican-plugins/blob/master/liquid_tags/video.py
20+
"""
21+
import os
22+
import re
23+
from .mdx_liquid_tags import LiquidTags
24+
25+
SYNTAX = "{% audio url/to/audio [url/to/audio] [/url/to/audio] %}"
26+
AUDIO = re.compile(r'(/\S+|https?:\S+)(?:\s+(/\S+|https?:\S+))?(?:\s+(/\S+|https?:\S+))?')
27+
28+
AUDIO_TYPEDICT = {'.mp3': 'audio/mpeg',
29+
'.ogg': 'audio/ogg',
30+
'.oga': 'audio/ogg',
31+
'.opus': 'audio/ogg',
32+
'.wav': 'audio/wav',
33+
'.mp4': 'audio/mp4'}
34+
35+
36+
def create_html(markup):
37+
match = AUDIO.search(markup)
38+
if match:
39+
groups = match.groups()
40+
audio_files = [g for g in groups if g]
41+
42+
if any(audio_files):
43+
audio_out = '<audio controls>'
44+
45+
for audio_file in audio_files:
46+
47+
base, ext = os.path.splitext(audio_file)
48+
49+
if ext not in AUDIO_TYPEDICT:
50+
raise ValueError("Unrecognized audio extension: "
51+
"{0}".format(ext))
52+
53+
# add audio source
54+
audio_out += '<source src="{}" type="{}">'.format(
55+
audio_file, AUDIO_TYPEDICT[ext])
56+
57+
# close audio tag
58+
audio_out += 'Your browser does not support the audio element.'
59+
audio_out += '</audio>'
60+
61+
else:
62+
raise ValueError("Error processing input, "
63+
"expected syntax: {0}".format(SYNTAX))
64+
65+
return audio_out
66+
67+
68+
@LiquidTags.register('audio')
69+
def audio(preprocessor, tag, markup):
70+
return create_html(markup)
71+
72+
73+
# ---------------------------------------------------
74+
# This import allows image tag to be a Pelican plugin
75+
from liquid_tags import register

0 commit comments

Comments
 (0)