From 26f9dd796d8d4a7d7612003e5685c5b144f81985 Mon Sep 17 00:00:00 2001 From: SylikC Date: Sat, 26 Mar 2022 06:48:30 -0700 Subject: [PATCH] no functional changes. Update documentation slightly, and preparing for 0.5.3 release --- CHANGELOG.md | 19 +++++-- README.rst | 3 ++ docs/source/maintenance/release-process.rst | 55 ++++++++++++--------- exiftool/__init__.py | 2 +- setup.py | 24 +++++---- 5 files changed, 64 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b33775c..59eed8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # PyExifTool Changelog +Date (Timezone) | Version | Comment +---------------------------- | ------- | ------- +03/13/2021 01:54:44 PM (PST) | 0.5.0a0 | no functional code changes ... yet. this is currently on a separate branch referring to [Break down Exiftool into 2+ classes, a raw Exiftool, and helper classes](https://github.com/sylikc/pyexiftool/discussions/10) and [Deprecating Python 2.x compatibility](https://github.com/sylikc/pyexiftool/discussions/9) . In time this refactor will be the future of PyExifTool, once it stabilizes. I'll make code-breaking updates in this branch from build to build and take comments to make improvements. Consider the 0.5.0 "nightly" quality. Also, changelog versions were modified because I noticed that the LAST release from smarnach is tagged with v0.2.0 +02/28/2022 12:39:57 PM (PST) | 0.5.0 | complete refactor of the PyExifTool code. Lots of changes. Some code breaking changes. Not directly backwards-compatible with v0.4.x. See COMPATIBILITY.TXT to understand all the code-breaking changes. +03/02/2022 07:07:26 AM (PST) | 0.5.1 | v0.5 Sphinx documentation generation finally working. Lots of reStructuredText written to make the documentation better!
There's no functional changes to PyExifTool, but after several days and hours of effort, every single docstring in ExifTool and ExifToolHelper was updated to reflect all v0.5.0 changes. ExifToolAlpha was largely untouched because the methods exposed haven't really been updated this time. +03/03/2022 06:49:31 PM (PST) | 0.5.2 | Predicting the next most requested method: ExifToolHelper now has a set_tags() method similar to the get_tags() method. This was pulled from ExifToolAlpha, combining the old set_tags/set_tags_batch into one method.
Added a new constructor/property to ExifToolHelper: check_execute, which (by default) will raise ExifToolExecuteError when the exit status code from exiftool subprocess is non-zero. This should help users debug otherwise silent errors.
Also updated more docstrings and added maintenance script to generate docs. +03/26/2022 06:48:01 AM (PDT) | 0.5.3 | Quite a few docstring changes
ExifToolHelper's get_tags() and set_tags() checks tag names to prevent inadvertent write behavior
Renamed a few of the errors to make sure the errors are explicit
ExifToolHelper() has some static helper methods which can be used when extending the class (ExifToolAlpha.set_keywords_batch() demonstrates a sample usage).
setup.py tweaked to make it Beta rather than Alpha
ExifToolAlpha.get_tag() updated to make it more robust.
Fixed ujson compatibility
Cleaned up and refactored testing. + + +Follow maintenance/release-process.html when releasing a version. + + +# PyExifTool Changelog Archive (v0.2 - v0.4) + Date (Timezone) | Version | Comment ---------------------------- | ------- | ------- 07/17/2019 12:26:16 AM (PDT) | 0.2.0 | Source was pulled directly from https://github.com/smarnach/pyexiftool with a complete bare clone to preserve all history. Because it's no longer being updated, I will pull all merge requests in and make updates accordingly @@ -35,13 +49,8 @@ Date (Timezone) | Version | Comment 08/22/2021 08:34:45 PM (PDT) | 0.4.11 | no functional code changes. Changed setup.py with updated version and Documentation link pointed to sylikc.github.io -- as per issue #27 by @derMart 08/22/2021 09:02:33 PM (PDT) | 0.4.12 | fixed a bug ExifTool.terminate() where there was a typo. Kept the unused outs, errs though. -- from suggestion in pull request #26 by @aaronkollasch 02/13/2022 03:38:45 PM (PST) | 0.4.13 | (NOTE: Barring any critical bug, this is expected to be the LAST Python 2 supported release!) added GitHub actions. fixed bug in execute_json_wrapper() 'error' was not defined syntactically properly -- merged pull request #30 by https://github.com/jangop -03/13/2021 01:54:44 PM (PST) | 0.5.0a0 | no functional code changes ... yet. this is currently on a separate branch referring to [Break down Exiftool into 2+ classes, a raw Exiftool, and helper classes](https://github.com/sylikc/pyexiftool/discussions/10) and [Deprecating Python 2.x compatibility](https://github.com/sylikc/pyexiftool/discussions/9) . In time this refactor will be the future of PyExifTool, once it stabilizes. I'll make code-breaking updates in this branch from build to build and take comments to make improvements. Consider the 0.5.0 "nightly" quality. Also, changelog versions were modified because I noticed that the LAST release from smarnach is tagged with v0.2.0 -02/28/2022 12:39:57 PM (PST) | 0.5.0 | complete refactor of the PyExifTool code. Lots of changes. Some code breaking changes. Not directly backwards-compatible with v0.4.x. See COMPATIBILITY.TXT to understand all the code-breaking changes. -03/02/2022 07:07:26 AM (PST) | 0.5.1 | v0.5 Sphinx documentation generation finally working. Lots of reStructuredText written to make the documentation better!
There's no functional changes to PyExifTool, but after several days and hours of effort, every single docstring in ExifTool and ExifToolHelper was updated to reflect all v0.5.0 changes. ExifToolAlpha was largely untouched because the methods exposed haven't really been updated this time. -03/03/2022 06:49:31 PM (PST) | 0.5.2 | Predicting the next most requested method: ExifToolHelper now has a set_tags() method similar to the get_tags() method. This was pulled from ExifToolAlpha, combining the old set_tags/set_tags_batch into one method.
Added a new constructor/property to ExifToolHelper: check_execute, which (by default) will raise ExifToolExecuteError when the exit status code from exiftool subprocess is non-zero. This should help users debug otherwise silent errors.
Also updated more docstrings and added maintenance script to generate docs. -On version changes, update __init__.py to reflect version # Changes around the web diff --git a/README.rst b/README.rst index b8d2084..3cacd13 100644 --- a/README.rst +++ b/README.rst @@ -97,9 +97,12 @@ From Source ------------ #. Check out the source code from the github repository + * ``git clone git://github.com/sylikc/pyexiftool.git`` * Alternatively, you can download a tarball_. + #. Run setup.py to install the module from source + * ``python setup.py install [--user|--prefix=]`` diff --git a/docs/source/maintenance/release-process.rst b/docs/source/maintenance/release-process.rst index d6bc5de..aa136ad 100644 --- a/docs/source/maintenance/release-process.rst +++ b/docs/source/maintenance/release-process.rst @@ -8,12 +8,12 @@ This page documents the steps to be taken to release a new version of PyExifTool Source Preparation ================== -1. Update the version number in ``exiftool/__init__.py`` -2. Add any changelog entries to ``CHANGELOG.md`` -3. Run Tests -4. Generate docs -5. Commit and push the changes. -6. Check that the tests passed on GitHub. +#. Update the version number in ``exiftool/__init__.py`` +#. Add any changelog entries to ``CHANGELOG.md`` +#. Run Tests +#. Generate docs +#. Commit and push the changes. +#. Check that the tests passed on GitHub. Pre-Requisites @@ -21,21 +21,21 @@ Pre-Requisites Make sure the latest packages are installed. -1. pip: ``python -m pip install --upgrade pip`` -2. build tools: ``python -m pip install --upgrade setuptools build`` -3. for uploading to PyPI: ``python -m pip install --upgrade twine`` +#. pip: ``python -m pip install --upgrade pip`` +#. build tools: ``python -m pip install --upgrade setuptools build`` +#. for uploading to PyPI: ``python -m pip install --upgrade twine`` Run Tests ========= -1. Run in standard unittest: ``python -m unittest -v`` -2. Run in PyTest: ``scripts\pytest.bat`` +#. Run in standard unittest: ``python -m unittest -v`` +#. Run in PyTest: ``scripts\pytest.bat`` Build and Check =============== -1. Build package: ``python -m build`` -2. `Validating reStructuredText markup`_: ``python -m twine check dist/*`` +#. Build package: ``python -m build`` +#. `Validating reStructuredText markup`_: ``python -m twine check dist/*`` .. _Validating reStructuredText markup: https://packaging.python.org/guides/making-a-pypi-friendly-readme/#validating-restructuredtext-markup @@ -44,24 +44,33 @@ Upload to Test PyPI Set up the ``$HOME/.pypirc`` (Linux) or ``%UserProfile%\.pypirc`` (Windows) -1. ``python -m twine upload --repository testpypi dist/*`` -2. Check package uploaded properly: `TestPyPI PyExifTool`_ -3. Test in a new temporary venv: ``python -m pip install -U -i https://test.pypi.org/simple/ PyExifTool==`` +#. ``python -m twine upload --repository testpypi dist/*`` +#. Check package uploaded properly: `TestPyPI PyExifTool`_ +#. Create a temporary venv to test PyPI and run tests - * If there is an error with SSL verification, just trust it: ``python -m pip install --trusted-host test-files.pythonhosted.org -U -i https://test.pypi.org/simple/ PyExifTool==`` + #. ``python -m venv tmp`` + #. Activate venv + #. ``python -m pip install -U -i https://test.pypi.org/simple/ PyExifTool`` -4. Run tests and examine files installed + * If there is an error with SSL verification, just trust it: ``python -m pip install --trusted-host test-files.pythonhosted.org -U -i https://test.pypi.org/simple/ PyExifTool`` + * If you want to test a specific version, can specify as ``PyExifTool==``, otherwise it installs the latest by default -5. Cleanup: ``python -m pip uninstall PyExifTool``, then delete temp venv + #. Make sure exiftool is found on PATH + #. Run tests: ``python -m pytext -v `` -.. _TestPyPI PyExifTool: https://test.pypi.org/project/PyExifTool/#history +#. Examine files installed to make sure it looks ok + +#. Cleanup: ``python -m pip uninstall PyExifTool``, then delete temp venv + + +.. _`TestPyPI PyExifTool`: https://test.pypi.org/project/PyExifTool/#history Release ======= -1. Be very sure all the tests pass and the package is good, because `PyPI does not allow for a filename to be reused`_ -2. Release to production PyPI: ``python -m twine upload dist/*`` -3. If needed, create a tag, and a GitHub release with the *whl* file +#. Be very sure all the tests pass and the package is good, because `PyPI does not allow for a filename to be reused`_ +#. Release to production PyPI: ``python -m twine upload dist/*`` +#. If needed, create a tag, and a GitHub release with the *whl* file .. code-block:: bash diff --git a/exiftool/__init__.py b/exiftool/__init__.py index dd8495f..e65eb01 100644 --- a/exiftool/__init__.py +++ b/exiftool/__init__.py @@ -61,7 +61,7 @@ # version number using Semantic Versioning 2.0.0 https://semver.org/ # may not be PEP-440 compliant https://www.python.org/dev/peps/pep-0440/#semantic-versioning -__version__ = "0.5.2" +__version__ = "0.5.3" # while we COULD import all the exceptions into the base library namespace, diff --git a/setup.py b/setup.py index 9556ddc..6d1ccdb 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ import re def get_long_desc(): - """ read README.rst without the badges (don't need those showing up on PyPI) """ + """ read README.rst skipping some of the badges (don't need those showing up on PyPI) """ with open("README.rst", "r", encoding="utf-8") as fh: long_desc = fh.read() @@ -56,7 +56,7 @@ def get_long_desc(): python_requires=">=3.6", # authors - author="Sven Marnach, Kevin M (sylikc), various contributors", + author="Kevin M (sylikc), Sven Marnach, various contributors", author_email="sylikc@gmail.com", # info @@ -66,9 +66,11 @@ def get_long_desc(): keywords="exiftool image exif metadata photo video photography", project_urls={ - "Documentation": "https://sylikc.github.io/pyexiftool/", - "Tracker": "https://github.com/sylikc/pyexiftool/issues", + # this seems to get populated in PyPI in reverse order "Source": "https://github.com/sylikc/pyexiftool", + "Tracker": "https://github.com/sylikc/pyexiftool/issues", + "Changelog": "https://github.com/sylikc/pyexiftool/blob/master/CHANGELOG.md", + "Documentation": "https://sylikc.github.io/pyexiftool/", }, @@ -98,16 +100,18 @@ def get_long_desc(): ], + # include is more robust that exclude packages=find_packages( - where=".", - exclude = ['test*','doc*'] + #where=".", + #exclude = ['test*','doc*'], + include=['exiftool', 'exiftool.*'], ), extras_require={ - "json": ["ujson"], # supported option for ExifTool, but not currently advertised - "test": ["packaging"], # dependencies to do tests - "docs": ["packaging", "sphinx", "sphinx-autoapi", "sphinx-rtd-theme", "sphinx-autodoc-typehints"], # dependencies to build docs - }, + "json": ["ujson"], # supported option for ExifTool, but not currently advertised + "test": ["packaging"], # dependencies to do tests + "docs": ["packaging", "sphinx", "sphinx-autoapi", "sphinx-rtd-theme", "sphinx-autodoc-typehints"], # dependencies to build docs + }, #package_dir={'exiftool': 'exiftool'},