Commit 4a29da41 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

excluded linenos for copybutton

parent d20d611f
Pipeline #201 passed with stages
in 3 minutes and 24 seconds
...@@ -4,5 +4,6 @@ joblib==1.2.0 ...@@ -4,5 +4,6 @@ joblib==1.2.0
setuptools==58.0.4 setuptools==58.0.4
astropy==5.1 astropy==5.1
pycodestyle==2.9.1 pycodestyle==2.9.1
sphinx_copybutton==0.5.0 #sphinx_copybutton==0.5.0 # this does not exclude linenos
git+https://github.com/executablebooks/sphinx-copybutton.git
git+https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git git+https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git
\ No newline at end of file
...@@ -35,6 +35,8 @@ release = '0.0.1alpha' ...@@ -35,6 +35,8 @@ release = '0.0.1alpha'
# ones. # ones.
extensions = ["recommonmark", extensions = ["recommonmark",
"sphinx_copybutton", "sphinx_copybutton",
"sphinx_togglebutton",
# "sphinx_exec_code",
"sphinx.ext.autodoc", "sphinx.ext.autodoc",
"sphinx.ext.napoleon", "sphinx.ext.napoleon",
"sphinx.ext.viewcode", "sphinx.ext.viewcode",
...@@ -68,3 +70,6 @@ html_static_path = ['_static'] ...@@ -68,3 +70,6 @@ html_static_path = ['_static']
# latex_elements = { # latex_elements = {
# 'preamble': '\\usepackage[UTF8]{ctex}\n', # 'preamble': '\\usepackage[UTF8]{ctex}\n',
# } # }
# -- Copy Button --------------------------------------------------------
# copybutton_exclude = ['.linenos']
...@@ -70,11 +70,12 @@ Get the default configured ``logging.Logger``. ...@@ -70,11 +70,12 @@ Get the default configured ``logging.Logger``.
.. code-block:: python .. code-block:: python
:linenos:
from csst_common.logger import get_logger from csst_common.logger import get_logger
logger = get_logger() logger = get_logger()
.. note:: .. warning::
Developers should NOT use ``print`` function extensively in code. Developers should NOT use ``print`` function extensively in code.
Generally ``print`` can be replaced with ``logger.debug("msg")``. Generally ``print`` can be replaced with ``logger.debug("msg")``.
For important information, use ``logger.info("msg")``. For important information, use ``logger.info("msg")``.
...@@ -91,6 +92,7 @@ Developers should use ``csst_common.status.CsstStatus`` to return the ...@@ -91,6 +92,7 @@ Developers should use ``csst_common.status.CsstStatus`` to return the
status of their interfaces. status of their interfaces.
.. code-block:: python .. code-block:: python
:linenos:
from csst_common.status import CsstStatus from csst_common.status import CsstStatus
# presently 3 kinds of status are available, they are # presently 3 kinds of status are available, they are
......
...@@ -4,4 +4,4 @@ joblib==1.2.0 ...@@ -4,4 +4,4 @@ joblib==1.2.0
setuptools==58.0.4 setuptools==58.0.4
astropy==5.1 astropy==5.1
pycodestyle==2.9.1 pycodestyle==2.9.1
sphinx_copybutton==0.5.0 git+https://github.com/executablebooks/sphinx-copybutton.git
\ No newline at end of file \ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment