Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Project requirements are specified in (at least) two places #219

Closed
alexjpwalker opened this issue Apr 6, 2021 · 0 comments · Fixed by #282
Closed

Project requirements are specified in (at least) two places #219

alexjpwalker opened this issue Apr 6, 2021 · 0 comments · Fixed by #282

Comments

@alexjpwalker
Copy link
Member

Problem to Solve

requirements_dev.txt was added in order to provide a convenient way of installing dev dependencies that we only need when developing Client Python, not when you simply want to use it. This is akin to devDependencies in package.json of client-nodejs. It includes a test framework, behave, and an assertion framework PyHamcrest.

But it's an ugly solution. We now have to specify the version of, for example, grakn-protocol in 2 places - requirements.txt and requirements_dev.txt.

Proposed Solution

I originally created this split so that we would only have to run one command: pip install -r requirements_dev.txt. But perhaps running two commands is a better option (i.e. yank the prod requirements out of requirements_dev, hence requiring that we run both.)

After all, this is also something Bazel build should be able to do automatically for us. I've noticed that we do have a pip_install rule in our WORKSPACE, and yet it doesn't seem to actually install the packages from what I can tell. I always have to run pip install myself manually after the Bazel build.

@alexjpwalker alexjpwalker modified the milestone: Technical Debt Nov 2, 2021
flyingsilverfin pushed a commit that referenced this issue Mar 3, 2023
## What is the goal of this PR?

This PR solves issue #219 by including `requirements.txt` inside of `requirements_dev.txt`, so that the requirements are no longer duplicated. Going forward, developers will no longer need to remember to copy changes from `requirements.txt` to `requirements_dev.txt`.

## What are the changes implemented in this PR?

This PR adds a reference (`-r requirements.txt`) to `requirements_dev.txt`, and cleans up the instructions around it. See the [pip install Requirements File Format](https://pip.pypa.io/en/stable/reference/requirements-file-format/) for details on this feature.

closes #219
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants