-
Notifications
You must be signed in to change notification settings - Fork 61
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
docs: update readme #295
docs: update readme #295
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Useful improvement.
I think we should add the mention of a venv here, everything else is optional details
README.md
Outdated
Then run: | ||
|
||
``` | ||
pip3 install -r requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can have some very nasty side effects if your OS has a Python interpreter baked in. Usually you'd put down a venv first (this ought to be common knowledge for most Python devs but if we want to be explicit):
Linux & Max:
python3 -m venv venv
source venv/bin/activate
Windows + cmd:
python -m venv venv
venv\Scripts\activate.bat
Powershell:
python -m venv venv
venv\Scripts\activate.bat
Then for any of them:
pip install -r requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant, thanks!
Updating the PR with your suggestions. For my curiosity, what side effects can happen if you don't put down a viritual environment?
Sidenote: I got an error when attempting to run tests after running pip install -r requirements.txt
. I also had to run pip install UnleashClient
which I thought was weird. Does that track?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question! Mac and Linux come with a Python version (actually 2 of the suckers) by default, which the OS uses as a scripting layer. The most likely thing that happens if you have a few Python projects is that your packages conflict and another project breaks. The worst possible case (which is unlikely), is that you override a dependency that your OS requires to function correctly
Setting up a venv makes Python and pip work more like npm does by default - every project gets its own set of dependencies and they're isolated from each other
Hmm, the pip install UnleashClient
shouldn't have been necessary, that should be adding a dependency of itself. I want to say setting up a venv should make that go away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified and removed. Thanks!
README.md
Outdated
|
||
``` | ||
cd tests/specification_tests | ||
git clone https://github.com/Unleash/client-specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a shell script in scripts/get-spec.sh
, which tox uses to download the appropriate version of the client spec and put it in the right place. You can run that from the root. Might be worth mentioning
Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
for more information, see https://pre-commit.ci
This PR includes documentation that instructs the user on how to setup their development environment in order to effeciently run the tests.