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

📦️(project) improve dependencies management #218

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

jmaupetit
Copy link
Contributor

@jmaupetit jmaupetit commented Oct 11, 2022

Purpose

Ralph can be used as a CLI, as a server, or as a library. To handle this complexity, we need to split dependencies.

Proposal

We decided to split dependencies to core and extra requirements:

  • the core package only contains dependencies to use Ralph as a library (mostly to use models in a python project),
  • the cli extra installs Click-related dependencies,
  • the backends extra installs all supported backends; it might also correspond to a library usage,
  • the lrs extra installs FastAPI-related dependencies for the LRS server implementation.

A full installation command would look like:

pip install ralph-malph[backends,cli,lrs]

While a library installation could be:

pip install ralph-malph

or

pip install ralph-malph[backends]

Depends on #217 for the Tray testing in the CI.

@jmaupetit jmaupetit self-assigned this Oct 11, 2022
@jmaupetit jmaupetit marked this pull request as ready for review October 11, 2022 15:42
@jmaupetit jmaupetit force-pushed the split-dependencies branch 2 times, most recently from 284d9b6 to 440908b Compare October 11, 2022 16:45
Copy link
Member

@quitterie-lcs quitterie-lcs left a comment

Choose a reason for hiding this comment

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

LGTM!
However when renovate bot updates dependencies every week, we have to be aware not to forget that backend, lrs and cli dependencies have to be updated in the Changelog 😉

@jmaupetit
Copy link
Contributor Author

Ready for a new review! 🙏

docs/index.md Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
src/ralph/conf.py Outdated Show resolved Hide resolved
src/ralph/conf.py Show resolved Hide resolved
Copy link
Member

@quitterie-lcs quitterie-lcs left a comment

Choose a reason for hiding this comment

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

LGTM! One tiny remark

docs/index.md Outdated Show resolved Hide resolved
Ralph can be used as a CLI, as a server, or as a library. To handle this
complexity, we decided to split dependencies to core and extra
requirements:

- the core package only contains dependencies to use Ralph as a library
  (mostly to use models in a python project),
- the `cli` extra installs Click-related dependencies,
- the `backends` extra installs all supported backends; it might also
  correspond to a library usage,
- the `lrs` extra installs FastAPI-related dependencies for the LRS
  server implementation.

A full installation command would look like:

```
pip install ralph-malph[backends,cli,lrs]
```

While a library installation could be:

```
pip install ralph-malph
```

or

```
pip install ralph-malph[backends]
```
@jmaupetit jmaupetit merged commit 82a8cc3 into master Oct 19, 2022
@jmaupetit jmaupetit deleted the split-dependencies branch October 19, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants