Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Document registration guardrails #293

Draft
wants to merge 4 commits into
base: source
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/_sources/developer/qc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Quality Control
===============

.. automodule:: CPAC.qc
:members:

.. automodule:: CPAC.qc.globals
:members:

.. automodule:: CPAC.qc.pipeline
:members:

.. automodule:: CPAC.qc.qc
:members:

.. automodule:: CPAC.qc.qcmetrics
:members:

.. automodule:: CPAC.qc.utils
:members:

.. include:: /developer/xcpqc

28 changes: 27 additions & 1 deletion docs/_sources/developer/workflows/registration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,31 @@ Registration
============

.. automodule:: CPAC.registration
:members:
:members:

.. automodule:: CPAC.registration.registration
:members:

Exceptions
^^^^^^^^^^

.. automodule:: CPAC.registration.exceptions
:members:

Guardrails
^^^^^^^^^^

.. automodule:: CPAC.registration.guardrails
:members:

Output_func_to_standard
^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: CPAC.registration.output_func_to_standard
:members:

Utils
^^^^^

.. automodule:: CPAC.registration.utils
:members:
2 changes: 1 addition & 1 deletion docs/_sources/developer/xcpqc.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
eXtensible Connectivity Pipeline-style quality control files
============================================================
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: CPAC.qc.xcp
:members:
Expand Down
13 changes: 7 additions & 6 deletions docs/_sources/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


class ExecDirective(Directive):
"""Execute the specified python code and insert the output into the document
"""
"""Execute the specified python code and insert the output into the
document"""
has_content = True

def run(self):
Expand All @@ -29,7 +29,10 @@ def run(self):

try:
exec('\n'.join(self.content))
return [nodes.literal_block(text=sys.stdout.getvalue())]
content = sys.stdout.getvalue()
if content.strip():
return [nodes.literal_block(text=content)]
return []
except Exception as e:
_, _, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
Expand All @@ -39,9 +42,7 @@ def run(self):
)
)
stack_message = nodes.paragraph(text=str(e))
return [
nodes.error(None, error_message, stack_message)
]
return [nodes.error(None, error_message, stack_message)]
finally:
sys.stdout = oldStdout
os.chdir(oldCwd)
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/user/pipelines/quality.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Quality Control
:maxdepth: 1

QC Pages - Visual Data Quality Control </user/qc_interface>
XCP QC files - eXtensible Connectivity Pipeline-style quality control files </user/xcpqc>
Developer Documentation: Quality Control </user/qc>