-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3f9757
commit c51ca56
Showing
18 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_build | ||
.venv | ||
sphinx_venv | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Basic Example | ||
============= | ||
|
||
|
||
Example of displaying API: | ||
|
||
.. automodule:: example | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
API | ||
=== | ||
|
||
This contains API | ||
|
||
|
||
.. toctree:: | ||
|
||
api_base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[project] | ||
name = "sphinx-documentation-demo" | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"pydata-sphinx-theme==0.15.2", | ||
"Sphinx==7.2.6", | ||
"sphinx-autobuild==2024.2.4", | ||
"sphinx_copybutton", | ||
"sphinx_design==0.5.0" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ pydata-sphinx-theme==0.15.2 | |
Sphinx==7.2.6 | ||
sphinx-autobuild==2024.2.4 | ||
sphinx_design==0.5.0 | ||
sphinx_copybutton |
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from __future__ import annotations | ||
|
||
class TestMessage(object): | ||
"""This is the docstring for the TestMessage class. | ||
Args: | ||
message_string (string): String to be printed later | ||
""" | ||
def __init__(self, message_string: str): | ||
self.message_string = message_string | ||
|
||
@staticmethod | ||
def from_number(number: int) -> TestMessage: | ||
"""Creates a TestMessage from the provided number. | ||
Args: | ||
number: the number to convert into a string | ||
""" | ||
|
||
return TestMessage(message_string=str(number)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from __future__ import annotations | ||
from testpackage.test_message import TestMessage | ||
|
||
class TestPrinter(object): | ||
"""This is the docstring for TestPrinter | ||
Stuff | ||
Args: | ||
msg: Message to be stored for later printing | ||
""" | ||
|
||
def __init__(self, msg: TestMessage): | ||
self.msg = msg | ||
|
||
|
||
def print(self) -> None: | ||
"""This function is used to print the stored message. | ||
""" | ||
print(self.msg.message_string) | ||
|
||
|
||
def function_within_package() -> None: | ||
"""This is just an example of a function within a package | ||
that is not also contained within a class. | ||
""" | ||
print("This is a test function") | ||
|