Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moose
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sahil Moza
moose
Commits
05b3a62d
Commit
05b3a62d
authored
7 years ago
by
hrani
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://github.com/BhallaLab/moose
parents
5f07757f
22eb3d1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/source/Extensions/hidden_code_block.py
+13
-2
13 additions, 2 deletions
docs/source/Extensions/hidden_code_block.py
docs/source/conf.py
+4
-10
4 additions, 10 deletions
docs/source/conf.py
with
17 additions
and
12 deletions
docs/source/Extensions/hidden_code_block.py
+
13
−
2
View file @
05b3a62d
...
...
@@ -35,7 +35,12 @@ Released under the WTFPL (http://sam.zoy.org/wtfpl/).
from
docutils
import
nodes
from
docutils.parsers.rst
import
directives
from
sphinx.directives.code
import
CodeBlock
from
sphinx.util.compat
import
make_admonition
# Fixes from https://github.com/abakan/ablog/commit/413566341b36d2b855fdebe133e15edcd4542785
try
:
from
sphinx.util.compat
import
make_admonition
except
ImportError
as
e
:
from
docutils.parsers.rst.directives.admonitions
import
BaseAdmonition
as
make_admonition
HCB_COUNTER
=
0
...
...
@@ -82,6 +87,12 @@ class HiddenCodeBlock(CodeBlock):
hcb
.
line
=
self
.
lineno
return
[
hcb
]
def
visit_hcb_tex
(
self
,
node
):
pass
def
depart_hcb_tex
(
self
,
node
):
pass
def
visit_hcb_html
(
self
,
node
):
"""
Visit hidden code block
"""
...
...
@@ -126,4 +137,4 @@ def depart_hcb_html(self, node):
def
setup
(
app
):
app
.
add_directive
(
'
hidden-code-block
'
,
HiddenCodeBlock
)
app
.
add_node
(
hidden_code_block
,
html
=
(
visit_hcb_html
,
depart_hcb_html
))
app
.
add_node
(
hidden_code_block
,
latex
=
(
visit_hcb_tex
,
depart_hcb_tex
))
This diff is collapsed.
Click to expand it.
docs/source/conf.py
+
4
−
10
View file @
05b3a62d
...
...
@@ -22,17 +22,19 @@ import sys
import
sphinx_rtd_theme
import
mock
conf_dir_
=
os
.
path
.
dirname
(
__file__
)
# If extensions (or modules to document with autodoc) are in another directory,
# 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.
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'
../python
'
))
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'
./Extensions
'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'
../../moose-examples/snippets
'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'
../../moose-examples/tutorials/ChemicalOscillators
'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'
../../moose-examples/tutorials/ChemicalBistables
'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'
../../moose-examples/tutorials/ExcInhNet
'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'
../../moose-examples/neuroml/lobster_pyloric
'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'
../../moose-examples/tutorials/ExcInhNetCaPlasticity
'
))
sys
.
path
.
append
(
os
.
path
.
join
(
conf_dir_
,
'
Extensions
'
)
)
# -- General configuration -----------------------------------------------------
...
...
@@ -283,16 +285,8 @@ autodoc_mock_imports = [ 'numpy' , 'moose.sbml' , 'moose.genesis' , 'moose.LIF'
exclude_patterns
=
[
'
/docs/source/user/py/references/*.rst
'
]
#run the doxygen thingy
# read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
#
# if read_the_docs_build:
#
# subprocess.call('cd ../../doxygen; doxygen', shell=True)
import
subprocess
,
os
read_the_docs_build
=
os
.
environ
.
get
(
'
READTHEDOCS
'
,
None
)
==
'
True
'
if
read_the_docs_build
:
if
not
read_the_docs_build
:
subprocess
.
call
(
'
cd doxygen; echo HELLO......................; doxygen Doxyfile
'
,
shell
=
True
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment