-
Notifications
You must be signed in to change notification settings - Fork 98
use poetry instead of setup tools as package manager #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [virtualenvs] | ||
| in-project = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,53 @@ | ||
| [build-system] | ||
| requires = ["setuptools", "setuptools-scm"] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = ["poetry-core"] | ||
| build-backend = "poetry.core.masonry.api" | ||
|
|
||
| [project] | ||
| [tool.poetry] | ||
| name = "streamsync" | ||
| authors = [{ name = "Ramiro Medina", email = "ramiro.a.medina@gmail.com" }] | ||
| version = "0.3.0" | ||
| description = "Streamsync helps you create performant data apps, via Python code and its built-in visual UI editor." | ||
| authors = ["Ramiro Medina <ramiro.a.medina@gmail.com>"] | ||
| license = "Apache 2.0" | ||
| readme = "README.md" | ||
| requires-python = ">=3.9.2" | ||
| homepage = "https://www.streamsync.cloud" | ||
| repository = "https://www.github.com/streamsync-cloud/streamsync" | ||
| documentation = "https://www.streamsync.cloud/getting-started.html" | ||
| keywords = ["data apps", "gui", "ui"] | ||
| license = { text = "Apache 2.0" } | ||
| classifiers = ["Development Status :: 4 - Beta"] | ||
| dependencies = [ | ||
| "pydantic >= 2.6.0, < 3", | ||
| "fastapi >= 0.89.1, < 1", | ||
| "websockets >= 12, < 13", | ||
| "uvicorn >= 0.20.0, < 1", | ||
| "watchdog >= 3.0.0, < 4" | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta" | ||
| ] | ||
| packages = [ | ||
| { include = "streamsync", from = "src" } | ||
| ] | ||
|
|
||
| dynamic = ["version"] | ||
| [tool.poetry.dependencies] | ||
| python = ">=3.9.2, <4.0" | ||
| pydantic = ">= 2.6.0, < 3" | ||
| fastapi = ">= 0.89.1, < 1" | ||
| websockets = ">= 12, < 13" | ||
| uvicorn = ">= 0.20.0, < 1" | ||
| watchdog = ">= 3.0.0, < 4" | ||
| pandas = {version = ">= 2.2.0, < 3", optional = true} | ||
| pyarrow = {version = ">= 15.0.0, < 16.0.0",optional = true} | ||
| plotly = {version = ">= 5.18.0, < 6", optional = true} | ||
|
|
||
| [project.optional-dependencies] | ||
| ds = [ | ||
| "pandas >= 2.2.0, < 3", | ||
| "pyarrow >= 15.0.0, < 16.0.0", | ||
| "plotly >= 5.18.0, < 6" | ||
| ] | ||
| test = [ | ||
| "pandas >= 2.2.0, < 3", | ||
| "pyarrow >= 15.0.0, < 16.0.0", | ||
| "plotly >= 5.18.0, < 6", | ||
| "pytest-asyncio >= 0.23.4, < 1", | ||
| "pytest >= 7.0.0, < 8", | ||
| "altair >= 5.2.0, < 6", | ||
| "httpx >= 0.26.0, < 1" | ||
| ] | ||
| build = [ | ||
| "pandas >= 2.2.0, < 3", | ||
| "pyarrow >= 15.0.0, < 16.0.0", | ||
| "plotly >= 5.18.0, < 6", | ||
| "build >= 1.0.3, < 2", | ||
| "mypy >= 1.8.0, < 2", | ||
| "pandas-stubs >= 2.0.0, <3", | ||
| "pytest >= 8.0.0, < 9", | ||
| "pytest-asyncio >= 0.23.4, < 1", | ||
| "altair >= 5.2.0, < 6", | ||
| "httpx >= 0.26.0, < 1" | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Home = "https://www.github.com/streamsync-cloud/streamsync" | ||
| [tool.poetry.group.build] | ||
| optional = true | ||
|
|
||
| [tool.poetry.group.build.dependencies] | ||
| pandas = ">= 2.2.0, < 3" | ||
| pyarrow = ">= 15.0.0, < 16.0.0" | ||
| plotly = ">= 5.18.0, < 6" | ||
| mypy = ">= 1.8.0, < 2" | ||
| pandas-stubs = ">= 2.0.0, <3" | ||
| pytest-asyncio = ">= 0.23.4, < 1" | ||
| pytest = ">= 7.0.0, < 8" | ||
| altair = ">= 5.2.0, < 6" | ||
| httpx = ">=0.26.0, < 1" | ||
|
|
||
| [project.scripts] | ||
| streamsync = "streamsync.command_line:main" | ||
| [tool.poetry.extras] | ||
| ds = ["pandas", "pyarrow", "plotly"] | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = { attr = "streamsync.VERSION" } | ||
| [tool.poetry.scripts] | ||
| streamsync = 'streamsync.command_line:main' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| import importlib.metadata | ||
| from typing import Union, Optional, Dict, Any | ||
| from streamsync.core import Readable, FileWrapper, BytesWrapper, Config | ||
| from streamsync.core import initial_state, component_manager, session_manager, session_verifier | ||
|
|
||
| VERSION = "0.3.0" | ||
| VERSION = importlib.metadata.version("streamsync") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the idea is to switch to defining version in the package and then fetching it from the code? Makes more sense I guess
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really like this option. |
||
|
|
||
| component_manager | ||
| session_manager | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -539,7 +539,7 @@ def __init__(self, app_path: str, mode: str): | |
| self.is_app_process_server_ready = multiprocessing.Event() | ||
| 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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this intentional?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is, otherwise
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah nice, must be related to the dependencies I upgraded, thanks for fixing. |
||
| self.app_path: str = app_path | ||
| self.response_events: Dict[int, ThreadSafeAsyncEvent] = {} | ||
| self.response_packets: Dict[int, AppProcessServerResponsePacket] = {} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No way to get version dynamically?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.