diff --git a/.gitignore b/.gitignore index c9bd7c4..7b1be28 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ nested_lookup.egg-info/* .cache .vscode git_commit.sh -venv +venv/* +env/* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d0bf351 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +env: + python3 -m venv env + . env/bin/activate + env/bin/pip install --upgrade pip + +test: env + env/bin/pip install --upgrade -r requirements-test.txt + env/bin/py.test + #env/bin/py.test --lf diff --git a/README.rst b/README.rst index 7e1f07f..9ca2c93 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,6 @@ nested_lookup ############# -.. image:: https://img.shields.io/badge/pypi-0.2.23-green.svg - :target: https://pypi.python.org/pypi/nested-lookup -.. image:: https://travis-ci.org/rameshrvr/nested-lookup.svg?branch=master - :target: https://travis-ci.org/rameshrvr/nested-lookup - Make working with JSON, YAML, and XML document responses fun again! The `nested_lookup` package provides many Python functions for working with deeply nested documents. @@ -322,7 +317,7 @@ misc * Matheus Lins :web: - * http://russell.ballestrini.net + * https://russell.ballestrini.net * http://douglasmiranda.com (https://gist.github.com/douglasmiranda/5127251) * https://github.com/Salfiii * https://github.com/matheuslins diff --git a/nested_lookup/lookup_api.py b/nested_lookup/lookup_api.py index 388df84..e81b3c2 100644 --- a/nested_lookup/lookup_api.py +++ b/nested_lookup/lookup_api.py @@ -1,7 +1,7 @@ import copy import warnings from six import iteritems -from nested_lookup import nested_lookup +from .nested_lookup import nested_lookup def nested_delete(document, key, in_place=False): diff --git a/nested_lookup/tests/__init__.py b/nested_lookup/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test_lookup_api.py b/nested_lookup/tests/test_lookup_api.py similarity index 99% rename from test_lookup_api.py rename to nested_lookup/tests/test_lookup_api.py index 8d9d1dc..e279958 100644 --- a/test_lookup_api.py +++ b/nested_lookup/tests/test_lookup_api.py @@ -1,7 +1,11 @@ from unittest import TestCase -from nested_lookup import nested_lookup, nested_update -from nested_lookup import nested_delete, nested_alter +from .. import ( + nested_lookup, + nested_update, + nested_delete, + nested_alter, +) class BaseLookUpApi(TestCase): diff --git a/test_nested_lookup.py b/nested_lookup/tests/test_nested_lookup.py similarity index 99% rename from test_nested_lookup.py rename to nested_lookup/tests/test_nested_lookup.py index b1bf44b..fbace17 100644 --- a/test_nested_lookup.py +++ b/nested_lookup/tests/test_nested_lookup.py @@ -1,6 +1,6 @@ from unittest import TestCase -from nested_lookup import ( +from .. import ( nested_lookup, get_all_keys, get_occurrence_of_key, diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..e83cf3d --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,5 @@ +# testing. +pytest +pytest-cov +nose +twine diff --git a/setup.py b/setup.py index 7355be8..5bb2d0a 100644 --- a/setup.py +++ b/setup.py @@ -23,16 +23,16 @@ print(requirements()) setup( name="nested-lookup", - version="0.2.23", + version="0.2.24", description="Python functions for working with deeply nested documents (lists and dicts) ", keywords="nested document dictionary dict list lookup schema json xml yaml", long_description=open("README.rst").read(), author="Russell Ballestrini", - author_email="russell@ballestrini.net", - url="https://github.com/russellballestrini/nested-lookup", + author_email="russell.ballestrini@gmail.com", + url="https://git.unturf.com/python/nested-lookup", platforms=["All"], license="Public Domain", - packages=find_packages(), + packages=find_packages(exclude="tests"), include_package_data=True, install_requires=requirements(), classifiers=[ @@ -44,6 +44,7 @@ setup( "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], ) @@ -51,5 +52,5 @@ setup( # build package: # pip install twine -# python setup.py sdist +# python setup.py sdist bdist_egg # twine upload dist/*