-
Notifications
You must be signed in to change notification settings - Fork 10
Implement Sphinx documentation #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #48 +/- ##
=======================================
Coverage ? 97.19%
=======================================
Files ? 2
Lines ? 428
Branches ? 47
=======================================
Hits ? 416
Misses ? 9
Partials ? 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review here. Overall, I think this looks quite good. It's much appreciated @ahnaf-tahmid-chowdhury!
|
||
At the core, DAGMC geometry is organized using MOAB **Entity Sets**. These are collections of other entities, which can include mesh elements (like triangles) or other entity sets, forming a hierarchical structure. PyDAGMC maps these entity sets to its `Group`, `Volume`, and `Surface` classes. | ||
|
||
### Essential MOAB Tags Used by DAGMC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't fully parsed it yet, but I do like this summary. I think it would be better placed in a section on the DAGMC file data model rather than methodology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created new file called data-model and moved the contents there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see that file in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recently merged it back into the methodology file with a dedicated section.
* **Volumes and Surfaces:** A `Volume` entity set typically contains `Surface` entity sets that form its boundary. PyDAGMC uses `mb.get_child_meshsets(volume_handle)` to find a `Volume`'s surfaces and `mb.get_parent_meshsets(surface_handle)` to find a `Surface`'s parent volumes. | ||
* **Groups and Volumes/Surfaces:** A `Group` entity set contains `Volume` and/or `Surface` entity sets. PyDAGMC uses `mb.get_entities_by_type_and_tag` within the group's handle to find its constituent volumes and surfaces. | ||
|
||
## PyDAGMC Class Structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In contrast to the "EntitySets", " Essemtial MOAB Tags...", and "Implicit Relationships...", sections above, the content in this section seems appropriate for methodology. Let's relocate the other sections.
docs/source/methodology.md
Outdated
* Then, the specific class (e.g., `Volume`) is instantiated with this configured handle. | ||
* An ID is assigned, either user-provided or auto-generated to be unique within the model for that entity type. | ||
|
||
* **Volume Calculation (`Volume.volume`):** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself to review the rendered version of this equation.
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
The 'EntitySets', 'Essential MOAB Tags', and 'Implicit Relationships' sections were moved from the methodology page to a new data-model page to improve the documentation's structure. A link to the new page has been added to the table of contents.
…ture - Updated the title and introductory text in the tutorial to enhance engagement and clarity. - Improved the organization of the tutorial sections, emphasizing key functionalities of PyDAGMC. - Added a new section in the tutorial detailing the internal operations of PyDAGMC, providing insights into model loading, entity access, triangle data handling, material assignment, entity creation, and volume calculation.
@pshriwise I think you are suggesting removing the PyDAGMC Class Structure section from the methodology and keeping DAGMC Data Model there. If that’s correct, please let me know and I’ll update it accordingly. |
docs/source/methodology.md
Outdated
F ==> G["Build Implicit Relationships"] | ||
G ==> H["Enable Queries"] | ||
H ==> I["Extract Geometry"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of this is done as part of MOAB. I don't think it's important to break down a file load in this kind of detail here. Mainly what users will be interested in (in my opinion) is what they can do with a file once loaded. In short, an additional sentence above to capture all of this should suffice. something like:
"When a file is loaded, its embedded geometric topology relationships and metadata (material/property assignments) are loaded according to the conventions established by the DAGMC library."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few suggestions here, but it looks like we're waiting on responses to other review comments still.
|
||
PyDAGMC is a Python interface for interacting with DAGMC .h5m files through the embedded topological relationships and metadata contained within. These interactions occur through a set of Python classes corresponding to DAGMC’s metadata Group (a grouping of volumes or surfaces), Volume, and Surface groupings in the mesh database. This interface is intended to provide a simple interface for obtaining information about DAGMC models, replacing significant boilerplate code required to perform the same queries with PyMOAB, the Python interface for MOAB itself. | ||
|
||
PyDAGMC classes provide the ability to perform basic queries as properties of the class instances. These queries include: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think many users like to see some basic documentation like this in the README on GH so they don't have to dive into a complete documentation page. I think it would be good to leave this here, but move the link to detailed documentation before this.
|
||
project = 'PyDAGMC' | ||
copyright = '2023 - {}, The UW CNERG Team. All rights reserved'.format(datetime.date.today().year) | ||
author = 'Patrick Shriwise, Paul Wilson, et al' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other authors who deserve more recognition than me (e.g. Romano, Peterson). We should either be comprehensive or find another way to list authors here.
pyproject.toml
Outdated
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we get rid of some of these old versions?
docs/source/index.md
Outdated
@@ -0,0 +1,52 @@ | |||
# Welcome to PyDAGMC | |||
|
|||
PyDAGMC is a Python interface for interacting with DAGMC `.h5m` files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we link the word "DAGMC" to the DAGMC documentation (such as it is) here and throughout?
docs/source/methodology.md
Outdated
|
||
# Methodology | ||
|
||
PyDAGMC provides a Pythonic abstraction layer over PyMOAB for interacting with DAGMC (Direct Accelerated Geometry Monte Carlo) `.h5m` files. This section delves into the underlying concepts, data structures, and design choices that enable PyDAGMC's functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should include a statement about what a DAGMC file actually is? Something like:
A DAGMC file contains a surface mesh representation of a geometry, including
metadata to define the topological relationships of that geometry and material
assignments, using MOAB's mesh file conventions. The metadata conventions are
specific to DAGMC.
We do get into it more in the details below, but perhaps some early statement like this is helpful context and provides some useful vocabulary and semantic nuance.
|
||
At the core, DAGMC geometry is organized using MOAB **Entity Sets**. These are collections of other entities, which can include mesh elements (like triangles) or other entity sets, forming a hierarchical structure. PyDAGMC maps these entity sets to its `Group`, `Volume`, and `Surface` classes. | ||
|
||
### Essential MOAB Tags Used by DAGMC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see that file in this PR?
Co-authored-by: Paul Wilson <paul.wilson@wisc.edu>
Description
This PR introduces a comprehensive documentation setup for PyDAGMC using Sphinx.
Key changes:
sphinx-book-theme
.pyproject.toml
.pydagmc.dagnav
)README.md
to reflect new documentation and add a link.conf.py
for theme, extensions, and autodoc settings.