Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions pyproject.toml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also FYI,

pip list -o
Package    Version Latest Type
---------- ------- ------ -----
ipywidgets 8.1.1   8.1.7  wheel
pip        25.2    25.3   wheel
plotly     5.18.0  6.3.1  wheel
pytest     7.2.1   8.4.2  wheel

Copy link

@mklein0 mklein0 Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it would be nice if the requirements for some of the libraries were not hardcoded. A min version would be preferred so libraries can be upgraded.

pytest==7.2.1
numpy>=1.18.4
requests>=2.24.0
ipywidgets==8.1.1
pandas>=0.25.2
mock>=4.0.2
importlib-resources>=3.0.0
pathos>=0.2.7
plotly==5.18.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't having just a min version fail the constraints file check?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a constraints file, yes. But this is a requirements file. So you can give general guidelines on the versions accepted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "smsdk"
authors = [
{name = "Sight Machine", email = "[email protected]"}
]
description = "Sight Machine SDK"
requires-python = ">=3.8"
dynamic = ["version", "dependencies", "readme"]

[project.urls]
Homepage = "http://sightmachine.com/"

[tool.setuptools]
include-package-data = true

[tool.setuptools.dynamic]
version = {attr = "smsdk._version.version"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, This may be a future item, but do we want to introduce setuptools-scm here? This allows python packages to inherit the SCM tags for versions.

readme = {file = ["README.md"]}
dependencies = {file = ["requirements.txt"]}

[tool.setuptools.packages.find]
where = ["."]
exclude = ["test*"]
30 changes: 4 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
from setuptools import setup, find_packages
from smsdk._version import version
# retaining a minimal setup.py, but all configuration is in pyproject.toml
# https://packaging.python.org/en/latest/guides/modernize-setup-py-project/#what-if-something-that-can-not-be-changed-expects-a-setup-py-file
from setuptools import setup

with open("README.md", "r") as fh:
long_description = fh.read()

with open("requirements.txt", "r") as fh:
install_requires = [
line
for line in (item.strip() for item in fh)
if line and line[:1] not in ("#", "-")
]

setup(
name="smsdk",
version=version,
packages=find_packages(exclude=["test*"]),
include_package_data=True,
install_requires=install_requires,
license="",
long_description=long_description,
author="Sight Machine",
author_email="[email protected]",
url="http://sightmachine.com/",
description="Sight Machine SDK",
python_requires=">=3.8",
)
setup()