DOC: add instructions for using conda when installing code for development#6399
DOC: add instructions for using conda when installing code for development#6399jcrist merged 5 commits intodask:masterfrom raybellwaves:doc-code-install
Conversation
jcrist
left a comment
There was a problem hiding this comment.
Thanks for working on this, just a few comments.
docs/source/develop.rst
Outdated
|
|
||
| python -m pip install pytest moto | ||
| conda env create -f continuous_integration/environment-3.8-dev.yaml | ||
| conda activate test-environment |
There was a problem hiding this comment.
This won't install dask though, just the dependencies. You'll need to add something like the following after activating the environment:
python -m pip install --no-deps -e .
docs/source/develop.rst
Outdated
| have these libraries, don't care to use them, or have sufficient build | ||
| environment on your computer to compile them when installing with ``pip``:: | ||
| To build the library you can install the necessary requirements using | ||
| ``pip`` or ``conda``:: |
There was a problem hiding this comment.
Perhaps make conda a link to https://conda.io?
There was a problem hiding this comment.
Stupid question you know to hyperlink code format e.g. conda<https://conda.io>_ doesn't work
There was a problem hiding this comment.
I don't think rst supports this. I wouldn't put it in code format, I'd leave it as a normal link.
docs/source/develop.rst
Outdated
| ``conda``:: | ||
|
|
||
| python -m pip install pytest moto | ||
| conda env create -f continuous_integration/environment-3.8-dev.yaml |
There was a problem hiding this comment.
I usually use this method, however we will have to keep this reference to the latest Python version up-to-date if we explicitly call it out in the docs. Perhaps the Python version should be removed from the env file name and just say latest?
You may also want to add --name=dask-dev to give the conda environment a more descriptive name.
There was a problem hiding this comment.
I think git can store symlinks? Maybe add a symlink to the folder, which we can update when new environments are added?
There was a problem hiding this comment.
Is it worth creating a new yaml file called `environment-latest-dev.yaml? i.e. can specify dask-dev in the name https://github.com/dask/dask/blob/master/continuous_integration/environment-3.8-dev.yaml#L2
Any idea how to setup the latest python version in the yaml? https://github.com/dask/dask/blob/master/continuous_integration/environment-3.8-dev.yaml#L7
Or keep it at 3.8.* until it eventually switches to 3.9.*
There was a problem hiding this comment.
Using one of our test environments we use as part of CI is the best way to guarantee that a developer's system matches our test system. I'd rather not create a new file that could get out of date - using one that we use for CI is the easiest for us to maintain.
Users can always override the name of the environment with a -n flag on conda env create, so having the name be dask-dev in the environment file doesn't really matter.
conda env create -n dask-dev -f continuous_integration/environment-3.8.yaml
I missed earlier though, we probably don't want to use environment-3.8-dev.yaml though, since that's for testing against upstream versions of pandas/numpy. Rather we should use environment-3.8.yaml.
To keep the change minimal, could you add a symlink to that file at environment-latest.yaml? We can bump the symlink when we increment our CI versions.
gforsyth
left a comment
There was a problem hiding this comment.
This looks good. Thanks for putting this in @raybellwaves ! @dask/maintenance this can be merged in.
…pment (dask#6399) * DOC: add env to code install * remove conda hyperlink * add build after setup env * symlink latest * add -latest.yaml Co-authored-by: Ray Bell <rayjognbell0@gmail.com>
black dask/flake8 daskCloses #6398
Is this the preferred .yaml file? There are a couple in https://github.com/dask/dask/tree/master/continuous_integration
Here's what it looks like: