From ffd8a3ebab0488612396640578deb463ce0e8e74 Mon Sep 17 00:00:00 2001 From: Jason Lubken Date: Wed, 30 Mar 2022 12:46:07 -0400 Subject: [PATCH] Remove project metadata from setup.py --- .pre-commit-config.yaml | 6 +++--- docker-compose.yml | 2 ++ dockerfile | 1 + pyproject.toml | 10 ++++++++-- setup.cfg | 11 ----------- setup.py | 16 +++++----------- 6 files changed, 19 insertions(+), 27 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 142dfb9..8475739 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,14 +22,14 @@ repos: - id: python-no-log-warn - id: python-use-type-annotations - repo: https://github.com/psf/black - rev: 21.12b0 + rev: 22.3.0 hooks: - id: black additional_dependencies: ['click==8.0.4'] language_version: python3.10 types: [python] - repo: https://github.com/pycqa/pylint - rev: v2.12.2 + rev: v2.13.2 hooks: - id: pylint language: system @@ -49,7 +49,7 @@ repos: - repo: local hooks: - id: pytest - entry: python setup.py test + entry: pytest language: system pass_filenames: false name: pytest diff --git a/docker-compose.yml b/docker-compose.yml index 6445373..80b7d37 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: postgres: build: context: ./postgres + dockerfile: dockerfile target: postgres environment: - POSTGRES_USER=postgres @@ -29,6 +30,7 @@ services: test: build: context: . + dockerfile: dockerfile target: test environment: - CONFIG=./local/test.yaml diff --git a/dockerfile b/dockerfile index 21b22ed..678f474 100644 --- a/dockerfile +++ b/dockerfile @@ -8,6 +8,7 @@ ENV FREETDS /etc/freetds ENV PATH /root/.local/bin:$PATH ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini COPY freetds.conf /etc/freetds/ +COPY license.txt . COPY readme.md . COPY setup.cfg . COPY setup.py . diff --git a/pyproject.toml b/pyproject.toml index 7b3b51f..bd9b5f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [build-system] requires = [ "pip>=22.0.4", + "pytest-runner>=6.0.0", "setuptools>=61.2.0", "setuptools_scm[toml]>=6.4.2", "wheel>=0.37.1", @@ -27,12 +28,17 @@ classifiers = [ "Topic :: Utilities", ] description = "An opinionated library to help deploy data science projects" -dynamic = ["dependencies", "version"] -license = { file = "./license.txt" } +dynamic = ["dependencies", "optional-dependencies", "version"] +license = { file = "license.txt" } name = "dsdk" requires-python = ">=3.7.4" readme = "readme.md" +[project.urls] +Homepage = "https://github.com/pennsignals/dsdk" +Source = "https://github.com/pennsignals/dsdk" +Tracker = "https://github.com/pennsignals/dsdk/issues" + [tool.black] line-length = 79 target-version = ["py37","py38","py39","py310"] diff --git a/setup.cfg b/setup.cfg index 8d08141..4bc33e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,9 +5,6 @@ universal = 1 tests_require = pytest zip_safe = false -[aliases] -test = pytest - [flake8] max-complexity = 10 max-line-length = 79 @@ -23,14 +20,6 @@ coverage_flags = cover: true nocover: false -[metadata] -long_description = file: readme.md -long_descritpion_content_type = text/markdown -name = dsdk -project_urls = - Issue Tracker = https://github.com/pennsignals/dsdk/issues -url = https://github.com/pennsignals/dsdk - [mypy] follow_imports = normal ignore_missing_imports = True diff --git a/setup.py b/setup.py index 8661364..9976041 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -"""DSDK.""" +"""Data Science Development/Deployment Toolkit.""" from setuptools import find_packages, setup @@ -7,13 +7,14 @@ ( "cfgenvy@" "git+https://github.com/pennsignals/cfgenvy.git" - "@1.3.3#egg=cfgenvy" + "@1.3.4#egg=cfgenvy" ), "numpy>=1.15.4", "pandas>=0.23.4", - "pip>=21.3.1", + "pip>=22.0.4", "requests>=2.26.0", - "setuptools>=60.3.1", + "setuptools>=61.2.0", + "setuptools_scm[toml]>=6.4.2", "wheel>=0.37.1", ) @@ -21,11 +22,6 @@ PSYCOPG2_REQUIRES = ("psycopg2-binary>=2.8.6",) -SETUP_REQUIRES = ( - "pytest-runner>=5.2", - "setuptools_scm[toml]>=4.1.2", -) - TEST_REQUIRES = ( "astroid", "black", @@ -66,7 +62,5 @@ packages=find_packages("src"), package_dir={"": "src"}, python_requires=">=3.7", - setup_requires=SETUP_REQUIRES, - tests_require=TEST_REQUIRES, use_scm_version={"local_scheme": "dirty-tag"}, )