Skip to content

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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3fb7627
Fix project name typo.
clpetix Mar 19, 2025
4bb1806
Add community guidelines section with contribution instructions
clpetix Mar 19, 2025
7d6d8d7
Add statement of need to landing page.
clpetix Mar 19, 2025
3197ed1
Update copyright year to 2025.
clpetix Apr 14, 2025
fb2e8ad
Add overview sections to API docs.
clpetix Apr 14, 2025
680d240
Add examples to Box class.
clpetix Apr 14, 2025
28aeaf9
Make doc strings consistent formatting for booleans.
clpetix Apr 15, 2025
75b0378
Remove redundant :class: statements in docs.
clpetix Apr 17, 2025
97e1349
Make API documentation 1 landing page.
clpetix Apr 17, 2025
4b17744
Add installation instructions for conda.
clpetix Apr 17, 2025
e5250ea
Submodule topology rather than individual topology types.
clpetix Apr 21, 2025
0e932a9
Fix formatting of class references in docstrings
clpetix Apr 28, 2025
df2434f
Add sybil testing to documentation.
clpetix May 19, 2025
69ad6e7
Ensure doc test runs when sybil is installed
mayukh33 May 20, 2025
0502450
Add sybil to requirements.txt
mayukh33 May 21, 2025
3c4df67
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 21, 2025
e339421
Minor fix
mayukh33 May 21, 2025
e77577d
Add example to the data module
mayukh33 May 21, 2025
c281b46
Add example to the dump module
mayukh33 May 21, 2025
b073323
Move confest.py to root dir.
mayukh33 May 22, 2025
6ba53b5
Add documentation for snapshot
mayukh33 May 23, 2025
0e1c759
Minor fix to box documentation
mayukh33 May 23, 2025
fca1059
Modify data documentation
mayukh33 May 23, 2025
89cc9ba
Modify the dump file documentation
mayukh33 May 23, 2025
80e5469
Ensure doc test runs if gsd.hoomd is not installed
mayukh33 May 23, 2025
9e3b4fd
Modify snapshot doc to ensure doc test runs
mayukh33 May 23, 2025
bd53a4e
Modify documentation confest to run doc test
mayukh33 May 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
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.

Expand Down
40 changes: 40 additions & 0 deletions conftest.py
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()
29 changes: 29 additions & 0 deletions doc/source/api/api reference/lammpsio.Box.rst
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
31 changes: 31 additions & 0 deletions doc/source/api/api reference/lammpsio.DataFile.rst
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
29 changes: 29 additions & 0 deletions doc/source/api/api reference/lammpsio.DumpFile.rst
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
56 changes: 56 additions & 0 deletions doc/source/api/api reference/lammpsio.Snapshot.rst
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
25 changes: 25 additions & 0 deletions doc/source/api/api reference/lammpsio.topology.rst
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
15 changes: 15 additions & 0 deletions doc/source/api/api.rst
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
6 changes: 0 additions & 6 deletions doc/source/api/box.rst

This file was deleted.

6 changes: 0 additions & 6 deletions doc/source/api/data.rst

This file was deleted.

6 changes: 0 additions & 6 deletions doc/source/api/dump.rst

This file was deleted.

6 changes: 0 additions & 6 deletions doc/source/api/snapshot.rst

This file was deleted.

6 changes: 0 additions & 6 deletions doc/source/api/topology.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# -- Project information -----------------------------------------------------

project = "lammmpsio"
project = "lammpsio"
year = datetime.date.today().year
copyright = f"2021-{year}, Auburn University"
author = "Michael P. Howard"
Expand Down
2 changes: 1 addition & 1 deletion doc/source/guide/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Credits
* Michael P. Howard
* Mayukh Kundu
* Philipp Leclercq
* C. Levi Petix
* C\. Levi Petix
27 changes: 27 additions & 0 deletions doc/source/guide/guidelines.rst
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
4 changes: 4 additions & 0 deletions doc/source/guide/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The easiest way to get ``lammpsio`` is from PyPI using ``pip``:

pip install lammpsio

or from conda-forge using ``conda`` or ``mamba``:
.. code:: bash

conda install -c conda-forge lammpsio

Building from source
====================
Expand Down
18 changes: 6 additions & 12 deletions doc/source/index.rst
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
guide/examples/index
guide/release
guide/guidelines
guide/license
guide/credits

.. toctree::
:maxdepth: 1
:caption: API reference

api/box
api/data
api/dump
api/snapshot
api/topology
api/api.rst
Loading