Skip to content

Commit

Permalink
Fix documentation warnings (#395)
Browse files Browse the repository at this point in the history
* Remove duplicate object descriptions

* Update sphinx nitpick ignore
  • Loading branch information
ElliottKasoar authored Jan 30, 2025
1 parent fff2d6d commit 88907dd
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 84 deletions.
13 changes: 11 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,27 @@
nitpicky = True
nitpick_ignore = [
("py:class", "Logger"),
("py:class", "float64"),
("py:class", "numpy.float64"),
("py:class", "NDArray"),
("py:class", "ndarray"),
("py:class", "typer.models.Context"),
("py:class", "ellipsis"),
("py:class", "janus_core.helpers.stats.T"),
("py:class", "PhonopyAtoms"),
("py:class", "phonopy.structure.atoms.PhonopyAtoms"),
("py:class", "ase.optimize.optimize.Optimizer"),
("py:class", "codecarbon.emissions_tracker.OfflineEmissionsTracker"),
("py:class", "_io.StringIO"),
("py:class", "Dynamics"),
("py:class", "OfflineEmissionsTracker"),
("py:class", "StringIO"),
("py:class", "Architectures"),
("py:class", "Devices"),
("py:class", "Properties"),
("py:class", "PhononCalcs"),
("py:class", "MaybeList"),
("py:class", "MaybeSequence"),
("py:class", "SliceLike"),
("py:class", "StartStopStep"),
("py:class", "PathLike"),
("py:class", "Atoms"),
("py:class", "Calculator"),
Expand Down
5 changes: 0 additions & 5 deletions janus_core/calculations/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ class Descriptors(BaseCalculation):
write_kwargs
Keyword arguments to pass to ase.io.write if saving structure with
results of calculations. Default is {}.
Methods
-------
run()
Calculate descriptors for structure(s)
"""

def __init__(
Expand Down
5 changes: 0 additions & 5 deletions janus_core/calculations/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ class EoS(BaseCalculation):
List of energies of generated structures.
lattice_scalars : NDArray[float64]
Lattice scalars of generated structures.
Methods
-------
run()
Calculate equation of state.
"""

def __init__(
Expand Down
7 changes: 0 additions & 7 deletions janus_core/calculations/geom_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ class GeomOpt(BaseCalculation):
traj_kwargs
Keyword arguments to pass to ase.io.write to save optimization trajectory.
Must include "filename" keyword. Default is {}.
Methods
-------
set_optimizer()
Set optimizer for geometry optimization.
run()
Run geometry optimization.
"""

def __init__(
Expand Down
27 changes: 0 additions & 27 deletions janus_core/calculations/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,6 @@ class MolecularDynamics(BaseCalculation):
Number of previous steps if restarting simulation.
created_final : bool
Whether the final structure file has been created.
Methods
-------
run()
Run molecular dynamics simulation and/or heating ramp.
get_stats()
Get thermodynamical statistics to be written to file.
"""

def __init__(
Expand Down Expand Up @@ -1169,11 +1162,6 @@ class NPT(MolecularDynamics):
Keyword arguments to pass to ensemble initialization. Default is {}.
**kwargs
Additional keyword arguments.
Attributes
----------
dyn : Dynamics
Configured NPT dynamics.
"""

def __init__(
Expand Down Expand Up @@ -1316,11 +1304,6 @@ class NVT(MolecularDynamics):
Keyword arguments to pass to ensemble initialization. Default is {}.
**kwargs
Additional keyword arguments.
Attributes
----------
dyn : Dynamics
Configured NVT dynamics.
"""

def __init__(
Expand Down Expand Up @@ -1411,11 +1394,6 @@ class NVE(MolecularDynamics):
Keyword arguments to pass to ensemble initialization. Default is {}.
**kwargs
Additional keyword arguments.
Attributes
----------
dyn : Dynamics
Configured NVE dynamics.
"""

def __init__(
Expand Down Expand Up @@ -1624,11 +1602,6 @@ class NPH(NPT):
Keyword arguments to pass to ensemble initialization. Default is {}.
**kwargs
Additional keyword arguments.
Attributes
----------
dyn : Dynamics
Configured NVE dynamics.
"""

def __init__(
Expand Down
25 changes: 0 additions & 25 deletions janus_core/calculations/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,31 +128,6 @@ class Phonons(BaseCalculation):
ASE Calculator attached to structure.
results : dict
Results of phonon calculations.
Methods
-------
calc_force_constants(write_force_consts)
Calculate force constants and optionally write results.
write_force_constants(phonopy_file, force_consts_to_hdf5, force_consts_file)
Write results of force constants calculations.
calc_bands(write_bands)
Calculate band structure and optionally write and plot results.
write_bands(bands_file, save_plots, plot_file)
Write results of band structure calculations.
calc_thermal_props(mesh, write_thermal)
Calculate thermal properties and optionally write results.
write_thermal_props(thermal_file)
Write results of thermal properties calculations.
calc_dos(mesh, write_dos)
Calculate density of states and optionally write results.
write_dos(dos_file, plot_to_file, plot_file, plot_bands, plot_bands_file)
Write results of DOS calculation.
calc_pdos(mesh, write_pdos)
Calculate projected density of states and optionally write results.
write_pdos(pdos_file, plot_to_file, plot_file)
Write results of PDOS calculation.
run()
Run phonon calculations.
"""

def __init__(
Expand Down
5 changes: 0 additions & 5 deletions janus_core/calculations/single_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ class SinglePoint(BaseCalculation):
----------
results : CalcResults
Dictionary of calculated results, with keys from `properties`.
Methods
-------
run()
Run single point calculations.
"""

def __init__(
Expand Down
8 changes: 0 additions & 8 deletions janus_core/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ class FileNameMixin(ABC): # noqa: B024 (abstract-base-class-without-abstract-me
Default prefix to use.
*additional
Components to add to default file_prefix (joined by hyphens).
Methods
-------
_get_default_prefix(file_prefix, struct)
Return a prefix from the provided file_prefix or from chemical formula of
struct.
_build_filename(suffix, *additional, filename, prefix_override)
Return a standard format filename if filename not provided.
"""

def __init__(
Expand Down

0 comments on commit 88907dd

Please sign in to comment.