compss icon indicating copy to clipboard operation
compss copied to clipboard

Create an installation group for optional deps

Open kinow opened this issue 3 years ago • 0 comments


name: Pull Request template about: Describe the changes of a Pull Request you want to merge. title: 'Create an installation group for optional deps' labels: '' assignees: ''


Status

READY

Description

I was following the tutorial docs but one of the first commands failed as I didn't have docker (Python module) installed. I looked at pycompss, and it looks like optional dependencies are not managed with the package manager.

Not sure if there's a reason for that, but maybe we could use the dependencies groups from setuptools? They are widely used, and also compatible with PEP 517. It allows developers to use pip install -e . or pip install -e .[docker] (to install normal deps, plus the ones required for docker), or pip install -e .[all] (at the moment just docker, but we could have deps groups that include numpy, psutil, etc, if needed).

Also python setup.py install is being discouraged now, I think. Instead calling python -m build or other modules or tools is being the recommended way — probably for a future discussion/PR, but makes it easier to integrate a project with IDE, or use other tools like pytest, mypy, etc, with less configuration.

Type of change

Please delete options that are not relevant.

  • [x] New feature (non-breaking change which adds functionality)
  • [x] This change requires a documentation update

Project impact

List the general project components that this PR will affect:

  • New installation groups

Related PRs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. If you haven't added any test and it is relevant provide instructions so we can reproduce.

  • [ ] I have added a new test with number:
  • [ ] I have modified a test to check this. Test number:
  • [x] I have tested it manually in a local environment.
  • [ ] I have tested it manually in a supercomputer.

Reproduce instructions:

git checkout <feature_branch>
# maybe create a venv?
pip install -e .[docker]
pip list | grep docker

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] I have run the script to add headers if new files are present (i.e. utils/scripts/header_setup/replace_all.sh)
  • [x] I have rebased my branch before trying to merge.

kinow avatar Jul 05 '22 04:07 kinow