Improvement: Add doc notes on setting up the build environment#3472
Improvement: Add doc notes on setting up the build environment#3472soupault merged 6 commits intoscikit-image:masterfrom
Conversation
|
why did all the builds fail? |
|
Hmmm I saw the same failure in #3469. =================================== FAILURES ===================================
____________________ [doctest] skimage.util.lookfor.lookfor ____________________
007
008 Parameters
009 ----------
010 what : str
011 Words to look for.
012
013 Examples
014 --------
015 >>> import skimage
016 >>> skimage.lookfor('regular_grid')
UNEXPECTED EXCEPTION: TypeError("'NoneType' object is not iterable",)
Traceback (most recent call last):
File "/opt/python/3.6.3/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest skimage.util.lookfor.lookfor[1]>", line 1, in <module>
File "/home/travis/build/scikit-image/scikit-image/skimage/util/lookfor.py", line 24, in lookfor
return np.lookfor(what, sys.modules[__name__.split('.')[0]])
File "/home/travis/venv/lib/python3.6/site-packages/numpy/lib/utils.py", line 754, in lookfor
cache = _lookfor_generate_cache(module, import_modules, regenerate)
File "/home/travis/venv/lib/python3.6/site-packages/numpy/lib/utils.py", line 906, in _lookfor_generate_cache
for pth in item.__path__:
TypeError: 'NoneType' object is not iterable |
CONTRIBUTING.txt
Outdated
| source env/bin/activate | ||
| pip install -r requirements/default.txt | ||
| pip install -r requirements/build.txt | ||
| pip install -r requirements/test.txt |
There was a problem hiding this comment.
How about the documentation? We insist that all new feature must have an example, so it's important to consider it as part of the build env. setup.
There was a problem hiding this comment.
My thoughts are that new devs don't necessary want to run all the examples. They will likely just install the deps they need for the examples they are developing. I'm trying to help people to push PR for the first time, not necessarily make the best example right off the bat.
We might also need:
- Beginners contribution guide
- Advanced contribution guide
There was a problem hiding this comment.
My thought is that some new devs start with a new feature as a first PR. It not negligible in scikit-image.
There was a problem hiding this comment.
Alright. Do you think it is appropriate to bundle it all in the main requirements.txt file? having 4 commands is a little annoying.
There was a problem hiding this comment.
Sadly not: I don't think we want requirements.txt to contain everything, since most people look there for "minimal requirements". I just found this workaround:
pip install -r <(cat requirements/*.txt)
Be sure to add a comment to that line to the effect of, "install all development, runtime, and documentation requirements of scikit-image."
There was a problem hiding this comment.
Any workaround for conda? I don't want to maintain a yaml file...
|
Re builds... Could it be something changed in Cython? New version released 22h ago. BUT the failure happens on my 28.2 version... But it's with a .so file: (And it's on #3469) Ok going to bed now, more in the morning I guess... =\ |
|
Yeah, I pinned it to an so file as well. Seems like it could be cython stripping some info? We didn't add the binary stripping patch. |
|
@hmaarrfk Could you rebase please? :) |
|
Unless a rebase is difficult due to conflict, I strongly suggest we
rebase on contributors' behalves. The commit-review-commit cycle is slow
enough as it is!
|
99e7568 to
b8707ca
Compare
CONTRIBUTING.txt
Outdated
|
|
||
| pip+virtualenv | ||
| ============== | ||
| If you choose to use pip and virtualenv, then you may find the following bash |
There was a problem hiding this comment.
Typo in this sentence, and would remove "if you choose" part.
CONTRIBUTING.txt
Outdated
| If you choose to use pip and virtualenv, then you may find the following bash | ||
| commands:: | ||
|
|
||
| virtualenv env |
There was a problem hiding this comment.
Should probably be python -m venv skimage-dev
| source env/bin/activate | ||
| # Install all development and runtime dependencies of scikit-image | ||
| pip install -r <(cat requirements/*.txt) | ||
|
|
There was a problem hiding this comment.
Add some text that explains that the Python installation lives in the directory env (or, skimage-dev, as suggested above).
CONTRIBUTING.txt
Outdated
| conda | ||
| ===== | ||
|
|
||
| If you prefer to use conda (Anaconda or Miniconda) for Python environment |
There was a problem hiding this comment.
Move this text to the top, and explain that you may use either way to deploy a dev env.
CONTRIBUTING.txt
Outdated
| If you prefer to use conda (Anaconda or Miniconda) for Python environment | ||
| management, then you may find the following bash commands useful:: | ||
|
|
||
| conda create --name skdev python=3.6 |
CONTRIBUTING.txt
Outdated
| # Install all development and runtime dependencies of scikit-image | ||
| conda install `for i in requirements/{default,build,test,docs}.txt; do echo -n " --file $i "; done` | ||
|
|
||
| You can choose a different name or a different Python version, |
CONTRIBUTING.txt
Outdated
|
|
||
| You can choose a different name or a different Python version, | ||
| depending on your preferences. | ||
| If you are using the conda-forge channel and NumPy seems to be changing |
There was a problem hiding this comment.
Removed, people can searech on conda-forge to find out how to solve this issue themselves.
There was a problem hiding this comment.
The other PR to remove requirements-parser was to ensure that it could build from anaconda defaults as well. So we are good on that front :D.
The documentation dependencies aren't available on anaconda defaults.
| Once you have installed all dependencies, you can install the development | ||
| version of scikit-image using the command:: | ||
|
|
||
| pip install -e . --no-deps |
There was a problem hiding this comment.
It is for conda I think
3b3650f to
7942939
Compare
|
@scikit-image/core this one looks ready to go for me. It was held up by CI but @hmaarrfk rebased, everything is green, and it's an easy win at this point! |
Co-Authored-By: hmaarrfk <mark.harfouche@gmail.com>
Co-Authored-By: hmaarrfk <mark.harfouche@gmail.com>
Co-Authored-By: hmaarrfk <mark.harfouche@gmail.com>
Co-Authored-By: hmaarrfk <mark.harfouche@gmail.com>
| # Activate it | ||
| conda activate skimage-dev | ||
| # Install all development and runtime dependencies of scikit-image | ||
| conda install `for i in requirements/{default,build}.txt; do echo -n " --file $i "; done` |
There was a problem hiding this comment.
It will, probably, be better to harmonize the dependency installation instructions for pip and conda sections (i.e. consider either all or (default,build) req-files).
There was a problem hiding this comment.
everything installs on conda-forge, but not on defaults. Many people aren't on conda forge, so I feel like this is a just middle to hit, without asking people to go bleeding edge (on conda-forge) and messing the rest of their conda config.
There was a problem hiding this comment.
Maybe give a hint then that these dependency lists are not actually complete? E.g., change:
# Install all development and runtime dependencies of scikit-image
to
# Install major development and runtime dependencies of scikit-image
# (the rest can be installed from conda-forge or pip, if needed)
There was a problem hiding this comment.
Thanks for the suggestion!
|
Awesome! Thanks Mark! |
|
There are a few things left to consolidate the documentation regarding setting up the build env, but yeah. |
For reviewers
(Don't remove the checklist below.)
later.
__init__.py.doc/release/release_dev.rst.@meeseeksdev backport to v0.14.x