From 06fbf45313f04e114092c8082b3376921b9a9900 Mon Sep 17 00:00:00 2001 From: JosePizarro3 Date: Wed, 25 Sep 2024 12:10:52 +0200 Subject: [PATCH 1/3] Added mkdocstring and md pages for each module in the repository --- docs/references/atoms_state.md | 5 +++ docs/references/basis_set.md | 5 +++ docs/references/general.md | 5 +++ docs/references/model_method.md | 5 +++ docs/references/model_system.md | 5 +++ docs/references/numerical_settings.md | 5 +++ docs/references/outputs.md | 5 +++ docs/references/physical_property.md | 5 +++ docs/references/properties/band_gap.md | 5 +++ docs/references/properties/band_structure.md | 5 +++ docs/references/properties/energies.md | 5 +++ docs/references/properties/fermi_surface.md | 5 +++ docs/references/properties/forces.md | 5 +++ docs/references/properties/greens_function.md | 5 +++ docs/references/properties/hopping_matrix.md | 5 +++ docs/references/properties/permittivity.md | 5 +++ .../references/properties/spectral_profile.md | 5 +++ docs/references/properties/thermodynamics.md | 5 +++ docs/references/utils/utils.md | 5 +++ docs/references/variables.md | 5 +++ mkdocs.yml | 35 +++++++++++++++++++ requirements_docs.txt | 1 + 22 files changed, 136 insertions(+) create mode 100644 docs/references/atoms_state.md create mode 100644 docs/references/basis_set.md create mode 100644 docs/references/general.md create mode 100644 docs/references/model_method.md create mode 100644 docs/references/model_system.md create mode 100644 docs/references/numerical_settings.md create mode 100644 docs/references/outputs.md create mode 100644 docs/references/physical_property.md create mode 100644 docs/references/properties/band_gap.md create mode 100644 docs/references/properties/band_structure.md create mode 100644 docs/references/properties/energies.md create mode 100644 docs/references/properties/fermi_surface.md create mode 100644 docs/references/properties/forces.md create mode 100644 docs/references/properties/greens_function.md create mode 100644 docs/references/properties/hopping_matrix.md create mode 100644 docs/references/properties/permittivity.md create mode 100644 docs/references/properties/spectral_profile.md create mode 100644 docs/references/properties/thermodynamics.md create mode 100644 docs/references/utils/utils.md create mode 100644 docs/references/variables.md diff --git a/docs/references/atoms_state.md b/docs/references/atoms_state.md new file mode 100644 index 00000000..2a9592b3 --- /dev/null +++ b/docs/references/atoms_state.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.atoms_state` + + +::: nomad_simulations.schema_packages.atoms_state diff --git a/docs/references/basis_set.md b/docs/references/basis_set.md new file mode 100644 index 00000000..bd4fb49d --- /dev/null +++ b/docs/references/basis_set.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.basis_set` + + +::: nomad_simulations.schema_packages.basis_set diff --git a/docs/references/general.md b/docs/references/general.md new file mode 100644 index 00000000..7c7d2c0a --- /dev/null +++ b/docs/references/general.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.general` + + +::: nomad_simulations.schema_packages.general diff --git a/docs/references/model_method.md b/docs/references/model_method.md new file mode 100644 index 00000000..150b113c --- /dev/null +++ b/docs/references/model_method.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.model_method` + + +::: nomad_simulations.schema_packages.model_method diff --git a/docs/references/model_system.md b/docs/references/model_system.md new file mode 100644 index 00000000..8ed18b32 --- /dev/null +++ b/docs/references/model_system.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.model_system` + + +::: nomad_simulations.schema_packages.model_system diff --git a/docs/references/numerical_settings.md b/docs/references/numerical_settings.md new file mode 100644 index 00000000..07729f26 --- /dev/null +++ b/docs/references/numerical_settings.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.numerical_settings` + + +::: nomad_simulations.schema_packages.numerical_settings diff --git a/docs/references/outputs.md b/docs/references/outputs.md new file mode 100644 index 00000000..ed5a25f6 --- /dev/null +++ b/docs/references/outputs.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.outputs` + + +::: nomad_simulations.schema_packages.outputs diff --git a/docs/references/physical_property.md b/docs/references/physical_property.md new file mode 100644 index 00000000..c1062c90 --- /dev/null +++ b/docs/references/physical_property.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.physical_property` + + +::: nomad_simulations.schema_packages.physical_property diff --git a/docs/references/properties/band_gap.md b/docs/references/properties/band_gap.md new file mode 100644 index 00000000..82326ca3 --- /dev/null +++ b/docs/references/properties/band_gap.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.band_gap diff --git a/docs/references/properties/band_structure.md b/docs/references/properties/band_structure.md new file mode 100644 index 00000000..44b76a12 --- /dev/null +++ b/docs/references/properties/band_structure.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.band_structure diff --git a/docs/references/properties/energies.md b/docs/references/properties/energies.md new file mode 100644 index 00000000..35572b44 --- /dev/null +++ b/docs/references/properties/energies.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.energies diff --git a/docs/references/properties/fermi_surface.md b/docs/references/properties/fermi_surface.md new file mode 100644 index 00000000..574e0873 --- /dev/null +++ b/docs/references/properties/fermi_surface.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.fermi_surface diff --git a/docs/references/properties/forces.md b/docs/references/properties/forces.md new file mode 100644 index 00000000..09ca61e4 --- /dev/null +++ b/docs/references/properties/forces.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.forces diff --git a/docs/references/properties/greens_function.md b/docs/references/properties/greens_function.md new file mode 100644 index 00000000..df1489ab --- /dev/null +++ b/docs/references/properties/greens_function.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.greens_function diff --git a/docs/references/properties/hopping_matrix.md b/docs/references/properties/hopping_matrix.md new file mode 100644 index 00000000..3fa06581 --- /dev/null +++ b/docs/references/properties/hopping_matrix.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.hopping_matrix diff --git a/docs/references/properties/permittivity.md b/docs/references/properties/permittivity.md new file mode 100644 index 00000000..9aba0500 --- /dev/null +++ b/docs/references/properties/permittivity.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.permittivity diff --git a/docs/references/properties/spectral_profile.md b/docs/references/properties/spectral_profile.md new file mode 100644 index 00000000..dd3fb61b --- /dev/null +++ b/docs/references/properties/spectral_profile.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.spectral_profile diff --git a/docs/references/properties/thermodynamics.md b/docs/references/properties/thermodynamics.md new file mode 100644 index 00000000..d3ea616d --- /dev/null +++ b/docs/references/properties/thermodynamics.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.properties` + + +::: nomad_simulations.schema_packages.properties.thermodynamics diff --git a/docs/references/utils/utils.md b/docs/references/utils/utils.md new file mode 100644 index 00000000..7f68d24d --- /dev/null +++ b/docs/references/utils/utils.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.utils` + + +::: nomad_simulations.schema_packages.utils.utils diff --git a/docs/references/variables.md b/docs/references/variables.md new file mode 100644 index 00000000..fe052395 --- /dev/null +++ b/docs/references/variables.md @@ -0,0 +1,5 @@ + +# `nomad_simulations.schema_packages.variables` + + +::: nomad_simulations.schema_packages.variables diff --git a/mkdocs.yml b/mkdocs.yml index 6c9f9ecd..daf603d4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,6 +13,29 @@ nav: - How to use the Simulation schema: howto_use.md - The normalize function: normalize.md - Contact: contact.md + - References: + - general.py: references/general.md + - model_system.py: references/model_system.md + - atoms_state.py: references/atoms_state.md + - model_method.py: references/model_method.md + - numerical_settings.py: references/numerical_settings.md + - basis_set.py: references/basis_set.md + - outputs.py: references/outputs.md + - physical_property.py: references/physical_property.md + - variables.py: references/variables.md + - Properties: + - band_gap.py: references/properties/band_gap.md + - band_structure.py: references/properties/band_structure.md + - energies.py: references/properties/energies.md + - fermi_surface.py: references/properties/fermi_surface.md + - forces.py: references/properties/forces.md + - greens_function.py: references/properties/greens_function.md + - hopping_matrix.py: references/properties/hopping_matrix.md + - permittivity.py: references/properties/permittivity.md + - spectral_profile.py: references/properties/spectral_profile.md + - thermodynamics.py: references/properties/thermodynamics.md + - Utils: + - utils.py: references/utils/utils.md theme: name: material font: @@ -39,6 +62,17 @@ theme: name: Switch to light mode plugins: - search + - mkdocstrings: + default_handler: python + handlers: + python: + options: + show_bases: true # show inheritance from classes + show_source: true # show source code + show_if_no_docstring: true # show methods if they don't have docstrings + show_labels: false # not showing labels in class attrs + docstring_section_style: spacy # different style for input parameters of methods + members_order: source # order of definitions according to source code # - bibtex: # bib_file: docs/assets/refs.bib markdown_extensions: @@ -66,6 +100,7 @@ extra_css: extra_javascript: - 'https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js' - 'https://unpkg.com/cytoscape@3.19.1/dist/cytoscape.min.js' + - 'https://unpkg.com/mermaid@10.9.0/dist/mermaid.min.js' # - assets/code/parse.js extra: version: 0.1 diff --git a/requirements_docs.txt b/requirements_docs.txt index bacf1ed5..c60f1719 100644 --- a/requirements_docs.txt +++ b/requirements_docs.txt @@ -2,3 +2,4 @@ mkdocs mkdocs-material==8.1.1 pymdown-extensions mkdocs-click +mkdocstrings-python \ No newline at end of file From 7ecbd397acfa0ef72dd13ba9a42c18c2a7e3d817 Mon Sep 17 00:00:00 2001 From: JosePizarro3 Date: Wed, 25 Sep 2024 12:13:43 +0200 Subject: [PATCH 2/3] Added basis_set.md docu page --- docs/model_method/{basis_sets.md => basis_set.md} | 0 mkdocs.yml | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename docs/model_method/{basis_sets.md => basis_set.md} (100%) diff --git a/docs/model_method/basis_sets.md b/docs/model_method/basis_set.md similarity index 100% rename from docs/model_method/basis_sets.md rename to docs/model_method/basis_set.md diff --git a/mkdocs.yml b/mkdocs.yml index daf603d4..ad0d3dcb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -8,7 +8,9 @@ nav: - Simulation schema: - Overview: general.md - ModelSystem: model_system/model_system.md - - ModelMethod: model_method/model_method.md + - ModelMethod: + - ModelMethod: model_method/model_method.md + - BasisSet: model_method/basis_set.md - Outputs: outputs/outputs.md - How to use the Simulation schema: howto_use.md - The normalize function: normalize.md From 6e5719e43304e68fbb52699478270e78a9dbd7c1 Mon Sep 17 00:00:00 2001 From: Joseph Rudzinski Date: Fri, 4 Oct 2024 14:45:42 +0200 Subject: [PATCH 3/3] a few small edits (#142) Co-authored-by: jrudz --- docs/general.md | 16 +++++++++------- docs/index.md | 4 ++-- mkdocs.yml | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/general.md b/docs/general.md index 90e1a614..f2bd0083 100644 --- a/docs/general.md +++ b/docs/general.md @@ -3,9 +3,11 @@ -In NOMAD, all the simulation metadata is defined in the `Simulation` section. You can find its Python schema definition in [src/nomad_simulations/general.py](https://github.com/nomad-coe/nomad-simulations/blob/develop/src/nomad_simulations/general.py). This section will appear under the `data` section for the [*archive*](https://nomad-lab.eu/prod/v1/staging/docs/reference/glossary.html#archive) metadata structure of each [*entry*](https://nomad-lab.eu/prod/v1/staging/docs/reference/glossary.html#entry). +In NOMAD, all the simulation metadata is defined in the `Simulation` section. You can find its Python schema definition in [src/nomad_simulations/schema_packages/general.py](https://github.com/nomad-coe/nomad-simulations/blob/develop/src/nomad_simulations/schema_packages/general.py){:target="_blank"}. This section will appear under the `data` section for the [*archive*](https://nomad-lab.eu/prod/v1/staging/docs/reference/glossary.html#archive){:target="_blank"} metadata structure of each [*entry*](https://nomad-lab.eu/prod/v1/staging/docs/reference/glossary.html#entry){:target="_blank"}. -The `Simulation` section inherits from a _base section_ `BaseSimulation`. In NOMAD, a set of [base sections](https://nomad-lab.eu/prod/v1/staging/docs/howto/customization/base_sections.html) derived from the [Basic Formal Ontology (BFO)](https://basic-formal-ontology.org/) are defined. We used them to define `BaseSimulation` as an [`Activity`](http://purl.obolibrary.org/obo/BFO_0000015). The UML diagram is: +The `Simulation` section inherits from a _base section_ `BaseSimulation`. In NOMAD, a set of [base sections](https://nomad-lab.eu/prod/v1/staging/docs/howto/customization/base_sections.html){:target="_blank"} derived from the [Basic Formal Ontology (BFO)](https://basic-formal-ontology.org/){:target="_blank"} are defined. We used them to define `BaseSimulation` as an [`Activity`](http://purl.obolibrary.org/obo/BFO_0000015){:target="_blank"}. + +The UML diagram is: