TNO Intern

Test venv

Changed search paths to let cso run correctly within the new virtual environment. Changed documentation to ensure that autodoc can import the new package files.

Merge request reports

Loading
+3 −1
Changes for bin/cso: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -36,7 +36,9 @@ import logging
# prefix of CSO installation:
prefix = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), os.pardir))
# extend path:
sys.path.insert(0, os.path.join(prefix, "py"))
sys.path.insert(0, os.path.join(prefix, "src"))
sys.path.insert(0, os.path.join(prefix, "src", "utopya"))
sys.path.insert(0, os.path.join(prefix, "src", "cso"))

# tools:
import utopya
+13 −2
Changes for config/tutorial/tutorial.rc: 13 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -270,8 +270,16 @@ my.work : /Scratch/${USER}/CSO-Tutorial
! run jobs in foreground:
*.script.class                      :  utopya.UtopyaJobScriptForeground

! dummy value, will be defined when running in virtrual environment:
VIRTUAL_ENV                         :
! running in virutual envionment?
#if "${VIRTUAL_ENV}" > ""
! interpretor from virtual enviornment, the system path is set automatically:
*.shell                             :  ${VIRTUAL_ENV}/bin/python3
#else
! search path for python modules:
*.pypath                            :  ${CSO_PREFIX}/py
*.pypath                            :  ${CSO_PREFIX}/src:${CSO_PREFIX}/src/utopya:${CSO_PREFIX}/src/cso
#endif

! work directory for jobs; 
*.workdir                           :  ${my.work}/__NAME2PATH__
@@ -292,7 +300,10 @@ my.work : /Scratch/${USER}/CSO-Tutorial

! full time range:
cso.tutorial.inquire-table-dataspace.timerange.start        :  2018-01-01 00:00:00
cso.tutorial.inquire-table-dataspace.timerange.end          :  2024-01-01 00:00:00
cso.tutorial.inquire-table-dataspace.timerange.end          :  2025-01-01 00:00:00
!! ... testing ...
!cso.tutorial.inquire-table-dataspace.timerange.start        :  2018-06-01 00:00:00
!cso.tutorial.inquire-table-dataspace.timerange.end          :  2018-07-01 00:00:00

! API url:
cso.tutorial.inquire-table-dataspace.url                    :  https://catalogue.dataspace.copernicus.eu/resto/api
+21 −4
Changes for doc/source/conf.py: 21 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -12,8 +12,10 @@
#
import os
import sys

sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, os.pardir, "py")))
#
sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, os.pardir, "src")))
sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, os.pardir, "src", "utopya")))
sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, os.pardir, "src", "cso")))


# -- Project information -----------------------------------------------------
@@ -22,8 +24,23 @@ project = "CSO"
copyright = "2020-2025, Arjo Segers"
author = "Arjo Segers"

# The full version, including alpha/beta/rc tags
release = "v2.11"
# extract the version id from the project file:
ppfile = os.path.join(os.pardir, os.pardir, "pyproject.toml")
# check ..
if not os.path.isfile(ppfile):
    # info ...
    print(f"WARNING - could not find '{ppfile}' to extract release tag ...")
    # dummy:
    release = "vx.y"
else:
    # modules:
    import toml
    # open file:
    with open(ppfile, "r") as f:
        config = toml.load(f)
    # extrract:
    release = config["project"]["version"]
#endif


# -- General configuration ---------------------------------------------------
+3 −0
Changes for doc/source/history.rst: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -116,6 +116,9 @@ A summary of the versions and changes.
* | *v2.11*
  | Support inquiry and download from NASA EarthData archive.
  
* | *v2.12*
  | Support running in Python virtual environment.


To be included
==============
+1 −1
Changes for doc/source/pymod-cso_catalogue.rst: 1 added line, 1 removed line.
Original line number Diff line number Diff line
.. Documentation for module.

.. Import documentation from ".py" file:
.. automodule:: cso_catalogue
.. automodule:: cso.cso_catalogue
Loading
Loading