Skip to content

Commit 926f822

Browse files
committed
Updating lib to have a better handling: pyproject.
1 parent 7f27201 commit 926f822

File tree

5 files changed

+74
-96
lines changed

5 files changed

+74
-96
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33

44
.venv/
55
*.egg-info/
6-
torchsom/__pycache__/
6+
__pycache__/
7+
setup.py
8+
logos/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://opensource.org/license/apache-2-0)
66

77
<p align="center">
8-
<img src="logos/logo6.jpg" alt="TorchSOM_logo" width="350"/>
8+
<img src="logo.jpg" alt="TorchSOM_logo" width="350"/>
99
</p>
1010

1111
**TorchSOM** is the official code for

logo.jpg

119 KB
Loading

pyproject.toml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# This section defines how the package should be built when running `python -m build`
2+
[build-system]
3+
build-backend = "setuptools.build_meta" # Use setuptools as the backend
4+
requires = [
5+
"setuptools", # The core packaging tool
6+
"setuptools-git-versioning", # Automatically derive the version from Git tags
7+
]
8+
9+
# Main project/package metadata
10+
[project]
11+
name = "torchsom"
12+
authors = [
13+
{name = "Louis Berthier", email = "louis-desire-romeo.berthier@michelin.com"},
14+
]
15+
dynamic = [
16+
"version", # Version will be determined dynamically (via git)
17+
"readme", # README will be dynamically loaded
18+
]
19+
description = "A Scalable PyTorch-Compatible Library for Self-Organizing Maps"
20+
requires-python = ">=3.9" # Minimum Python version required
21+
classifiers = [
22+
"Development Status :: 3 - Alpha",
23+
"Natural Language :: English",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: Python",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
]
30+
dependencies = [
31+
# "torch",
32+
"torch @ https://download.pytorch.org/whl/cu118/torch-2.6.0-cp39-cp39-linux_x86_64.whl", # Specify torch 2.6.0 with GPU
33+
# "torch @ https://download.pytorch.org/whl/cu118/torch-*.whl", # Specify torch with GPU and last version
34+
"numpy",
35+
"matplotlib",
36+
"tqdm",
37+
]
38+
39+
# Configuration for setuptools-git-versioning plugin
40+
[tool.setuptools-git-versioning]
41+
enabled = true # Enables git-based versioning
42+
# dev_template and dirty_template define version strings for development and dirty states
43+
dev_template = "{tag}.dev{ccount}" # Format when there are commits after a tag
44+
dirty_template = "{tag}.post{ccount}+dirty" # Format when the working tree is dirty
45+
46+
# Dynamically load the README from file
47+
[tool.setuptools.dynamic]
48+
readme = {file = "README.md"} # Long description for PyPI and docs
49+
50+
# Package discovery configuration
51+
[tool.setuptools.packages.find]
52+
where = ["."] # Search in current directory
53+
include = ["torchsom*"] # Include packages matching this pattern (e.g., torchsom, torchsom.utils)
54+
55+
# Optional dependencies that can be installed with [dev] extra: `pip install .[dev]`
56+
[project.optional-dependencies]
57+
dev = [
58+
"pandas",
59+
"scikit-learn",
60+
"warnings",
61+
"black",
62+
"isort",
63+
"rich",
64+
"pytest",
65+
"pytest-cov",
66+
"pytest-html",
67+
"certifi",
68+
"typing_extensions",
69+
"notebook",
70+
]

setup.py

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)