-
Notifications
You must be signed in to change notification settings - Fork 2
Polish documentation #77
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?
Changes from 27 commits
3fb7627
4bb1806
7d6d8d7
3197ed1
fb2e8ad
680d240
28aeaf9
75b0378
97e1349
4b17744
e5250ea
0e932a9
df2434f
69ad6e7
0502450
3c4df67
e339421
e77577d
c281b46
b073323
6ba53b5
0e1c759
fca1059
89cc9ba
80e5469
9e3b4fd
bd53a4e
973b088
2d50991
792f736
3d7797b
2e93508
0efea72
58adee8
2ab9a54
3f2f2c2
51089bb
14ac4b5
f78dfbd
6e522d0
051441b
3c785f1
9f18304
b3d1640
945be1d
7cffe33
3ac1681
22a73bb
ea36934
2fd3dd6
0c7c1b2
8c0b215
818070f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2021-2024, Auburn University | ||
Copyright (c) 2021-2025, Auburn University | ||
|
||
All rights reserved. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import numpy | ||
|
||
try: | ||
import sybil | ||
import sybil.parsers.rest | ||
|
||
except ImportError: | ||
sybil = None | ||
|
||
import lammpsio | ||
|
||
try: | ||
import gsd.hoomd | ||
|
||
has_gsd = True | ||
except ModuleNotFoundError: | ||
has_gsd = False | ||
|
||
|
||
def setup_sybil_tests(namespace): | ||
"""Sybil setup function.""" | ||
# Common imports. | ||
namespace["numpy"] = numpy | ||
namespace["lammpsio"] = lammpsio | ||
if has_gsd: | ||
namespace["frame"] = gsd.hoomd.Frame() | ||
else: | ||
namespace["frame"] = 0 | ||
|
||
|
||
if sybil is not None: | ||
pytest_collect_file = sybil.Sybil( | ||
parsers=[ | ||
sybil.parsers.rest.PythonCodeBlockParser(), | ||
sybil.parsers.rest.SkipParser(), | ||
], | ||
pattern="*.py", | ||
setup=setup_sybil_tests, | ||
fixtures=["tmp_path"], | ||
).pytest() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
lammpsio.Box | ||
============ | ||
|
||
.. currentmodule:: lammpsio | ||
|
||
.. autoclass:: Box | ||
|
||
|
||
.. automethod:: __init__ | ||
|
||
|
||
.. rubric:: Methods | ||
|
||
.. autosummary:: | ||
|
||
~Box.__init__ | ||
~Box.cast | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Attributes | ||
|
||
.. autosummary:: | ||
|
||
~Box.high | ||
~Box.low | ||
~Box.tilt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
lammpsio.DataFile | ||
================= | ||
|
||
.. currentmodule:: lammpsio | ||
|
||
.. autoclass:: DataFile | ||
|
||
|
||
.. automethod:: __init__ | ||
|
||
|
||
.. rubric:: Methods | ||
|
||
.. autosummary:: | ||
|
||
~DataFile.__init__ | ||
~DataFile.create | ||
~DataFile.read | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Attributes | ||
|
||
.. autosummary:: | ||
|
||
~DataFile.known_bodies | ||
~DataFile.known_headers | ||
~DataFile.unknown_bodies | ||
~DataFile.unknown_headers |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
lammpsio.DumpFile | ||
================= | ||
|
||
.. currentmodule:: lammpsio | ||
|
||
.. autoclass:: DumpFile | ||
|
||
|
||
.. automethod:: __init__ | ||
|
||
|
||
.. rubric:: Methods | ||
|
||
.. autosummary:: | ||
|
||
~DumpFile.__init__ | ||
~DumpFile.create | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Attributes | ||
|
||
.. autosummary:: | ||
|
||
~DumpFile.copy_from | ||
~DumpFile.filename | ||
~DumpFile.schema |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
lammpsio.Snapshot | ||
================= | ||
|
||
.. currentmodule:: lammpsio | ||
|
||
.. autoclass:: Snapshot | ||
|
||
|
||
.. automethod:: __init__ | ||
|
||
|
||
.. rubric:: Methods | ||
|
||
.. autosummary:: | ||
|
||
~Snapshot.__init__ | ||
~Snapshot.from_hoomd_gsd | ||
~Snapshot.has_angles | ||
~Snapshot.has_bonds | ||
~Snapshot.has_charge | ||
~Snapshot.has_dihedrals | ||
~Snapshot.has_id | ||
~Snapshot.has_image | ||
~Snapshot.has_impropers | ||
~Snapshot.has_mass | ||
~Snapshot.has_molecule | ||
~Snapshot.has_position | ||
~Snapshot.has_typeid | ||
~Snapshot.has_velocity | ||
~Snapshot.reorder | ||
~Snapshot.to_hoomd_gsd | ||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Attributes | ||
|
||
.. autosummary:: | ||
|
||
~Snapshot.N | ||
~Snapshot.angles | ||
~Snapshot.bonds | ||
~Snapshot.box | ||
~Snapshot.charge | ||
~Snapshot.dihedrals | ||
~Snapshot.id | ||
~Snapshot.image | ||
~Snapshot.impropers | ||
~Snapshot.mass | ||
~Snapshot.molecule | ||
~Snapshot.num_types | ||
~Snapshot.position | ||
~Snapshot.type_label | ||
~Snapshot.typeid | ||
~Snapshot.velocity |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
lammpsio.topology | ||
================= | ||
|
||
.. automodule:: lammpsio.topology | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
.. rubric:: Classes | ||
|
||
.. autosummary:: | ||
|
||
Angles | ||
Bonds | ||
Dihedrals | ||
Impropers | ||
LabelMap | ||
Topology |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
API | ||
--- | ||
|
||
Overview | ||
======== | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: api reference | ||
|
||
lammpsio.Box | ||
lammpsio.DataFile | ||
lammpsio.DumpFile | ||
lammpsio.Snapshot | ||
lammpsio.topology |
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ Credits | |
* Michael P. Howard | ||
* Mayukh Kundu | ||
* Philipp Leclercq | ||
* C. Levi Petix | ||
* C\. Levi Petix |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
==================== | ||
Community Guidelines | ||
==================== | ||
|
||
We ask that you please review and adhere to our `Code of Conduct`_. | ||
|
||
|
||
Reporting Issues | ||
================ | ||
If you encounter any bugs or issues while using ``lammpsio``, please report them | ||
on our `GitHub Issues page`_. | ||
|
||
Contributing | ||
============= | ||
We welcome contributions to ``lammpsio`` via GitHub pull requests. We ask that | ||
you please open an issue first to discuss your proposed changes before | ||
submitting a pull request. This helps us to understand the context of your | ||
changes and to ensure that they mesh well with the existing codebase. | ||
|
||
Seeking Help | ||
============ | ||
If you have questions or need help using ``lammpsio``, please feel free to reach | ||
out to us via our `GitHub Discussions page`_. | ||
|
||
.. _Code of Conduct: http://github.com/mphowardlab/lammpsio/blob/main/CODE_OF_CONDUCT.md | ||
.. _GitHub Issues page: http://github.com/mphowardlab/lammpsio/issues | ||
.. _GitHub Discussions page: http://github.com/mphowardlab/lammpsio/discussions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
lammpsio documentation | ||
====================== | ||
|
||
Tools for working with LAMMPS data and dump files. | ||
lammpsio provides a Python interface for reading and writing LAMMPS | ||
data and dump files. It also enables interconversion with HOOMD-blue's | ||
GSD format. This flexible package enables users to work with LAMMPS files | ||
in a variety of ways that improve workflow efficiency and reproducibility. | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: User guide | ||
|
||
guide/install | ||
clpetix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
guide/examples/index | ||
guide/release | ||
guide/guidelines | ||
guide/license | ||
guide/credits | ||
clpetix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: API reference | ||
|
||
api/box | ||
api/data | ||
api/dump | ||
api/snapshot | ||
api/topology | ||
api/api.rst |
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.
You don't want to have a space in this file path here. I would put it under
generated/
Additionally, is the use of subdirectories really needed with the way the docs are organized now? It might be better to move everything into a flat organization, like:
You can still make an
examples
subdirectory to store multiple files.Last, none of the auto-generated files should be checked into the source tree, since they should be created by sphinx each time. If you do as I suggest above, remove them, and add
doc/source/generated
to.gitignore
.