Skip to content
Snippets Groups Projects

[docs] acumulating information for bob package development from other packages

Merged Zohreh MOSTAANI requested to merge docedit into master

In this merge request all the information about local development of bob packages will be added and updated. These information have been in the documentation of bob.buildout and bob.extension before.

Edited by André Anjos

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 1 .. _bob.extension.development:
    2
    3 =========================================
    4 Local development of |project| packages
    5 =========================================
    6
    7 Very often, developers of |project| packages are confronted with the need to
    8 clone repositories locally and develop installation/build and runtime code.
    9 It is recommended to create isolated environments to develop new projects using conda_ and `zc.buildout`. Tools implemented in `bob.devtools` helps automate this process. In the following we talk about how to checkout and build one or several packages from
    10 their git_ source and build proper isolated environments to develop them. Then we will describe how to create a new bob package from scratch and develop existing bob packages along side it.
    • You need to change this paragraph to reflect the steps below. This guide is supposed to help people create a paper/project package.

    • I believe that it reflects what follows. The structure of the document at the moment is like this.

      • kind of introduction
      • TLDR (This explains the most complicated case, meaning making a new package from scratch and also co-develop with already existing packages.)
      • How to develop only one existing bob package.
      • How to co develop more that one existing bob packages.
      • How to create a package from scratch.
      • How to create a package from scratch and co develop with existing bob packages.
      • Some information on how things are actually working.

      This is what I understood from our discussion. To go from easier case to the most complicated one. If you think this logic of structure is not good, let me know what is your suggestion.

    • Please register or sign in to reply
  • 134 $ cd src/bob.extension
    135 $ ../../bin/sphinx-build -aEn doc sphinx # make sure it finishes without warnings.
    136 $ firefox sphinx/index.html # view the docs.
    137
    138 .. note::
    139
    140 Sometimes when you are calling a function not interactively it is not acting normally. In that case import pkg_resources before importing your package. It is a known issue and we are working on it.
    141
    142 .. code-block:: sh
    143
    144 $ ./bin/python -c "import pkg_resources; import bob.blitz; print(bob.blitz)"
    145
    146
    147 .. bob.devtools.local_development:
    148
    149 Local development of existing Bob packages
  • André Anjos
  • 272 .. code-block:: sh
    273
    274 $ cd <package>
    275 $ conda activate bdt
    276 $ bdt local build
    277
    278
    279 One important advantage of using conda_ and zc.buildout_ is that it does
    280 **not** require administrator privileges for setting up any of the above.
    281 Furthermore, you will be able to create distributable environments for each
    282 project you have. This is a great way to release code for laboratory exercises
    283 or for a particular publication that depends on |project|.
    284
    285 Developing multiple existing |project| packages simultaneously
    286 --------------------------------------------------------------
    287 It so happens that you want to develop several bob.packages against each other for your project. Let's assume you want to develop package A and B simultaneously. We assume that package A is dependent on B. First we checkout package A and build an isolated conda environment as explained in the previous section. Then edit `buildout.cfg` file (or `develop.cfg`) and add package B to it as following:
  • André Anjos
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading