use poetry instead of setup tools as package manager#231
Conversation
* configure poetry * configure poetry to handle virtualenv in `./.venv` * migrate and fix the build.sh (mypy didn't pass) * remove MANIFEST.in because poetry handle all the files from src * modify CONTRIBUTING.md * remove the dependency group of `test`, use `build` instead * change versioning strategy to fetch version from package manifest (poetry way, one of the few defaults of poetry)
| ds = ["pandas", "pyarrow", "plotly"] | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = { attr = "streamsync.VERSION" } |
There was a problem hiding this comment.
No way to get version dynamically?
There was a problem hiding this comment.
In the design choices of poetry, there is a strong choice not to read a python module dynamically like in setuptools. I understand this choice but it leads to a frustrating limit regards to version number. I prefer the setuptools strategy but impossible to use it properly with poetry.
A plugin written by the creator of fastapi go over this limit but this plugin is incompatible with src layout and the PR to fix it has been open for 3 months and hasn't been merged.
| self.is_app_process_server_failed = multiprocessing.Event() | ||
| self.app_process_listener: Optional[AppProcessListener] = None | ||
| self.observer: Optional[watchdog.observers.Observer] = None | ||
| self.observer: Optional[PollingObserver] = None |
There was a problem hiding this comment.
It is, otherwise mypy was complaining in build.sh
There was a problem hiding this comment.
Ah nice, must be related to the dependencies I upgraded, thanks for fixing.
| from streamsync.core import initial_state, component_manager, session_manager, session_verifier | ||
|
|
||
| VERSION = "0.3.0" | ||
| VERSION = importlib.metadata.version("streamsync") |
There was a problem hiding this comment.
So the idea is to switch to defining version in the package and then fetching it from the code? Makes more sense I guess
There was a problem hiding this comment.
That's the recommended way to manage this situation. Another one is to have a utility as bumpversion to update both location. I would avoid this one.
There was a problem hiding this comment.
I really like this option.
|
Looks good and thanks very much for updating the @mmikita95 @raaymax Please have a look at this great example of updating docs while making changes in the code... Avoids documentation drift. I expect everyone to help keep docs updated; it's straightforward as it's just modifying the markdown files. |
|
Indeed, beautifully done. I'll make sure to commit to that as well. |
Check
implement #230
Check
streamsync helloafter installing the package withpip install streamsync[ds]pip install streamsync[ds]bash ./build.shMANIFEST.inare present in the distribution packageTodo
.venvtest, usebuildinstead