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

Update required nomad-lab version and add warning to README #86

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ This is a plugin for [NOMAD](https://nomad-lab.eu) which contains base sections
material processing.

## Getting started
`nomad-material-processing` can be installed from PyPI using `pip`:
`nomad-material-processing` can be installed from PyPI using `pip`.

> [!WARNING]
> Unfortunately, the current plugin mechanism is not supported by the latest nomad-lab version on PyPI and therefore an index url pointing to the NOMAD Gitlab registry needs to be added.

```sh
pip install nomad-material-processing
pip install nomad-material-processing --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
```

### Setting up your OASIS
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ authors = [
]
license = { file = "LICENSE" }
dependencies = [
"nomad-lab>=1.3.4dev",
"nomad-lab>=1.3.6",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that now we require index-url for the pip install, we can still keep using the dev version (>=1.3.4dev)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But 1.3.4.dev fails, no? We should require what is actually required to run the plugin or what do you mean?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, 1.3.4dev works because it pulls whatever latest dev (1.3.7devNN) is available on the registry

Copy link
Collaborator

Choose a reason for hiding this comment

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

For the issue that Fabian is facing, I think using the index-URL should solve it for him as you mentioned on the issue, as now when pip installing, the latest dev of nomad-lab will be pulled.

For the general milestone issue that we need a stable version as a dependency, we only have 1.3.6 as the current viable option (as 1.3.4 would fail the pytest). However, as you pointed out in today's discussion, there are some important issues not addressed in 1.3.6 and we should wait for a 1.3.7 #79 (comment)

Copy link
Collaborator Author

@hampusnasstrom hampusnasstrom Sep 13, 2024

Choose a reason for hiding this comment

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

That is not how a dependency works @ka-sarthak. If I write numpy >= 1.3.4 in the toml it will pull the latest from PyPI which is 2.1.1 but by listing numpy >= 1.3.4 in the toml we are saying that it should work with anything above and including that version! If we put 1.3.4.dev in our toml and someone has 1.3.4.dev32 installed locally they will not get nomad-lab updated and the solution class will not work. Do you understand what I mean?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you are right when it comes to pip updating the version of an already installed package. I always tested it with a fresh environment, so 1.3.4dev picked the latest dev, for example, 1.3.7.dev{something}, and never encountered the issue you pointed above. Let's use 1.3.6 then.

]

[project.urls]
Expand Down