-
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.
Modify api template and add more module docstrings
Modified code reference api section to not use the template as much, and allowing each module to be generated when it is needed in the api section. This is a tradeoff of convencience for more customizability and a better doc design Also added more module docstrings and improved the ones that were already there
- Loading branch information
1 parent
0cd4972
commit 11ee4f3
Showing
22 changed files
with
328 additions
and
164 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
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,26 @@ | ||
import inspect | ||
from pathlib import Path | ||
|
||
FILENAME = Path(__file__).name | ||
|
||
|
||
def get_calling_file_path(): | ||
frames = inspect.stack() | ||
frame = 1 | ||
while (file_path := Path(frames[frame].filename)).name == FILENAME: | ||
frame += 1 | ||
return file_path | ||
|
||
|
||
def add_ref_to_rel_init(): | ||
file_path = get_calling_file_path() | ||
|
||
parent = file_path.parent | ||
pathing_ls = [] | ||
for part in reversed(parent.parts): | ||
pathing_ls.append(part) | ||
if part == "boa": | ||
break | ||
pathing = ".".join(module for module in reversed(pathing_ls)) | ||
|
||
return f"""**See More Information Here**: :mod:`{pathing}`""" |
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 |
---|---|---|
@@ -1,6 +1,24 @@ | ||
""" | ||
.. todo:: | ||
def foo(): | ||
return "hi" | ||
|
||
|
||
__doc__ = f""" | ||
################################################ | ||
Metrics Overview & Advanced Usage | ||
################################################ | ||
Coming soon! | ||
Metrics are the objective functions we are optimizing over | ||
or functions that we are adding in as further constraints of our problem. | ||
Metrics can be specified in your configuration by detailing the name | ||
of one of the predefined :mod:`Metrics <boa.metrics.metrics>` in BOA | ||
by passing in the name of the metric into your configuration file | ||
See :doc:`/user_guide/configuration` | ||
{foo()} | ||
""" | ||
|
||
from boa.metrics.metrics import * # noqa |
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
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
File renamed without changes.
Oops, something went wrong.