I will just show how to define a package and make it possible, to install it in editable mode. I don't care about anything else.
Package configuration
pyproject.toml: config file used by packaging tools
[build-system]
requires = ["setuptools>=64.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "packageName"
description = "packageName description"
authors = [
{ name = "Philipp Weinmann", email = "philipp.weinmann71@gmail.com" }
]
version = "0.1.0"
dependencies = [
"pandas",
"matplotlib",
"numpy",
"torch",
"scikit-learn",
]
[tool.setuptools]
package-dir = {"" = "src"}
packages = {find = {where = ["src"], namespaces = true}}
Required folder structure
This is not optional, otherwise pip will not find your files.
pyproject.toml
src/
└──packageName/
└─...
How to install the package (editable mode)
{bash}pip install -e .