diff --git a/csst_proto/some_other_modules.py b/csst_proto/some_other_modules.py index e9c24176e7c81a2d0b2a7705e63c6feaf516f880..1f1d2baf89cd4b0a11976dd10bd5565018e8be91 100644 --- a/csst_proto/some_other_modules.py +++ b/csst_proto/some_other_modules.py @@ -14,3 +14,42 @@ def a_demo_function(*args): >>> a_demo_function(None) """ return None + + +class ADemoClass: + """ + A demo class. + + This class is a demo. + This is a second-line comment for extended summary. + + Parameters + ---------- + first_name : str + The first name. + last_name : str + The last name. + + Attributes + ---------- + first_name : str + The first name. + last_name : str + The last name. + + Methods + ------- + say_hello() + Print hello message. + + Examples + -------- + >>> a = ADemoClass("Jane", "Doe") + >>> a.say_hello() + """ + def __init__(self, first_name, last_name): + self.first_name = first_name + self.last_name = last_name + + def say_hello(self): + print("Hello, {} {}!".format(self.first_name, self.last_name)) diff --git a/csst_proto/top_level_interface.py b/csst_proto/top_level_interface.py index 6180569aa97f66874c8f6d002c54c66511aedca9..ea4f113675f7adacc8927fc96e7e3892198da0c6 100644 --- a/csst_proto/top_level_interface.py +++ b/csst_proto/top_level_interface.py @@ -1,5 +1,5 @@ from .flip_image import flip_image, read_test_image -from .some_other_modules import a_demo_function +from .some_other_modules import a_demo_function, ADemoClass -__all__ = ["flip_image", "read_test_image", "a_demo_function"] +__all__ = ["flip_image", "read_test_image", "a_demo_function", "ADemoClass"]