Configuring NekUpload General ============================= ``NekData`` contains configuration files for specifying Nektar++ settings. This provides an easy way to edit Nektar++ configuration as it evolves. Currently, only solver types and field variables are supported, but it is hoped that more of teh code can be migrated such at the configuration file is specified rather than in-code changes. Configuring NekUpload GUI ========================= The NekUpload GUI comes with presets for available online repositories and communities. This is designed to provide users with easier access to the repositories and communities without worrying about how to locate them. Developers can edit what presets are available via configuration files. Locating Configuration Files ---------------------------- From the root of the repository, the configuration files can be located at ``NekUpload/frontend/config``. This directory contains the yaml configuration files and Python code to interpret the configuration files. The Python code provides a simple interface between the configuration files and the frontend GUI. Configuring Repository Information and Communities -------------------------------------------------- The file ``db_targets.yaml`` can be configured to add repository and community informations, which will provide the user of NekUpload GUI to access different communities and repositories without worrying about the details. The configuration file uses YAML and takes the following form: .. code:: yaml databases: - name: AE Datastore url: https://data.ae.ic.ac.uk communities: - name: Nektar++ community_slug: nektar - name: InvenioRDM Demo url: https://inveniordm.web.cern.ch communities: - name: Test community_slug: test_nekupload .. tip:: YAML is indentation sensitive, and indentation is 2 spaces to denote a new block. Utilise a YAML tool to help you construct the configuration. Alternatively, you can copy the pre-existing configuration file and use it as a base. The root ``databases`` is used to denote the available databases and communities within that database. Each database should be provided with a ``name``, followed by a ``url`` denoting where the online repository is hosted. The list of available communities that you wish to provide users can then be used specified under ``communities``. For each provided community, you should specify the ``name`` of the community and the ``community_slug``, which is the human-readable unique identifier of an `InvenioRDM community `_. Once you have edited the configuration, you can double-check the NekUpload GUI to see the changes. To see your available communities, navigate to the Settings page and you should see something similar to below (using above configuration as an example): .. image:: ../_static/repository_settings.png :alt: Repository settings :width: 600px :align: center Selecting one of the repositories will lead to the target repository url being loaded in directly. Suppose AE Datastore is selected and saved in settings, you can now navigate the Upload page, where you can now see the available communities associated with the selected database: .. image:: ../_static/community_settings.png :alt: Community settings :width: 600px :align: center Selecting the associated community will automatically load in the related community id. .. note:: The Python interface will automatically add a Custom database and a Custom community to each database to allow users to manually configure their own targets should they wish to.