Skip to content

Commit

Permalink
chore: Use pyproject.toml
Browse files Browse the repository at this point in the history
chore: Set min version of Python 3.8 and PyTorch 2.0.0
chore: Remove setup.py and setup.cfg
  • Loading branch information
lRomul committed Jan 24, 2024
1 parent 424830f commit 89db71a
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 90 deletions.
21 changes: 7 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04

ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV DEB_PYTHON_INSTALL_LAYOUT=deb_system
ENV NVIDIA_DRIVER_CAPABILITIES video,compute,utility
ENV PYTHONPATH $PYTHONPATH:/workdir

WORKDIR /workdir

RUN apt-get update && \
apt-get -y install \
Expand All @@ -21,17 +25,6 @@ RUN pip3 install --no-cache-dir \
torchvision==0.16.2 \
torchaudio==2.1.2

# Docs requirements
COPY ./docs/requirements.txt /docs_requirements.txt
RUN pip3 install --no-cache-dir -r /docs_requirements.txt

# Tests requirements
COPY ./tests/requirements.txt /tests_requirements.txt
RUN pip3 install --no-cache-dir -r /tests_requirements.txt

# Examples requirements
COPY ./examples/requirements.txt /examples_requirements.txt
RUN pip3 install --no-cache-dir -r /examples_requirements.txt

ENV PYTHONPATH $PYTHONPATH:/workdir
WORKDIR /workdir
# Install requirements
COPY ./ ./
RUN pip3 install -e .[tests,docs,examples]
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions examples/requirements.txt

This file was deleted.

76 changes: 76 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "pytorch-argus"
description = "Argus is a lightweight library for training neural networks in PyTorch."
authors = [
{ name = "Ruslan Baikulov", email = "[email protected]" },
]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = ["torch>=2.0.0"]
dynamic = ["version"]

[project.optional-dependencies]
tests = [
"pytest==7.4.4",
"pytest-cov==4.1.0",
"mypy==1.8.0",
"ruff==0.1.14",
]
docs = [
"sphinx==7.2.6",
"pydata-sphinx-theme==0.15.2",
]
examples = [
"torchvision==0.16.2",
"notebook==7.0.7",
"timm==0.9.12",
]

[project.urls]
Repository = "https://github.com/lRomul/argus"
Documentation = "https://pytorch-argus.readthedocs.io/"

[tool.setuptools.dynamic]
version = { attr = "argus.__version__" }

[tool.setuptools.packages.find]
where = ["."]
include = ["argus"]

[tool.ruff]
line-length = 89
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
]

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]

[tool.pytest]
minversion = 6.0
addopts = "--cov=argus"
testpaths = "tests"
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

9 changes: 0 additions & 9 deletions setup.cfg

This file was deleted.

55 changes: 0 additions & 55 deletions setup.py

This file was deleted.

4 changes: 0 additions & 4 deletions tests/requirements.txt

This file was deleted.

0 comments on commit 89db71a

Please sign in to comment.