Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get-rid-of-github-path-in-dependencies #33

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 55 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,61 @@ 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.
You will need the following lines to fulfill the dependencies of this plugin:
aalbino2 marked this conversation as resolved.
Show resolved Hide resolved

```
[project.optional-dependencies]
plugins = [
"nomad-material-processing @ git+https://github.com/FAIRmat-NFDI/nomad-material-processing.git@8545ef374ac53169fe1e40be927a212a364ebda1",
"nomad-measurements @ git+https://github.com/FAIRmat-NFDI/nomad-measurements.git@237dd2b6fc6152dbb8370a24dce26e483fb8ba78",
"nomad-analysis @ git+https://github.com/FAIRmat-NFDI/nomad-analysis.git@7f2fe10084953e2827389e2bcb42df6b106ab484",
"nomad-ikz-plugin",
"uv_vis_nir_transmission @ git+https://github.com/FAIRmat-NFDI/AreaA-data_modeling_and_schemas.git@245a82ddc24da5f8aaa79164e6669c18c2bc1572#subdirectory=transmission/transmission_plugin/uv_vis_nir_transmission_plugin",
"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",
"statsmodels"
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These git paths will change in the near future, as we update the plugins. Making this a part of the docu will require us to update it every time.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These git paths will change in the near future, as we update the plugins. Making this a part of the docu will require us to update it every time.

[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.

```
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
```

- Pip install everything manually (also nomad-lab)
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 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.
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down