diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d56b73 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# MacOS +.DS_Store + +# Python +.venv/ + +# Package +test.py + +# Setuptools +build/ +dist/ +openjson.egg-info/ +**/__pycache__/ \ No newline at end of file diff --git a/modular-json/__init__.py b/modular-json/__init__.py deleted file mode 100644 index 6806845..0000000 --- a/modular-json/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -# Dunder attributes -__version__ = "v0.0.0" # update setup.py -__author__ = "Jordan Welsman" - -from .load import * -from .save import * - -__all__ = load.__all__, save.__all__ \ No newline at end of file diff --git a/openjson/__init__.py b/openjson/__init__.py new file mode 100644 index 0000000..cfb22d6 --- /dev/null +++ b/openjson/__init__.py @@ -0,0 +1,9 @@ +# Dunder attributes +__version__ = "v0.0.0" # update setup.py +__author__ = "Jordan Welsman" + +from .encoding import * +from .loading import * +from .saving import * + +__all__ = encoding.__all__, loading.__all__, saving.__all__ \ No newline at end of file diff --git a/modular-json/load/__init__.py b/openjson/encoding/__init__.py similarity index 100% rename from modular-json/load/__init__.py rename to openjson/encoding/__init__.py diff --git a/modular-json/save/__init__.py b/openjson/loading/__init__.py similarity index 100% rename from modular-json/save/__init__.py rename to openjson/loading/__init__.py diff --git a/openjson/saving/__init__.py b/openjson/saving/__init__.py new file mode 100644 index 0000000..b680692 --- /dev/null +++ b/openjson/saving/__init__.py @@ -0,0 +1 @@ +__all__ = [] \ No newline at end of file diff --git a/setup.py b/setup.py index 8edcc18..811d53a 100644 --- a/setup.py +++ b/setup.py @@ -10,20 +10,20 @@ long_description = fh.read() # modular-json package data -py_modules = ["load", "save"] +py_modules = ["encoding", "loading", "saving"] # Run setup function setup( - name='modular-json', + name='openjson', version=version, - description='A modular approach to parsing JSON.', + description='A modular approach to handling JSON.', license='MIT', long_description=long_description, long_description_content_type='text/markdown', author='Jordan Welsman', author_email='jordan.welsman@outlook.com', - url='https://pypi.org/project/modular-json/', - download_url='https://github.com/JordanWelsman/modular-json/tags', + url='https://pypi.org/project/openjson/', + download_url='https://github.com/JordanWelsman/openjson/tags', classifiers=[ 'Development Status :: 1 - Planning', 'Intended Audience :: Developers', @@ -44,9 +44,11 @@ "Programming Language :: Python :: 3.12" ], package_data = { - 'modular-json': py_modules + 'openjson': py_modules }, python_requires=python_version, - + install_requires = [ + "jutl" + ], keywords='python, json, modular, parsing, interpreting, exporting, importing' ) \ No newline at end of file diff --git a/unbuild b/unbuild new file mode 100755 index 0000000..b3c83fd --- /dev/null +++ b/unbuild @@ -0,0 +1,23 @@ +#!/bin/sh + +# modular-json Unbuild Script +# To be used to delete the directories & files created by `python setup.py bdist_wheel`. + +# Author : Jordan Welsman +# Copyright : Jordan Welsman + +echo "You are about to delete files & folders from jutils." +echo "These files are crucial to the ability to install and import jutils." +read -p "Do you want to continue? [Y/n]: " + +if [[ $REPLY =~ ^[Yy]$ ]] +then + rm -rf build # remove build directory if exists + rm -rf dist # remove distribution directory if exists + find . -name __pycache__ -type d -print0|xargs -0 rm -r -- # remove all pycache directories + find . -name .pytest_cache -type d -print0|xargs -0 rm -r -- # remove all pytest cache directories + find . -name openjson.egg-info -type d -print0|xargs -0 rm -r -- # remove all egg-info directories + echo "Project successfully unbuilt." +else + echo "Operation aborted." +fi \ No newline at end of file