Skip to content

Commit

Permalink
fix rtd (#24)
Browse files Browse the repository at this point in the history
* add `version.py`

* update version import, pwd on rtd

* run in subdirectory

* update paths for rtd

* Update README.md
  • Loading branch information
PythonFZ authored Nov 26, 2024
1 parent 932c00e commit b7bbca2
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
5 changes: 1 addition & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ build:
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
# Navigate to the examples directory and perform DVC operations
- cd examples
- poetry run dvc remote modify origin endpointurl $AWS_ENDPOINT_URL
- poetry run dvc pull --allow-missing
- cd ..
- cd examples && poetry run dvc remote modify origin endpointurl $AWS_ENDPOINT_URL && poetry run dvc pull --allow-missing

sphinx:
configuration: docs/source/conf.py
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

[📘Documentation](https://mlipx.readthedocs.io) |
[🛠️Installation](https://mlipx.readthedocs.io/en/latest/installation.html) |
[📜Recipes](https://mambular.readthedocs.io/en/latest/recipes.html) |
[🚀Quickstart](https://mambular.readthedocs.io/en/latest/quickstart.html)
[📜Recipes](https://mlipx.readthedocs.io/en/latest/recipes.html) |
[🚀Quickstart](https://mlipx.readthedocs.io/en/latest/quickstart.html)
</div>

<div style="text-align: center;">
Expand Down
6 changes: 2 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import pathlib
import sys
import typing as t

sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
import mlipx

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "mlipx"
copyright = "2024, Fabian Zills, Sheena Agarwal, Sandip De"
author = "Fabian Zills, Sheena Agarwal, Sandip De"
release = "v0.1.0"
release = mlipx.__version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/energy_and_forces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This recipe is used to test the performance of different models in predicting th

from mlipx.doc_utils import get_plots

plots = get_plots("*CompareCalculatorResults", "../examples/metrics/")
plots = get_plots("*CompareCalculatorResults", "../../examples/metrics/")
# raise ValueError(plots.keys())
plots["fmax_error"].show()
plots["adjusted_energy_error_per_atom"].show()
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/energy_volume.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Compute the energy-volume curve for a given material using multiple models.

from mlipx.doc_utils import get_plots

plots = get_plots("*EnergyVolumeCurve", "../examples/energy-volume/")
plots = get_plots("*EnergyVolumeCurve", "../../examples/energy-volume/")
plots["adjusted_energy-volume-curve"].show()

Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/homonuclear_diatomics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In the following we show the results for the :code:`Li-Li` bond for the three se

from mlipx.doc_utils import get_plots

plots = get_plots("*HomonuclearDiatomics", "../examples/diatomics/")
plots = get_plots("*HomonuclearDiatomics", "../../examples/diatomics/")
plots["Li-Li bond (adjusted)"].show()

Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/invariances.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Check the rotational, translational and permutational invariance of an :term:`ml

from mlipx.doc_utils import get_plots

plots = get_plots("*TranslationalInvariance", "../examples/invariances/")
plots = get_plots("*TranslationalInvariance", "../../examples/invariances/")
plots["energy_vs_steps_adjusted"].show()
plots = get_plots("*RotationalInvariance", ".")
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/md.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This recipe is used to test the performance of different models in molecular dyn

from mlipx.doc_utils import get_plots

plots = get_plots("*MolecularDynamics", "../examples/md/")
plots = get_plots("*MolecularDynamics", "../../examples/md/")
plots["energy_vs_steps_adjusted"].show()
This test uses the following Nodes together with your provided model in the :term:`models.py` file:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/neb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can run the following command to instantiate a test directory:

from mlipx.doc_utils import get_plots

plots = get_plots("*NEBs", "../examples/neb/")
plots = get_plots("*NEBs", "../../examples/neb/")
plots["adjusted_energy_vs_neb_image"].show()
This test uses the following Nodes together with your provided model in the :term:`models.py` file:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/phase_diagram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can run the following command to instantiate a test directory:

from mlipx.doc_utils import get_plots

plots = get_plots("*PhaseDiagram", "../examples/phase_diagram/")
plots = get_plots("*PhaseDiagram", "../../examples/phase_diagram/")
plots["mace_mp_0-phase-diagram"].show()
plots["orb_v2_0-phase-diagram"].show()
plots["sevennet_0-phase-diagram"].show()
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/pourbaix_diagram.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pourbaix Diagram

from mlipx.doc_utils import get_plots

plots = get_plots("*PourbaixDiagram", "../examples/pourbaix_diagram/")
plots = get_plots("*PourbaixDiagram", "../../examples/pourbaix_diagram/")
plots["mace_mp_0-pourbaix-diagram"].show()
plots["orb_v2_0-pourbaix-diagram"].show()
plots["sevennet_0-pourbaix-diagram"].show()
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/relax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This recipe is used to test the performance of different models in performing st

from mlipx.doc_utils import get_plots

plots = get_plots("*StructureOptimization", "../examples/relax/")
plots = get_plots("*StructureOptimization", "../../examples/relax/")
plots["adjusted_energy_vs_steps"].show()
This recipe uses the following Nodes together with your provided model in the :term:`models.py` file:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/recipes/vibrational_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Then run the following commands to reproduce and inspect the results:

from mlipx.doc_utils import get_plots

plots = get_plots("*VibrationalAnalysis", "../examples/vibrational_analysis/")
plots = get_plots("*VibrationalAnalysis", "../../examples/vibrational_analysis/")
plots["Gibbs-Comparison"].show()
This test uses the following Nodes together with your provided model in the :term:`models.py` file:
Expand Down
2 changes: 2 additions & 0 deletions mlipx/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ from .nodes.structure_optimization import StructureOptimization
from .nodes.updated_frames import UpdateFramesCalc
from .nodes.vibrational_analysis import VibrationalAnalysis
from .project import Project
from .version import __version__

__all__ = [
"abc",
Expand Down Expand Up @@ -58,4 +59,5 @@ __all__ = [
"PermutationInvariance",
"Rattle",
"Project",
"__version__",
]
3 changes: 3 additions & 0 deletions mlipx/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import importlib.metadata

__version__ = importlib.metadata.version("mlipx")

0 comments on commit b7bbca2

Please sign in to comment.