From 21b47ee6b9edb5d4d52d42bc05652788796e9bdb Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Tue, 28 Feb 2023 19:38:11 -0600 Subject: [PATCH 1/8] build: Added unbuild script. --- unbuild | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 unbuild diff --git a/unbuild b/unbuild new file mode 100755 index 0000000..0494247 --- /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 nexport.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 From f625e2f6db36b727e3045fcfe760457b40fd4b8c Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Tue, 28 Feb 2023 19:42:59 -0600 Subject: [PATCH 2/8] build: Edited setup script. --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8edcc18..a92a1e7 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name='modular-json', 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', @@ -47,6 +47,5 @@ 'modular-json': py_modules }, python_requires=python_version, - keywords='python, json, modular, parsing, interpreting, exporting, importing' ) \ No newline at end of file From 1774fb1bbbf877fa6b4a970221b5a10b8e2db68e Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Tue, 28 Feb 2023 19:45:17 -0600 Subject: [PATCH 3/8] .gitignore: Added ignore file. --- .gitignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e5613c --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# MacOS +.DS_Store + +# Python +.venv/ + +# Package +test.py + +# Setuptools +build/ +dist/ +modular_json.egg-info/ +**/__pycache__/ \ No newline at end of file From 5834481a61e7d593091918793a258ae21e50691d Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Tue, 28 Feb 2023 19:47:26 -0600 Subject: [PATCH 4/8] build: Corrected name in unbuild script. --- unbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unbuild b/unbuild index 0494247..eea3759 100755 --- a/unbuild +++ b/unbuild @@ -16,7 +16,7 @@ then 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 nexport.egg-info -type d -print0|xargs -0 rm -r -- # remove all egg-info directories + find . -name modular_json.egg-info -type d -print0|xargs -0 rm -r -- # remove all egg-info directories echo "Project successfully unbuilt." else echo "Operation aborted." From 61b1d29b7b1447ac0bfbabd44ad6f76226b11fd1 Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Wed, 1 Mar 2023 21:27:51 -0600 Subject: [PATCH 5/8] proj: Renamed project to 'openjson' to avoid hyphenation error.. --- modular-json/__init__.py | 8 -------- openjson/__init__.py | 9 +++++++++ {modular-json/load => openjson/encoding}/__init__.py | 0 {modular-json/save => openjson/loading}/__init__.py | 0 openjson/saving/__init__.py | 1 + 5 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 modular-json/__init__.py create mode 100644 openjson/__init__.py rename {modular-json/load => openjson/encoding}/__init__.py (100%) rename {modular-json/save => openjson/loading}/__init__.py (100%) create mode 100644 openjson/saving/__init__.py 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 From 5954c99284d065ffb8094571a2a8f5be62fe9896 Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Wed, 1 Mar 2023 21:29:41 -0600 Subject: [PATCH 6/8] .gitignore: Updated project name directory. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4e5613c..0d56b73 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,5 @@ test.py # Setuptools build/ dist/ -modular_json.egg-info/ +openjson.egg-info/ **/__pycache__/ \ No newline at end of file From ae1ec4769b3f56a30f713c3f188a11a4cf2bf437 Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Wed, 1 Mar 2023 21:32:04 -0600 Subject: [PATCH 7/8] build: Edited unbuild script to include updated directory name. --- unbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unbuild b/unbuild index eea3759..b3c83fd 100755 --- a/unbuild +++ b/unbuild @@ -16,7 +16,7 @@ then 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 modular_json.egg-info -type d -print0|xargs -0 rm -r -- # remove all egg-info 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." From eda3d5ff2ca5c16b7e0e8434ae8ce09471dcbc57 Mon Sep 17 00:00:00 2001 From: Jordan Welsman Date: Wed, 1 Mar 2023 21:32:33 -0600 Subject: [PATCH 8/8] build: Added jutils as a dependency. --- setup.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index a92a1e7..811d53a 100644 --- a/setup.py +++ b/setup.py @@ -10,11 +10,11 @@ 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 handling JSON.', license='MIT', @@ -22,8 +22,8 @@ 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,8 +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