Commit e684c1c9b2bdbe7917b5981482f93b635d19bbe6

Authored by Etienne Pallier
1 parent f317bdae
Exists in dev

sphinx autodoc generation v6 - add guitastro doc generation + pyreverse

Showing 1 changed file with 25 additions and 15 deletions   Show diff stats
pyros.py
... ... @@ -577,21 +577,31 @@ def install_or_update(UPDATE: bool = False, with_packages: bool = True, with_dat
577 577 log.error(
578 578 "GitPython package (required for obsconfig class) installation failed")
579 579  
580   - # Guitastro
581   - GUITASTRO_PATH = os.path.join(os.getcwd(), "./vendor/guitastro")
582   - print(os.getcwd())
583   - # 1) clone repo if not yet done
584   - if not os.path.exists(GUITASTRO_PATH):
585   - print("Cloning Guitastro repository")
586   - cloned_repo = Repo.clone_from(
587   - "https://gitlab.irap.omp.eu/aklotz/guitastro.git", GUITASTRO_PATH)
588   - print("Cloned successfully: ", cloned_repo.__class__ is Repo)
589   - # 2) install/update requirements
590   - if os.path.exists(GUITASTRO_PATH):
591   - print("Installing/Updating Guitastro python package dependencies")
592   - # Upgrade pip if new version available
593   - os.system(VENV_PYTHON + ' -m pip install --user --upgrade pip')
594   - venv_pip_install2(GUITASTRO_PATH + '/install/requirements.txt', '-r')
  580 + # Guitastro
  581 + GUITASTRO_PATH = os.path.join(os.getcwd(), "./vendor/guitastro")
  582 + print(os.getcwd())
  583 + # 1) clone repo if not yet done
  584 + if not os.path.exists(GUITASTRO_PATH):
  585 + print("Guitastro : Cloning repository")
  586 + cloned_repo = Repo.clone_from(
  587 + "https://gitlab.irap.omp.eu/aklotz/guitastro.git", GUITASTRO_PATH)
  588 + print("Cloned successfully: ", cloned_repo.__class__ is Repo)
  589 + # 2) install/update requirements & generate API doc
  590 + if os.path.exists(GUITASTRO_PATH):
  591 + print("Guitastro : Installing/Updating python package dependencies")
  592 + # Upgrade pip if new version available
  593 + os.system(VENV_PYTHON + ' -m pip install --user --upgrade pip')
  594 + venv_pip_install2(GUITASTRO_PATH + '/install/requirements.txt', '-r')
  595 + print("Guitastro : Generating (updating) API documentation (using Sphinx)")
  596 + # Make html doc from RST
  597 + # cd doc/sourcedoc/
  598 + change_dir(GUITASTRO_PATH + '/doc_rst/')
  599 + # ./MAKE_DOC.sh
  600 + res = execProcess('/bin/bash MAKE_DOC.sh')
  601 + # Come back to where we were before
  602 + # cd -
  603 + change_dir("PREVIOUS")
  604 +
595 605  
596 606 #if test_mode(): print("in test mode")
597 607 # self.execProcess("python3 install/install.py install")
... ...