Skip to content
Snippets Groups Projects
Commit 7f3a42b8 authored by Vincent POLLET's avatar Vincent POLLET
Browse files

Update documentation section about dependencies

parent 44440809
No related branches found
No related tags found
1 merge request!244Update documentation section about dependencies
Pipeline #54431 passed
...@@ -412,68 +412,96 @@ If your package depends on **third-party packages** (not Bob_ or BEAT_ existing ...@@ -412,68 +412,96 @@ If your package depends on **third-party packages** (not Bob_ or BEAT_ existing
resources) that are not in the CI, but exist on the conda ``defaults`` channel, resources) that are not in the CI, but exist on the conda ``defaults`` channel,
you should perform some extra steps: you should perform some extra steps:
1. Add the package in the ``meta.yml`` file of bob-devel in 1. Update ``conda_build_config.yaml`` in
``bob/bob.conda/conda/bob-devel``: ``bob/bob.devtools/bob/devtools/data/conda_buid_config.yaml`` with
your dependencies. Place them in the ``AUTOMATIC PARSING`` block in
alphabetical order. Make sure your dependency doesn't conflict with
the others by following the same steps as when updating a dependency
(next section).
.. code-block:: yaml
.. code-block:: yaml
requirements: # AUTOMATIC PARSING START
host: # DO NOT MODIFY THIS COMMENT
- python {{ python }}
- {{ compiler('c') }} # list all packages with dashes or dots in their names, here:
- {{ compiler('cxx') }} package_names_map:
# Dependency list of bob packages. Everything is pinned to allow for better click_plugins: click-plugins
# reproducibility. Please keep this list sorted. It is recommended that you dask_jobqueue: dask-jobqueue
# update all dependencies at once (to their latest version) each time you dask_ml: dask-ml
# modify the dependencies here. Use ``conda search`` to find the latest docker_py: docker-py
# version of packages. font_ttf_dejavu_sans_mono: font-ttf-dejavu-sans-mono
- boost 1.65.1 pkg_config: pkg-config
- caffe 1.0 # [linux] pytest_cov: pytest-cov
- click 6.7 python_graphviz: python-graphviz
- click-plugins 1.0.3 scikit_image: scikit-image
- .. scikit_learn: scikit-learn
- [your dependency here] sphinxcontrib_httpdomain: sphinxcontrib-httpdomain
sphinxcontrib_mermaid: sphinxcontrib-mermaid
2. At the same file, update the version with the current date, in the format sphinxcontrib_programoutput: sphinxcontrib-programoutput
preset. zc_buildout: zc.buildout
zc_recipe_egg: zc.recipe.egg
boost:
- 1.73.0
click:
- 8.0.1
click_plugins:
- 1.1.1
cmake:
- 3.14.0
coverage:
- 5.5
...
[your dependecy here]
2. In the file ``bob/bob.devtools/deps/bob-devel/meta.template.yaml``,
update the version with the current date, in the format preset.
.. code-block:: yaml .. code-block:: yaml
package: package:
name: bob-devel name: bob-devel
version: 2018.05.02 <-- HERE version: 2021.09.14 <-- HERE
3. Update the ``beat-devel`` and ``bob-devel`` versions in the ``meta.yml`` 3. Submit a merge request with your changes.
file inside ``bob/bob.conda/conda/beat-devel``:
.. code-block:: yaml
package: Updating a dependency version
name: beat-devel =============================
version: 2018.05.02 <-- HERE
All dependencies versions are listed in
``bob/bob.devtools/bob/devtools/data/conda_build_config.yaml`` to ensure that
all bob packages use compatible versions of those dependencies. When updating
(or adding a new) dependency, you must make sure that the new version doesn't
conflicts with **all** other dependencies. Often, a newest verion of your
dependency has newer requirements for its own dependencies, which can conflict
with the rest of ``bob`` dependencies. Therefore it is often best to update all
dependencies at once, not just one. To do so, ask ``conda`` to create an
environment with all ``bob`` dependencies:
[...] .. code-block:: bash
requirements: conda create -n bob_deps --dry-run --override-channels \\
host: -c http://www.idiap.ch/software/bob/conda/label/beta \\
- python {{ python }} -c http://www.idiap.ch/software/bob/conda \\
- bob-devel 2018.05.02 <-- HERE -c defaults
- requests 2.18.4 click-plugins cmake coverage dask ... [all bob dependencies]
4. Update the ``conda_build_config.yaml`` in The versions solved by ``conda`` should be the newest compatible ones you can
``bob/bob.devtools/bob/devtools/data/conda_build_config.yaml`` with your use. If you require a specific version of a dependency, say ``h5py`` you can
dependencies, and with the updated version of bob-devel and beat-devel. See specify only that version in the ``conda`` command and let conda solve the
`this here <https://gitlab.idiap.ch/bob/bob.conda/merge_requests/363>`_ and rest.
`this MR here <https://gitlab.idiap.ch/bob/bob.admin/merge_requests/89>`_
for concrete examples on how to do this.
.. note:: .. note::
**This step should be performed after bob.conda's pipeline on master is '.' or '-' in package names are changed to '_' in the
finished** (i.e. perform steps 1 to 3 in a branch, open a merge request ``conda_build_config.yaml`` file. Make sure to use the real packages name in
and wait for it to be merged, and wait for the new master branch to be the ``conda`` command.
"green").
Conda recipe Conda recipe
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment