-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Prepare release of version 2.1
Change-Id: I3694a8791b9540fc1b926a83ff55421b47e0f1b1 Refs: #3151
- Loading branch information
1 parent
95be509
commit 5897c96
Showing
10 changed files
with
260 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ people who have reported bugs, submitted patches,and implemented new features o | |
* Hovaidi Ardestani Mohammad <[email protected]> | ||
* Michael Sweatt <https://www.linkedin.com/in/michaelsweatt> | ||
* Wentao Shang <http://irl.cs.ucla.edu/~wentao/> | ||
* Christian Kreuzberger <[email protected]> | ||
* Yuanzhi Gao <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- | ||
# Based on http://doughellmann.com/2010/05/09/defining-custom-roles-in-sphinx.html | ||
|
||
"""Integration of Sphinx with Redmine. | ||
""" | ||
|
||
from docutils import nodes, utils | ||
from docutils.parsers.rst.roles import set_classes | ||
|
||
def redmine_role(name, rawtext, text, lineno, inliner, options={}, content=[]): | ||
"""Link to a Redmine issue. | ||
Returns 2 part tuple containing list of nodes to insert into the | ||
document and a list of system messages. Both are allowed to be | ||
empty. | ||
:param name: The role name used in the document. | ||
:param rawtext: The entire markup snippet, with role. | ||
:param text: The text marked with the role. | ||
:param lineno: The line number where rawtext appears in the input. | ||
:param inliner: The inliner instance that called us. | ||
:param options: Directive options for customization. | ||
:param content: The directive content for customization. | ||
""" | ||
try: | ||
issue_num = int(text) | ||
if issue_num <= 0: | ||
raise ValueError | ||
except ValueError: | ||
msg = inliner.reporter.error( | ||
'Redmine issue number must be a number greater than or equal to 1; ' | ||
'"%s" is invalid.' % text, line=lineno) | ||
prb = inliner.problematic(rawtext, rawtext, msg) | ||
return [prb], [msg] | ||
app = inliner.document.settings.env.app | ||
node = make_link_node(rawtext, app, 'issues', str(issue_num), options) | ||
return [node], [] | ||
|
||
def make_link_node(rawtext, app, type, slug, options): | ||
"""Create a link to a Redmine resource. | ||
:param rawtext: Text being replaced with link node. | ||
:param app: Sphinx application context | ||
:param type: Link type (issue, changeset, etc.) | ||
:param slug: ID of the thing to link to | ||
:param options: Options dictionary passed to role func. | ||
""" | ||
# | ||
try: | ||
base = app.config.redmine_project_url | ||
if not base: | ||
raise AttributeError | ||
except AttributeError, err: | ||
raise ValueError('redmine_project_url configuration value is not set (%s)' % str(err)) | ||
# | ||
slash = '/' if base[-1] != '/' else '' | ||
ref = base + slash + type + '/' + slug + '/' | ||
set_classes(options) | ||
node = nodes.reference(rawtext, 'Issue #' + utils.unescape(slug), refuri=ref, | ||
**options) | ||
return node | ||
|
||
def setup(app): | ||
"""Install the plugin. | ||
:param app: Sphinx application context. | ||
""" | ||
app.add_role('issue', redmine_role) | ||
app.add_config_value('redmine_project_url', None, 'env') | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ndnSIM Team | ||
=========== | ||
|
||
.. include:: ../../../AUTHORS |