diff --git a/.gitignore b/.gitignore index 4adcf97b..84538dbd 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ docs/source/_static/*.gif *.egg-info venv/ tmp/ +docs/source/APIRef.rst +compose/evaluation_system.conf diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 1e55ecfe..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog - -All notable changes to Freva will be documented in this file. - -## [Unreleased] - -### Added -- .pre-commit-config.yaml and CHANGELOG.md - -### Changed - -### Fixed -- Corrected minor typos in documentation and code comments. (fix typo, minor typo, minor typo separator) -- Temporarily disabled `test_plugin_status` unit-test in `plugin_command_test.py` for further investigation. -- making a standard_main function in `utils.py` in cli diff --git a/Makefile b/Makefile index 45cf68d4..4582f01d 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,8 @@ prepdocs: --env EVALUATION_SYSTEM_CONFIG_FILE $(EVALUATION_SYSTEM_CONFIG_FILE) \ --env EVALUATION_SYSTEM_PLUGINS $(EVALUATION_SYSTEM_PLUGINS) python3 -m bash_kernel.install + rm -rf docs/source/APIRef.rst + curl -Ls -o docs/source/api/APIRef.rst https://raw.githubusercontent.com/FREVA-CLINT/freva-nextgen/main/docs/source/databrowser/APIRef.rst make dummy-data compose/animator_plugin_run.sh diff --git a/docs/source/api/APIRef.rst b/docs/source/api/APIRef.rst new file mode 100644 index 00000000..a4256947 --- /dev/null +++ b/docs/source/api/APIRef.rst @@ -0,0 +1,747 @@ +Databrowser Rest API +==================== +The Freva Databrowser REST API is a powerful tool that enables you to search +for climate and environmental datasets seamlessly in various programming +languages. By generating RESTful requests, you can effortlessly access +collections of various datasets, making it an ideal resource for +climate scientists, researchers, and data enthusiasts. + +The API's flexible design allows you to perform searches for climate datasets +in a wide range of programming languages. By generating RESTful requests, +you can easily integrate the API into your preferred language and environment. +Whether you use Python, JavaScript, R, Julia, or any other language with HTTP +request capabilities, the Freva Databrowser REST API accommodates your needs. + + + +.. _databrowser-api-overview: + +Getting an overview +------------------- + +.. http:get:: /api/databrowser/overview + + This endpoint allows you to retrieve an overview of the different + Data Reference Syntax (DRS) standards implemented in the Freva Databrowser + REST API. The DRS standards define the structure and metadata organisation + for climate datasets, and each standard offers specific attributes for + searching and filtering datasets. + + :statuscode 200: no error + :resheader Content-Type: ``application/json``: the available DRS search standards + and their search facets. + + - ``flavours``: array of available DRS stanards. + - ``attributes``: array of search facets for each available DRS standard. + + Example Request + ~~~~~~~~~~~~~~~ + + .. sourcecode:: http + + GET /api/databrowser/overview HTTP/1.1 + Host: api.freva.example + + Example Response + ~~~~~~~~~~~~~~~~ + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + { + "flavours": [ + "freva", + "cmip6", + "cmip5", + "cordex", + "nextgems" + ], + "attributes": { + "freva": [ + "experiment", + "ensemble", + "fs_type", + "grid_label", + "institute", + "model", + // ... (other facets) + ], + "cmip6": [ + "experiment_id", + "member_id", + "fs_type", + "grid_label", + "institution_id", + "source_id", + "mip_era", + "activity_id", + // ... (other facets) + ], + // ... (other DRS standards) + } + } + + + Code examples + ~~~~~~~~~~~~~ + Below you can find example usages of this request in different scripting and + programming languages + + .. tabs:: + + .. code-tab:: bash + :caption: Shell + + # Parse the json-content with jq + curl -X GET \ + http://api.freva.example/api/databrowser/overview | jq .attributes.cordex + + .. code-tab:: python + :caption: Python + + import requests + response = requests.get("http://api.freva.example/api/databrowser/overview") + data = response.json() + + .. code-tab:: r + :caption: gnuR + + library(httr) + response <- GET("http://api.freva.example/api/databrowser/overview") + data <- jsonlite::fromJSON(content(response, as = "text", encoding = "utf-8")) + + .. code-tab:: julia + :caption: Julia + + using HTTP + using JSON + response = HTTP.get("http://api.freva.example/api/databrowser/overview") + data = JSON.parse(String(HTTP.body(response))) + + .. code-tab:: c + :caption: C/C++ + + #include + #include + + int main() { + CURL *curl; + CURLcode res; + + curl = curl_easy_init(); + if (curl) { + char url[] = "https://api.freva.example/api/databrowser/overview"; + + curl_easy_setopt(curl, CURLOPT_URL, url); + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + } + + return 0; + } + +--- + +.. _databrowser-api-search: + +Searching for datasets locations +--------------------------------- + +.. http:get:: /api/databrowser/data_search/(str:flavour)/(str:uniq_key) + + This endpoint allows you to search for climate datasets based on the specified + Data Reference Syntax (DRS) standard (`flavour`) and the type of search result + (`uniq_key`), which can be either "file" or "uri". The `databrowser` method + provides a flexible and efficient way to query datasets matching specific search + criteria and retrieve a list of data files or locations that meet the query + parameters. + + :param flavour: The Data Reference Syntax (DRS) standard specifying the + type of climate datasets to query. The available + DRS standards can be retrieved using the + ``GET /overview`` method. + :type flavour: str + :param uniq_key: The type of search result, which can be either "file" or + "uri". This parameter determines whether the search + will be based on file paths or Uniform Resource + Identifiers (URIs). + :type uniq_key: str + :query start: Specify the starting point for receiving search results. + Default is 0. + :type start: int + :query multi-version: Use versioned datasets for querying instead of the + latest datasets. Default is false. + :type multi-version: bool + :query \**search_facets: With any other query parameters you refine your + data search. Query parameters could be, depending + on the DRS standard flavour ``product``, ``project`` + ``model`` etc. + + :statuscode 200: no error + :statuscode 422: invalid query parameters + :resheader Content-Type: ``text/plain``: `stream` providing a list of data + files or locations that match the search criteria. + + + + + Example Request + ~~~~~~~~~~~~~~~ + + Here's an example of how to use this endpoint with additional parameters. + In this example we use the `freva` DRS standard and search for `file` entries. + Here we also want to get only those datasets that belong to the ``EUR-11`` + ``product`` and are store in the cloud (``fs_type=swift``) + + .. sourcecode:: http + + GET /api/databrowser/data_search/freva/file?product=EUR-11&fs_type=swift HTTP/1.1 + Host: api.freva.example + + Example Response + ~~~~~~~~~~~~~~~~ + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: plain/text + + https://swift.dkrz.de/v1/dkrz_a32dc0e8-2299-4239-a47d-6bf45c8b0160/freva_test/model/ + regional/cordex/output/EUR-11/GERICS/NCC-NorESM1-M/rcp85/r1i1p1/GERICS-REMO2015/v1/ + 3hr/pr/v20181212/pr_EUR-11_NCC-NorESM1-M_rcp85_r1i1p1_GERICS-REMO2015_v2_3hr_200701 + 020130-200701020430.zarr\n + https://swift.dkrz.de/v1/dkrz_a32dc0e8-2299-4239-a47d-6bf45c8b0160/freva_test/model/ + regional/cordex/output/EUR-11/CLMcom/MPI-M-MPI-ESM-LR/historical/r1i1p1/CLMcom-CCLM4-8-17/ + v1/day/tas/v20140515/tas_EUR-11_MPI-M-MPI-ESM-LR_historical_r1i1p1_CLMcom-CCLM4-8-17_v1_ + day_194912011200-194912101200.zarr\n + + Code examples + ~~~~~~~~~~~~~ + Below you can find example usages of this request in different scripting and + programming languages. + + .. tabs:: + + .. code-tab:: bash + :caption: Shell + + curl -X GET \ + 'http://api.freva.example/api/databrowser/data_search/freva/file?product=EUR-11&fs_type=swift' + + .. code-tab:: python + :caption: Python + + import requests + response = requests.get( + "http://api.freva.example/api/databrowser/data_search/freva/file", + pramas={"product": "EUR-11", "fs_type": "swift"} + ) + data = list(response.iter_lines(decode_unicode=True)) + + .. code-tab:: r + :caption: gnuR + + library(httr) + response <- GET( + "http://api.freva.example/api/databrowser/data_search/freva/file", + query = list(product = "EUR-11", fs_type = "swift") + ) + data <- strsplit(content(response, as = "text", encoding = "UTF-8"), "\n")[[1]] + + + + .. code-tab:: julia + :caption: Julia + + using HTTP + response = HTTP.get( + "http://api.freva.example/api/databrowser/data_search/freva/file", + query = Dict("product" => "EUR-11", "fs_type" => "swift") + ) + data = split(String(HTTP.body(response)),"\n") + + .. code-tab:: c + :caption: C/C++ + + #include + #include + + int main() { + CURL *curl; + CURLcode res; + const char *url = "https://api.freva.example/api/databrowser/data_search/freva/file"; + + // Query parameters + const char *product = "EUR-11"; + const char *fs_type = "swift" + const int start = 0; + const int multi_version = 0; // 0 for false, 1 for true + + // Build the query string + char query[256]; + snprintf(query, sizeof(query), + "?product=%s&fs_type=%s&start=%d&multi-version=%d",product, fs_type , start, multi_version); + + // Initialize curl + curl = curl_easy_init(); + if (!curl) { + fprintf(stderr, "Failed to initialize curl\n"); + return 1; + } + + // Construct the full URL with query parameters + char full_url[512]; + snprintf(full_url, sizeof(full_url), "%s%s", url, query); + + // Set the URL to fetch + curl_easy_setopt(curl, CURLOPT_URL, full_url); + + // Perform the request + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + + // Clean up + curl_easy_cleanup(curl); + + return 0; + } + +--- + +The `databrowser` endpoint provides a powerful tool to search for climate +datasets based on various criteria. By using this method, you can efficiently +retrieve a list of data files or locations that match your specific requirements. +Make the most of the `databrowser` endpoint to access valuable climate data +effortlessly in the Freva Databrowser REST API! + + +.. _databrowser-api-search_facets: + +Searching for metadata +---------------------- + +.. http:get:: /api/databrowser/metadata_search/(str:flavour)/(str:uniq_key) + + This endpoint allows you to search metadata (facets) based on the + specified Data Reference Syntax (DRS) standard (`flavour`) and the type of + search result (`uniq_key`), which can be either `file` or `uri`. + Facets represent the metadata categories associated with the climate datasets, + such as experiment, model, institute, and more. This method provides a + comprehensive view of the available facets and their corresponding counts + based on the provided search criteria. + + :param flavour: The Data Reference Syntax (DRS) standard specifying the + type of climate datasets to query. The available + DRS standards can be retrieved using the + ``GET /overview`` method. + :type flavour: str + :param uniq_key: The type of search result, which can be either "file" or + "uri". This parameter determines whether the search + will be based on file paths or Uniform Resource + Identifiers (URIs). + :type uniq_key: str + :query multi-version: Use versioned datasets for querying instead of the + latest datasets. Default is false. + :type multi-version: bool + :query facets: The facets that should be part of the output, by default + all facets will be returned. + :type facets: str, list + :query translate: Translate the metadata output to the required DRS flavour. + Default is true + :type translate: bool + :query \**search_facets: With any other query parameters you refine your + data search. Query parameters could be, depending + on the DRS standard flavour ``product``, ``project`` + ``model`` etc. + :type \**search_facets: str, list[str] + + :statuscode 200: no error + :statuscode 422: invalid query parameters + :resheader Content-Type: ``application/json``: Metadata matching the data + query. + + - ``total_count``: Number of dataset found for + - ``facets``: Table of occurring metadata facets. + each facet entry contains a list of facet values + followed by the number of occurrences of this + facet. + - ``facet_mapping``: Translation rules describing + how to map the freva DRS standard to the desired + standard. This can be useful if ``GET /search_facets`` + was instructed to *not* tranlate the facet entries + and the translation should be done from client side. + - ``primary_facets``: Array of facets that are most + important. This can be useful for building clients + that should hide lesser used metadata by default. + + Example Request + ~~~~~~~~~~~~~~~ + + Here's an example of how to use this endpoint with additional parameters. + In this example we use the `freva` DRS standard and search for `file` entries. + Here we also want to get only those datasets that belong to the ``EUR-11`` + ``product``. + + .. sourcecode:: http + + GET /api/databrowser/metadata_search/freva/file?product=EUR-11 HTTP/1.1 + Host: api.freva.example + + Example Response + ~~~~~~~~~~~~~~~~ + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + { + "total_count": 7, + "facets": { + "cmor_table": ["1day", "3", "3hr", "3", "fx", "1"], + "dataset": ["cordex-fs", "3", "cordex-hsm", "2", "cordex-swfit", "2"], + "driving_model": ["mpi-m-mpi-esm-lr", "4", "ncc-noresm1-m", "3"], + "ensemble": ["r0i0p0", "1", "r1i1p1", "6"], + "experiment": ["historical", "4", "rcp85", "3"], + "format": ["nc", "5", "zarr", "2"], + "fs_type": ["posix", "7"], + "grid_id": [], + "grid_label": ["gn", "7"], + "institute": ["clmcom", "4", "gerics", "3"], + "level_type": ["2d", "7"], + "model": ["mpi-m-mpi-esm-lr-clmcom-cclm4-8-17-v1", "4", "ncc-noresm1-m-gerics-remo2015-v1", "3"], + "product": ["eur-11", "7"], + "project": ["cordex", "7"], + "rcm_name": ["clmcom-cclm4-8-17", "4", "gerics-remo2015", "3"], + "rcm_version": ["v1", "7"], + "realm": ["atmos", "7"], + "time_aggregation": ["avg", "7"], + "time_frequency": ["1day", "3", "3hr", "3", "fx", "1"], + "variable": ["orog", "1", "pr", "3", "tas", "3"] + }, + "facet_mapping": { + "experiment": "experiment", + "ensemble": "ensemble", + "fs_type": "fs_type", + "grid_label": "grid_label", + "institute": "institute", + "model": "model", + "project": "project", + "product": "product", + "realm": "realm", + "variable": "variable", + "time_aggregation": "time_aggregation", + "time_frequency": "time_frequency", + "cmor_table": "cmor_table", + "dataset": "dataset", + "driving_model": "driving_model", + "format": "format", + "grid_id": "grid_id", + "level_type": "level_type", + "rcm_name": "rcm_name", + "rcm_version": "rcm_version" + }, + "primary_facets": ["experiment", "ensemble", "institute", "model", "project", "product", "realm", "time_aggregation", "time_frequency"] + } + + Code examples + ~~~~~~~~~~~~~ + Below you can find example usages of this request in different scripting and + programming languages. + + + .. tabs:: + + .. code-tab:: bash + :caption: Shell + + curl -X GET 'http://api.freva.example/api/databrowser/metadata_search/freva/file?product=EUR-11' + + + .. code-tab:: python + :caption: Python + + import requests + response = requests.get( + "http://api.freva.example/api/databrowser/metadata_search/freva/file", + pramas={"product": "EUR-11"} + ) + data = response.json() + + .. code-tab:: r + :caption: gnuR + + library(httr) + response <- GET( + "http://api.freva.example/api/databrowser/metadata_search/freva/file", + query = list(product = "EUR-11") + ) + data <- jsonlite::fromJSON(content(response, as = "text", encoding = "utf-8")) + + .. code-tab:: julia + :caption: Julia + + using HTTP + using JSON + response = HTTP.get( + "http://api.freva.example/api/databrowser/metadata_search/freva/file", + query = Dict("product" => "EUR-11") + ) + data = JSON.parse(String(HTTP.body(response))) + + .. code-tab:: c + :caption: C/C++ + + #include + #include + + int main() { + CURL *curl; + CURLcode res; + const char *url = "https://api.example.com/api/databrowser/metadata_search/freva/file"; + + // Query parameters + const char *product = "EUR-11"; + + // Build the query string + char query[256]; + snprintf(query, sizeof(query), "?product=%s", product); + + // Initialize curl + curl = curl_easy_init(); + if (!curl) { + fprintf(stderr, "Failed to initialize curl\n"); + return 1; + } + + // Construct the full URL with query parameters + char full_url[512]; + snprintf(full_url, sizeof(full_url), "%s%s", url, query); + + // Set the URL to fetch + curl_easy_setopt(curl, CURLOPT_URL, full_url); + + // Perform the request + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + + // Clean up + curl_easy_cleanup(curl); + + return 0; + } + + +--- + +.. _databrowser-api-intake: + +Generating an intake-esm catalogue +---------------------------------- + +.. http:get:: /api/databrowser/intake_catalogue/(str:flavour)/(str:uniq_key) + + This endpoint generates an intake-esm catalogue in JSON format from a `freva` + search. The catalogue includes metadata about the datasets found in the search + results. Intake-esm is a data cataloging system that allows easy organization, + discovery, and access to Earth System Model (ESM) data. The generated catalogue + can be used by tools compatible with intake-esm, such as Pangeo. + + :param flavour: The Data Reference Syntax (DRS) standard specifying the + type of climate datasets to query. The available + DRS standards can be retrieved using the + ``GET /api/datasets/overview`` method. + :type flavour: str + :param uniq_key: The type of search result, which can be either "file" or + "uri". This parameter determines whether the search + will be based on file paths or Uniform Resource + Identifiers (URIs). + :type uniq_key: str + :query start: Specify the starting point for receiving search results. + Default is 0. + :type start: int + :query max-results: Raise an Error if more results are found than that + number, -1 for do not raise at all. + :type max-results: int + :query multi-version: Use versioned datasets for querying instead of the + latest datasets. Default is false. + :type multi-version: bool + :query translate: Translate the metadata output to the required DRS flavour. + Default is true + :type translate: bool + :query \**search_facets: With any other query parameters you refine your + data search. Query parameters could be, depending + on the DRS standard flavour ``product``, ``project`` + ``model`` etc. + :type \**search_facets: str, list[str] + + :statuscode 200: no error + :statuscode 400: no entries found for this query + :statuscode 422: invalid query parameters + :resheader Content-Type: ``application/json``: the intake-esm catalogue + + + Example Request + ~~~~~~~~~~~~~~~ + + Here's an example of how to use this endpoint with additional parameters. + In this example we want to create an intake-catalogue that follows the + `freva` DRS standard and points to data files rather than uris. + Here we also want to get only those datasets that belong to the ``EUR-11`` + ``product``. + + .. sourcecode:: http + + GET /api/databrowser/intake_catalogue/freva/file?product=EUR-11 HTTP/1.1 + Host: api.freva.example + + Example Response + ~~~~~~~~~~~~~~~~ + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + { + "esmcat_version": "0.1.0", + "attributes": [ + { + "column_name": "project", + "vocabulary": "" + }, + { + "column_name": "product", + "vocabulary": "" + }, + { + "column_name": "institute", + "vocabulary": "" + }, + // ... (other attributes) + ], + "assets": { + "column_name": "uri", + "format_column_name": "format" + }, + "id": "freva", + "description": "Catalogue from freva-databrowser v2023.4.1", + "title": "freva-databrowser catalogue", + "last_updated": "2023-07-26T10:50:18.592898", + "aggregation_control": { + // ... (aggregation options) + }, + "catalog_dict": [ + { + "file": "https://swift.dkrz.de/v1/...", + "project": ["cordex"], + "product": ["EUR-11"], + "institute": ["GERICS"], + "model": ["NCC-NorESM1-M-GERICS-REMO2015-v1"], + "experiment": ["rcp85"], + "time_frequency": ["3hr"], + "realm": ["atmos"], + "variable": ["pr"], + "ensemble": ["r1i1p1"], + "cmor_table": ["3hr"], + "fs_type": "posix", + "grid_label": ["gn"] + }, + // ... (other datasets) + ] + } + + + Example + ~~~~~~~ + Below you can find example usages of this request in different scripting and + programming languages. + + .. tabs:: + + .. code-tab:: bash + :caption: Shell + + curl -X GET \ + 'http://api.freva.example/api/databrowser/intake_catalogue/freva/file?product=EUR-11' > catalogue.json + + .. code-tab:: python + :caption: Python + + import requests + import intake + response = requests.get( + "http://api.freva.example/api/databrowser/intake_catalogue/freva/file", + pramas={"product": "EUR-11"} + ) + cat = intake.open_esm_datastore(cat) + + .. code-tab:: r + :caption: gnuR + + library(httr) + response <- GET( + "http://api.freva.example/api/databrowser/intake_catalogue/freva/file", + query = list(product = "EUR-11") + ) + json_content <- content(response, "text", encoding="utf-8") + write(json_content, file = "intake_catalogue.json") + + .. code-tab:: julia + :caption: Julia + + using HTTP + using JSON + response = HTTP.get( + "http://api.freva.example/api/databrowser/intake_catalogue/freva/file", + query = Dict("product" => "EUR-11") + ) + data = JSON.parse(String(HTTP.body(response))) + open("intake_catalogue.json", "w") do io + write(io, JSON.json(data)) + end + + .. code-tab:: c + :caption: C/C++ + + #include + #include + + int main() { + CURL *curl; + CURLcode res; + FILE *fp; + + curl = curl_easy_init(); + if (curl) { + char url[] = "http://api.freva.example/api/databrowser/intake_catalogue/freva/file?product=EUR-11"; + curl_easy_setopt(curl, CURLOPT_URL, url); + + fp = fopen("intake_catalogue.json", "w"); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); + + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + printf("Error: %s\n", curl_easy_strerror(res)); + } + + curl_easy_cleanup(curl); + fclose(fp); + } + return 0; + } + +--- + +.. note:: + Please note that in these examples, + I used "https://api.freva.example" as a placeholder URL. + You should replace it with the actual URL of your + Freva Databrowser REST API. The response above is truncated for brevity. + The actual response will include more datasets in the `catalog_dict` list. diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst new file mode 100644 index 00000000..e2f4adae --- /dev/null +++ b/docs/source/api/index.rst @@ -0,0 +1,16 @@ +.. _APIReference: + +API Reference +-------------- + +This chapter intrdocues various freva API's here you can get an overview over +the plugin API and the parameter API for getting to know how to set up your +own data analysis plugins as well as the databrowser REST API that let's you +search the databrowser via simple REST requests. + +.. toctree:: + :maxdepth: 2 + + plugin_api + parameter_api + APIRef diff --git a/docs/source/api/parameter_api.rst b/docs/source/api/parameter_api.rst new file mode 100644 index 00000000..19d39edc --- /dev/null +++ b/docs/source/api/parameter_api.rst @@ -0,0 +1,10 @@ +.. _ParameterAPI: + +Parameter API Reference +======================= + + +.. automodule:: evaluation_system.api.parameters + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/plugin_api.rst b/docs/source/api/plugin_api.rst similarity index 52% rename from docs/source/plugin_api.rst rename to docs/source/api/plugin_api.rst index 7397c4cd..286b0669 100644 --- a/docs/source/plugin_api.rst +++ b/docs/source/api/plugin_api.rst @@ -1,11 +1,3 @@ -.. _APIReference: - -API Reference --------------- - -.. toctree:: - :maxdepth: 3 - .. _PluginAPI: Plugin API Reference @@ -16,15 +8,3 @@ Plugin API Reference :undoc-members: :show-inheritance: :special-members: __version__, __long_description__, __short_description__, __parameters__, __category__, __tags__ - - -.. _ParameterAPI: - -Parameter API Reference -======================= - - -.. automodule:: evaluation_system.api.parameters - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/conf.py b/docs/source/conf.py index b1ab9627..c6deb1ad 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,6 +49,9 @@ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", + "sphinxcontrib.httpdomain", + "sphinx_code_tabs", + "sphinx_togglebutton", "nbsphinx", "recommonmark", "sphinx_execute_code", diff --git a/docs/source/index.rst b/docs/source/index.rst index 1d0ee2cb..1c80a9ca 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -62,8 +62,9 @@ and best practices when it comes to plugin development. Freva FrevaCli + api/index developers_guide - plugin_api + notebooks/index FAQ.ipynb whats-new diff --git a/docs/source/notebooks/index.rst b/docs/source/notebooks/index.rst new file mode 100644 index 00000000..075d78ec --- /dev/null +++ b/docs/source/notebooks/index.rst @@ -0,0 +1,13 @@ +Examples +======== + +This chapters contains a collecton of examples that demonstrate +the usage for freva by jupyter notebooks. Enjoy! + +.. toctree:: + :maxdepth: 2 + + 01-Using_the_Databrowser + 02-Add_own_datasets + 03-Applying_Plugins_and_Search_for_History + 04-The_CommandLineInterface diff --git a/docs/source/whats-new.rst b/docs/source/whats-new.rst index 2862ae75..3ba910ab 100644 --- a/docs/source/whats-new.rst +++ b/docs/source/whats-new.rst @@ -5,9 +5,28 @@ What's new :maxdepth: 0 :titlesonly: +v2406.0.0 +~~~~~~~~~ + +Bug fixes ++++++++++ + +- Fixed plugin batchmode submit bug. Batchmode plugins did not pick up the + correct evaluation system config file. This has been fixed now. +- Revised minor typographical errors in the documentation and code comments. +- Created a standard_main function in `utils.py` for cli + +Documentations +++++++++++++++ +- Added documentation of the freva databrowser rest api. + +Internal Changes +++++++++++++++++ +- Updated unit tests. +- Added .pre-commit-config.yaml + v2309.0.1 ~~~~~~~~~~ - New Features ++++++++++++ diff --git a/setup.py b/setup.py index aea4c107..858642e1 100755 --- a/setup.py +++ b/setup.py @@ -121,10 +121,10 @@ def get_data_files(): packages=find_packages("src"), package_dir={"": "src"}, project_urls={ - "Documentation": "https://freva.gitlab-pages.dkrz.de/evaluation_system/sphinx_docs/index.html", - "Release notes": "https://freva.gitlab-pages.dkrz.de/evaluation_system/sphinx_docs/whats-new.html", - "Issues": "https://gitlab.dkrz.de/freva/evaluation_system/-/issues", - "Source": "https://gitlab.dkrz.de/freva/evaluation_system", + "Documentation": "https://freva-clint.github.io/freva/", + "Release notes": "https://freva-clint.github.io/freva/whats-new.html", + "Issues": "https://github.com/FREVA-CLINT/freva/issues", + "Source": "https://github.com/FREVA-CLINT/freva", }, cmdclass={"install": InstallCommand}, install_requires=[ @@ -164,11 +164,14 @@ def get_data_files(): "ipython", "ipykernel", "nbsphinx", + "sphinxcontrib-httpdomain", "pint", "pydata-sphinx-theme", "pint-xarray", "recommonmark", "sphinx", + "sphinx-togglebutton", + "sphinx-code-tabs", "sphinxcontrib_github_alt", "sphinx-execute-code-python3", "sphinx-copybutton", @@ -204,7 +207,7 @@ def get_data_files(): entry_points={"console_scripts": entry_points}, python_requires=">=3.7", classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 7 - Inactive", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", @@ -215,6 +218,8 @@ def get_data_files(): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Physics", "Topic :: Scientific/Engineering :: Atmospheric Science", ], diff --git a/src/evaluation_system/__init__.py b/src/evaluation_system/__init__.py index e5ca8902..2bae9671 100644 --- a/src/evaluation_system/__init__.py +++ b/src/evaluation_system/__init__.py @@ -38,4 +38,4 @@ ) -__version__ = "2309.0.2" +__version__ = "2406.0.0"