diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97d828e..144f545 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,12 +50,14 @@ docs-gen: image: gitlab-registry.cern.ch/ci-tools/ci-worker:cc7 script: - yum -y install python3 pip3 locmap - - pip3 install sphinx breathe sphinx_rtd_theme sphinx-argparse + - pip3 install sphinx breathe sphinx_rtd_theme sphinx-argparse nbsphinx - mkdir "$CI_OUTPUT_DIR" - - cd docs - - make html + - cd docs/source + - sphinx-apidoc -o modules -E -M ../../higgs_dna + - cd .. + - sphinx-build source build - cd - - - mv docs/build/html/* "$CI_OUTPUT_DIR" + - mv docs/build/* "$CI_OUTPUT_DIR" artifacts: paths: # Upload as an artifact the folder where the output has been generated diff --git a/docs/source/conf.py b/docs/source/conf.py index 39a1e4b..e559a76 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -31,7 +31,8 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [ +extensions = [ + 'nbsphinx', 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.ifconfig', diff --git a/docs/source/examples.rst b/docs/source/examples.rst index bac945d..8acbd5b 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -1,2 +1,5 @@ Examples ======== + +.. toctree:: + ../../notebooks/basics diff --git a/docs/source/modules/higgs_dna.rst b/docs/source/modules/higgs_dna.rst index 8cceb62..47f9c4b 100644 --- a/docs/source/modules/higgs_dna.rst +++ b/docs/source/modules/higgs_dna.rst @@ -14,6 +14,7 @@ Subpackages higgs_dna.metaconditions higgs_dna.samples + higgs_dna.selections higgs_dna.systematics higgs_dna.tools higgs_dna.utils diff --git a/docs/source/modules/higgs_dna.samples.rst b/docs/source/modules/higgs_dna.samples.rst index 46b8d6e..27b09f7 100644 --- a/docs/source/modules/higgs_dna.samples.rst +++ b/docs/source/modules/higgs_dna.samples.rst @@ -14,3 +14,21 @@ Submodules :members: :undoc-members: :show-inheritance: + + +.. automodule:: higgs_dna.samples.file + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: higgs_dna.samples.sample + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: higgs_dna.samples.sample_manager + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/modules/higgs_dna.selections.rst b/docs/source/modules/higgs_dna.selections.rst new file mode 100644 index 0000000..1ec0569 --- /dev/null +++ b/docs/source/modules/higgs_dna.selections.rst @@ -0,0 +1,28 @@ +higgs\_dna.selections package +============================= + +.. automodule:: higgs_dna.selections + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + + +.. automodule:: higgs_dna.selections.jet_selections + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: higgs_dna.selections.lepton_selections + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: higgs_dna.selections.object_selections + :members: + :undoc-members: + :show-inheritance: diff --git a/notebooks/basics.ipynb b/docs/source/notebooks/basics.ipynb similarity index 100% rename from notebooks/basics.ipynb rename to docs/source/notebooks/basics.ipynb diff --git a/notebooks/output/basics/.gitignore b/docs/source/notebooks/output/basics/.gitignore similarity index 100% rename from notebooks/output/basics/.gitignore rename to docs/source/notebooks/output/basics/.gitignore diff --git a/notebooks b/notebooks new file mode 120000 index 0000000..cacf787 --- /dev/null +++ b/notebooks @@ -0,0 +1 @@ +docs/source/notebooks \ No newline at end of file