Track a second repository

17 vues
Accéder directement au premier message non lu

Alexandre René

non lue,
1 août 2017, 18:25:5201/08/2017
à sumatra-users
II am trying to set up Sumatra such that it tracks two separate version-controlled directories, where the second is library code that may be shared between projects. (This code is installed with pip -e and imported as any other library in `main.py`.) At the moment I have run `smt init` in the main project directory, but how would I tell Sumatra to also track the library repository, in exactly the same way as the main one ? Is this possible ?

Best,
Alexandre

Andrew Davison

non lue,
2 août 2017, 04:32:3402/08/2017
à sumatra-users
Hi Alexandre,

On Wednesday, 2 August 2017 00:25:52 UTC+2, Alexandre René wrote:
II am trying to set up Sumatra such that it tracks two separate version-controlled directories, where the second is library code that may be shared between projects. (This code is installed with pip -e and imported as any other library in `main.py`.) At the moment I have run `smt init` in the main project directory, but how would I tell Sumatra to also track the library repository, in exactly the same way as the main one ? Is this possible ?

Sumatra should track the library code just like any other dependency (i.e. where it finds that the dependency is under version control, it will take the version number from the VCS). I'm not 100% sure that this will work with `pip -e`, however.

When you inspect jobs with smtweb, does the library code show up in the list of dependencies?

Regards,

Andrew

Alexandre René

non lue,
3 août 2017, 16:29:0103/08/2017
à sumatra-users
Hi Andrew,

Thanks for your reply. I traced the problem to an error being triggered when looking up the dependencies (an instance of this problem: https://github.com/pallets/jinja/issues/655). Since my own library code came later in the search, it was missed. I put in a quick fix on my own fork (https://github.com/alcrene/sumatra/commit/7b6d81d130b4e0c4f1eb368198866b3b0cbdcb36) which works for me, although a proper solution (preventing any loading from looking up subsequent modules) might be tricky.
I do now confirm that libraries installed with `pip -e` are properly picked up by Sumatra. The software works beautifully.

Alexandre
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message