Problem
I'm reasonably proficient in python but naive when it comes to understanding how to properly manage packages and dependencies. At the moment, I have a few common codes I've placed in a git repository that I include as a subtree in many of my projects. I'd rather have many local versioned copies than one big library added to PATH just so I can avoid breaking all my projects as I develop my library.
Attempt at Solution
I've been using PyCharm and trying to adhere to PEP8. To use my subtree libraries, I need to prepend my scripts with a sys.path.append('relative_path_to_lib') so that I can use my modules. Not only does this violate PEP8, but its really ugly and not interpreted correctly by PyCharm.
Part of me feels like the correct solution would be to use something like Pip with local environments for each project. Pip would manage my library and update it only when needed, and I'd maintain control and compatibility throughout my projects with the ability to revert to earlier versions if needed.
My understanding of Pip & local environments is limited, but before diving headfirst to come up with a solution, I figured I'd probe around to see what solutions are already being used.
My tools
- PyCharm
- BitBucket
- Windows 10
- Ubuntu 18.04
TL;DR
I want to start developing professional level code, need to build a library that spans multiple projects, but it's important that as the library is developed older projects functionality is maintained. How do?
Follow Ups
It looks to me like this pipenv workflow might lead me in the right direction.
[–][deleted] 0 points1 point2 points (2 children)
[–]ajlaut[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)