diff --git a/.gitignore b/.gitignore index 3f67ec7..a1a6683 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,10 @@ # Local files *.pyc -*.pkl *.egg-info -build -dist .DS_Store -tests/data/good2.py +dist +build +*.pkl .coverage +tests/data/good2.py diff --git a/README.md b/README.md index ae13344..f711120 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,9 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) ## Description - Library to define configs for model run. ### Usage - 1) Define first-level base config. It can represent a global base config shared between projects. ```python @@ -115,7 +113,7 @@ pip install ntc ### Formatting This repository follows strict formatting style which will be checked by the CI. -To properly format the code use **nt-dev** package: +To properly format the code, use the **nt-dev** package: ```bash pip install nt-dev nt-format diff --git a/ntc/__init__.py b/ntc/__init__.py index a1d9c66..4ec6af6 100644 --- a/ntc/__init__.py +++ b/ntc/__init__.py @@ -1,3 +1,4 @@ +""" NeuroTrade Config Library """ from .errors import * from .interfaces import * from .leaf import * diff --git a/pyproject.toml b/pyproject.toml index ade7bea..de806ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,33 @@ [build-system] -requires = ["setuptools>=48", "wheel"] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "ntc" +authors = [{name = "Vladimir Mikhaylov", email = "v.mikhaylov@neurotrade.ru"}] +readme = "README.md" +requires-python = ">=3.9" +dynamic = ["version", "description"] +dependencies = [ + "pyyaml", +] + +[project.optional-dependencies] +tests = [ + "nt-dev>=0.29", +] +dev = [ + "nt-dev>=0.29", +] + +[tool.flit.sdist] +include = [ + "README.md", +] +exclude = [ + ".gitignore", + "tests/*", +] + +[tool.semantic_release] +version_variable = "ntc/__init__.py:__version__" diff --git a/requirements.txt b/requirements.txt index 5231047..2439df8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ --e .[all] +-e .[dev,tests] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 696adf7..0000000 --- a/setup.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[metadata] -name = ntc -version = attr:ntc.__version__ -description = NeuroTrade Config Library -author = Vladimir Mikhaylov -author_email = v.mikhaylov@neurotrade.ru - -[options] -python_requires = >=3.8 -install_requires = - pyyaml -setup_requires = - setuptools>=48 - wheel -platforms = any - -packages = find: - -[options.packages.find] -exclude = tests* - -[options.extras_require] -tests = - pytest - pytest-cov - nt-dev>=0.28.0 -dev = - nt-dev>=0.28.0 -all = - %(tests)s - %(dev)s - -[bdist_wheel] -universal = 0 - -[check-manifest] -ignore = - README.md - -[semantic_release] -version_variable = "ntc/__init__.py:__version__" diff --git a/setup.py b/setup.py deleted file mode 100755 index 6c37a4c..0000000 --- a/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 -from __future__ import annotations - -import pkg_resources -import setuptools - -pkg_resources.require("setuptools>=48") - -if __name__ == "__main__": - setuptools.setup() diff --git a/tests/requirements_frozen.txt b/tests/requirements_frozen.txt index ede237c..4a9668a 100644 --- a/tests/requirements_frozen.txt +++ b/tests/requirements_frozen.txt @@ -8,7 +8,7 @@ --trusted-host 192.168.135.12 appdirs==1.4.4 # via black -attrs==21.2.0 # via black, pytest +attrs==21.4.0 # via black, pytest autoflake==1.4 # via nt-dev black==19.10b0 # via nt-dev bleach==4.1.0 # via readme-renderer @@ -19,7 +19,7 @@ charset-normalizer==2.0.11 # via requests click==8.0.3 # via black, click-log, pip-tools, python-semantic-release click-log==0.3.2 # via python-semantic-release colorama==0.4.4 # via nt-dev, twine -coverage==6.1.2 # via pytest-cov +coverage==6.3.1 # via nt-dev, pytest-cov cryptography==36.0.1 # via secretstorage docutils==0.18.1 # via readme-renderer dotty-dict==1.3.0 # via python-semantic-release @@ -37,7 +37,7 @@ keyring==23.5.0 # via twine mccabe==0.6.1 # via flake8 mypy==0.931 # via nt-dev mypy-extensions==0.4.3 # via mypy -nt-dev~=0.28.0 # via ntc +nt-dev~=0.29.1 # via ntc packaging==21.3 # via bleach, build, pytest, setuptools-scm pathspec==0.9.0 # via black pep517==0.12.0 # via build, pip-tools @@ -50,9 +50,9 @@ pycodestyle==2.8.0 # via flake8 pycparser==2.21 # via cffi pyflakes==2.4.0 # via autoflake, flake8 pygments==2.11.2 # via readme-renderer -pyparsing==3.0.6 # via packaging -pytest==6.2.5 # via nt-dev, ntc, pytest-cov -pytest-cov==3.0.0 # via nt-dev, ntc +pyparsing==3.0.7 # via packaging +pytest==6.2.5 # via nt-dev, pytest-cov +pytest-cov==3.0.0 # via nt-dev python-gitlab==2.10.1 # via python-semantic-release python-semantic-release==7.24.0 # via nt-dev pyyaml==6.0 # via nt-dev, ntc @@ -67,10 +67,10 @@ setuptools-scm==6.4.2 # via dotty-dict six==1.16.0 # via bleach smmap==5.0.0 # via gitdb toml==0.10.2 # via black, nt-dev, pytest -tomli==1.2.2 # via build, coverage, mypy, pep517, setuptools-scm +tomli==2.0.0 # via build, coverage, mypy, pep517, setuptools-scm tomlkit==0.7.0 # via python-semantic-release tqdm==4.62.3 # via twine -twine==3.7.1 # via nt-dev, python-semantic-release +twine==3.8.0 # via nt-dev, python-semantic-release typed-ast==1.5.2 # via black types-pyyaml==6.0.4 # via nt-dev types-requests==2.27.8 # via nt-dev @@ -78,7 +78,7 @@ types-setuptools==57.4.8 # via nt-dev types-toml==0.10.3 # via nt-dev types-urllib3==1.26.8 # via types-requests typing-extensions==4.0.1 # via mypy -urllib3==1.26.8 # via requests +urllib3==1.26.8 # via requests, twine webencodings==0.5.1 # via bleach wheel==0.37.1 # via nt-dev, pip-tools, python-semantic-release zipp==3.7.0 # via importlib-metadata