diff --git a/.gitignore b/.gitignore index b3fd047..d6bed2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,85 @@ -*.egg-info -*.py[co] -/.coverage -/.tox -/dist -.vscode/ +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion + +*.iml + +## Directory-based project format: +.idea/ + +### Other editors +.*.swp +nbproject/ +.vscode + +*.exe +*.zip + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# for testing +temp/ +tmp/ diff --git a/settngs.py b/settngs/__init__.py similarity index 100% rename from settngs.py rename to settngs/__init__.py diff --git a/settngs/__main__.py b/settngs/__main__.py new file mode 100644 index 0000000..837f986 --- /dev/null +++ b/settngs/__main__.py @@ -0,0 +1,6 @@ +from __future__ import annotations + +from settngs import _main + +if __name__ == '__main__': + _main() diff --git a/settngs/py.typed b/settngs/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.cfg b/setup.cfg index 0b9c396..7da5ee6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = settngs -version = 0.6.2 +version = 0.6.3 description = A library for managing settings long_description = file: README.md long_description_content_type = text/markdown @@ -17,16 +17,69 @@ classifiers = Programming Language :: Python :: Implementation :: PyPy [options] -py_modules = settngs +packages = find: install_requires = typing-extensions;python_version < '3.11' python_requires = >=3.8 +include_package_data = True [options.packages.find] exclude = tests* testing* +[options.package_data] +settngs = py.typed + +[tox:tox] +envlist = py3.8,py3.9,py3.10,py3.11,pypy3 + +[testenv] +deps = -rrequirements-dev.txt +commands = + coverage erase + coverage run -m pytest {posargs:tests} + coverage report + +[testenv:wheel] +description = Generate wheel and tar.gz +labels = + release + build +skip_install = true +deps = + build +commands_pre = + -python -c 'import shutil,pathlib; \ + shutil.rmtree("./build/", ignore_errors=True); \ + shutil.rmtree("./dist/", ignore_errors=True)' +commands = + python -m build + +[testenv:pypi-upload] +description = Upload wheel to PyPi +platform = Linux +labels = + release +skip_install = true +depends = wheel +deps = + twine +passenv = + TWINE_* +setenv = + TWINE_NON_INTERACTIVE=true +commands = + python -m twine upload dist/*.whl dist/*.tar.gz + +[pep8] +ignore = E265,E501 +max_line_length = 120 + +[flake8] +extend-ignore = E501, A003 +max_line_length = 120 + [coverage:run] plugins = covdefaults diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 8f5bad3..0000000 --- a/tox.ini +++ /dev/null @@ -1,17 +0,0 @@ -[tox] -envlist = py3.8,py3.9,py3.10,py3.11,pypy3 - -[testenv] -deps = -rrequirements-dev.txt -commands = - coverage erase - coverage run -m pytest {posargs:tests} - coverage report - -[pep8] -ignore = E265,E501 -max_line_length = 120 - -[flake8] -extend-ignore = E501, A003 -max_line_length = 120