diff --git a/doc/source/codestyle.rst b/doc/source/codestyle.rst index 5a015a5b25b2929a7c19b3718840b3bdd6eab223..6a2c2023cebc819eee81ab83284eb652dc15bb2d 100644 --- a/doc/source/codestyle.rst +++ b/doc/source/codestyle.rst @@ -2,7 +2,7 @@ Code Style ========== -PEP 8 : The Base Python style +PEP 8 : the base Python style ----------------------------- Python code should follow **PEP 8** diff --git a/doc/source/csst_common/csst_common.rst b/doc/source/csst_common/csst_common.rst index 54f6872488688d450e77db4e2c826f5575f4b352..7ee0313c00734fef1e8340f5c11dfd02cf6f7921 100644 --- a/doc/source/csst_common/csst_common.rst +++ b/doc/source/csst_common/csst_common.rst @@ -20,13 +20,19 @@ A class that helps developers to access simulation files. assert_all_detectors=False, # if True, assert all detectors are available datatype="mbi", # "mbi" or "sls" ) - # for a quick start + +.. code-block:: python + + # for a quick start () dm_mbi = CsstMsDataManager.quickstart( ver_sim="C5.2", datatype="mbi", dir_l1=".", exposure_id=100 # the 100th exposure ) + +.. code-block:: python + # access L0 directory dm_mbi.dir_l0 # access L1 directory @@ -46,6 +52,8 @@ A class that helps developers to access simulation files. # define an L1 file (non-detector-specified) dm_mbi.l1_file("flipped_image.fits") +.. code-block:: python + # to get bias dm_mbi.get_bias() # to get dark diff --git a/doc/source/csst_common/example_interface.py b/doc/source/csst_common/example_interface.py index 6edc923b5089caa0a24b099aa3207158e7d130e1..2411d8ae6b2ee0dfc545ed901702f2bd31ff8203 100644 --- a/doc/source/csst_common/example_interface.py +++ b/doc/source/csst_common/example_interface.py @@ -143,7 +143,7 @@ def process_multiple_images( return CsstStatus.PERFECT else: # not all images are properly processed - return CsstStatus.WARNING + return CsstStatus.ERROR except DeprecationWarning: # this will be written into the log file logger.warning("Suffered DeprecationWarning!") diff --git a/doc/source/packaging.rst b/doc/source/packaging.rst index d76bfb2732f47888ccc18eef6114527c840eb070..6d971cf5d3fe336d79b73a1b1d33780ca5eb861c 100644 --- a/doc/source/packaging.rst +++ b/doc/source/packaging.rst @@ -7,7 +7,7 @@ official `Python Packaging User Guide`_, and more specifically `here`_. .. _Python Packaging User Guide: https://packaging.python.org/en/latest/ -Project Structure +Project structure ----------------- An example code structure is shown below. Files/directories with asterisks (``*``) marks are optional. diff --git a/doc/source/unittest.rst b/doc/source/unittest.rst index e5f13f3d06a07202d5d2b0f4fb3ce0df4369a509..43cca9277b8299888ee68b7ad4a9d80389c891f4 100644 --- a/doc/source/unittest.rst +++ b/doc/source/unittest.rst @@ -15,7 +15,7 @@ Here we show an example of an example unit test on ``csst_proto.top_level_interf -Run Unit Tests +Run unit tests -------------- To run unit tests diff --git a/doc/source/vcs.rst b/doc/source/vcs.rst index abb3c791b923248004849a4623fffd17bdd423bf..5cb10b7b5bfba4843ea5bc3e6a4d12cbb16b6a37 100644 --- a/doc/source/vcs.rst +++ b/doc/source/vcs.rst @@ -14,15 +14,15 @@ which provides several advantages. 4. Code safety the approve-merge mechanism, etc. -`git` ------ -`git` is probably the most widely used version control system presently. +``git`` +------- +``git`` is probably the most widely used version control system presently. - official website: https://git-scm.com/ - **Pro Git** (2nd Ed.): https://git-scm.com/book/en/v2 -Basic Usages +Basic usages ------------ To initialize a repository: @@ -111,8 +111,8 @@ You can also store your credentials on disk via ``*.py~`` (temporary files generated by text editor). -Work Flow with Git ------------------- +Work flow with ``git`` +---------------------- In CSST DAS pipeline development, each developer registers an account at the `CSST DAS GitLab`_, which is a self self-managed `GitLab`_ instance to host data processing pipelines at NAOC.