I realise this could be subjective question to answer, but I don't expect an answer in the form of "Do this and everything will work out". I am aware there will probably be some decisions to be taken and that different approaches are better for different scenarios. In any case, I would like a review of the pros and cons of whatever strategies professionals are actually using.
Assume that I am writing a big library, called BigLibrary. This library can be divided into several smaller projects, some of which are also useful outside of BigLibrary. What is the best way to organise the folder structure and installation to have a smooth workflow?
Consider that I also use git and that multiple developers should be able to work on all aspects of the project.
I have some options:
BigProject __init__.py main_files.py subLibrary1 subLibrary2
The problem with this is that subLibrary1 and subLibrary2 must be accessed through BigProject, which is not ideal. Also it complicates the workflow with git if I want subLibrary1 and subLibrary2 to have their own git repository.
BigProject __init__.py Library1 Library2
The problem with this is that BigProject will not see Library1 and Library2, unless I add them manually to sys.path. This seems like an ugly solution. It does make everything work nicely with git, but it also pollutes the namespace a bit.
Ideally, I should also be able to modify Library1 and Library2 without this affecting BigProject - and only deciding to update to a certain version of Library1 and Library2 when I feel like it is a good moment. Basically I want to make BigProject use a certain checkout of Library1 and 2 until I decide to "update it" and bring it to the current checkout.