diff --git a/README.md b/README.md index 9485257..0197583 100644 --- a/README.md +++ b/README.md @@ -35,15 +35,52 @@ nomad-ikz-plugin/ ## Installation -To use the plugin, you need to clone this repo in your local machine and install the package with pip: - -```bash -git clone https://github.com/IKZ-Berlin/nomad-ikz-plugin -cd nomad-ikz-plugin -pip install -e .[dev] -``` - -For more details on what happens under the hood, check the `.toml` file in the `nomad-ikz-plugin` folder: +To use this plugin you need to install several dependent packages. + +There are at least two ways of installing them, depending on your aim: + +- Deploy a custom NOMAD Oasis image. + Refer to the [IKZ NOMAD Oasis custom image](https://github.com/IKZ-Berlin/nomad-oasis-ikz/tree/main) to discover how the `pyproject.toml` is composed. + If you are using some plugins in your Oasis deployment that are also dependencies of this plugin, make sure to have compatible version tags. To do this, you will need the following lines in your Oasis deployment's `pyproject.toml`: + + ```bash + [project.optional-dependencies] + plugins = [ + "nomad-material-processing @ git+https://github.com/FAIRmat-NFDI/nomad-material-processing.git@", + "nomad-measurements @ git+https://github.com/FAIRmat-NFDI/nomad-measurements.git@", + "nomad-analysis @ git+https://github.com/FAIRmat-NFDI/nomad-analysis.git@", + "nomad-ikz-plugin", + "uv_vis_nir_transmission @ git+https://github.com/FAIRmat-NFDI/AreaA-data_modeling_and_schemas.git@#subdirectory=transmission/transmission_plugin/uv_vis_nir_transmission_plugin", + "lakeshore-nomad-plugin @ git+https://github.com/IKZ-Berlin/lakeshore-nomad-plugin.git@", + "laytec_epitt_plugin @ git+https://github.com/IKZ-Berlin/laytec_epitt_nomad_plugin.git@", + "statsmodels" + ] + [tool.uv.sources] + nomad-ikz-plugin = { git = "https://github.com/IKZ-Berlin/nomad-ikz-plugin.git", rev = "v0.1.2" } + ``` + +> [!NOTE] +> the toml above shows that the `nomad-ikz-plugin` is not bound to a commit, rather to a release + +- Develop the plugin in your development environment. + Refer to the [nomad-distro-dev repository](https://github.com/FAIRmat-NFDI/nomad-distro-dev) to setup your environment. + You will then need to add all the dependencies as submodules and also to use the uv command `add` to have them in your python env. + + ```bash + git submodule add https://github.com/FAIRmat-NFDI/nomad-measurements packages/nomad-measurements + git submodule add https://github.com/FAIRmat-NFDI/nomad-material-processing packages/nomad-material-processing + git submodule add https://github.com/IKZ-Berlin/nomad-ikz-plugin packages/nomad-ikz-plugin + git submodule add https://github.com/IKZ-Berlin/laytec_epitt_nomad_plugin packages/laytec_epitt_nomad_plugin + git submodule add https://github.com/IKZ-Berlin/lakeshore-nomad-plugin packages/lakeshore-nomad-plugin + git submodule update --init --recursive + uv add packages/nomad-ikz-plugin + uv add packages/lakeshore-nomad-plugin + uv add packages/laytec_epitt_nomad_plugin + uv add packages/nomad-measurements + uv add packages/nomad-material-processing + ``` + +For more details on what happens in this plugin under the hood, check the `.toml` file in the `nomad-ikz-plugin` folder: - all the installed subpackages are listed under the section `[project.entry-points.'nomad.plugin']`. - `dependencies` and `[project.optional-dependencies]` contain all the other packages installed along to this one. diff --git a/pyproject.toml b/pyproject.toml index a6970b8..db86cd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,10 +33,10 @@ dependencies = [ 'nomad-material-processing', 'nomad-measurements', 'nomad-analysis', # develop branch - 'lakeshore-nomad-plugin @ git+https://github.com/IKZ-Berlin/lakeshore-nomad-plugin.git@69a6deb3f0e99d7b0dc66714105dd62a56f157e9', - 'laytec_epitt_plugin @ git+https://github.com/IKZ-Berlin/laytec_epitt_nomad_plugin.git@f4953ac4ecb55b7003dee323d7d7f473e49ab4e3', - 'transmission @ git+https://github.com/FAIRmat-NFDI/AreaA-data_modeling_and_schemas.git@2b2c38809e63e3578ef63d8c1d1fe9e27aa7a321#subdirectory=transmission/transmission_plugin/uv_vis_nir_transmission_plugin', -] + 'lakeshore-nomad-plugin', + 'laytec_epitt_plugin', + 'transmission @ git+https://github.com/FAIRmat-NFDI/AreaA-data_modeling_and_schemas.git@main#subdirectory=transmission/transmission_plugin/uv_vis_nir_transmission_plugin', + ] [project.optional-dependencies] dev = [