Skip to content

Commit

Permalink
Merge pull request #2096 from huggingface/pyproject_pdm
Browse files Browse the repository at this point in the history
Remove setup.py, replace with pyproject.toml and pdm helpers
  • Loading branch information
rwightman authored Feb 16, 2024
2 parents 8a713b0 + 35d6eef commit 155b32a
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 57 deletions.
65 changes: 59 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,67 @@
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[project]
name = "timm"
authors = [
{name = "Ross Wightman", email = "ross@huggingface.co"},
]
description = "PyTorch Image Models"
readme = "README.md"
requires-python = ">=3.8"
keywords = ["pytorch", "image-classification"]
license = {text = "Apache-2.0"}
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
]
dependencies = [
'torch',
'torchvision',
'pyyaml',
'huggingface_hub',
'safetensors',
]
dynamic = ["version"]

[project.urls]
homepage = "https://github.com/huggingface/pytorch-image-models"
documentation = "https://huggingface.co/docs/timm/en/index"
repository = "https://github.com/huggingface/pytorch-image-models"

[tool.pdm.dev-dependencies]
test = [
'pytest',
'pytest-timeout',
'pytest-xdist',
'pytest-forked',
'expecttest',
]

[tool.pdm.version]
source = "file"
path = "timm/version.py"

[tool.pytest.ini_options]
testpaths = ['tests']
markers = [
"base: marker for model tests using the basic setup",
"cfg: marker for model tests checking the config",
"torchscript: marker for model tests using torchscript",
"features: marker for model tests checking feature extraction",
"fxforward: marker for model tests using torch fx (only forward)",
"fxbackward: marker for model tests using torch fx (only backward)",
]

[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
skip-string-normalization = true
]
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
conda_name_differences = 'torch:pytorch'
channels = pytorch
noarch = True

[metadata]

url = "https://github.com/huggingface/pytorch-image-models"
50 changes: 0 additions & 50 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion timm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.9.15dev0'
__version__ = '0.9.16dev0'

0 comments on commit 155b32a

Please sign in to comment.