Skip to content

Commit

Permalink
no functional changes. Update documentation slightly, and preparing f…
Browse files Browse the repository at this point in the history
…or 0.5.3 release
  • Loading branch information
sylikc committed Mar 26, 2022
1 parent 7341fcc commit 26f9dd7
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 39 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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!<br>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.<br>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.<br>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<br>ExifToolHelper's get_tags() and set_tags() checks tag names to prevent inadvertent write behavior<br>Renamed a few of the errors to make sure the errors are explicit<br>ExifToolHelper() has some static helper methods which can be used when extending the class (ExifToolAlpha.set_keywords_batch() demonstrates a sample usage).<br>setup.py tweaked to make it Beta rather than Alpha<br>ExifToolAlpha.get_tag() updated to make it more robust.<br>Fixed ujson compatibility<br>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
Expand Down Expand Up @@ -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!<br>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.<br>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.<br>Also updated more docstrings and added maintenance script to generate docs.


On version changes, update __init__.py to reflect version


# Changes around the web
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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=<installation-prefix>]``


Expand Down
55 changes: 32 additions & 23 deletions docs/source/maintenance/release-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ 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
==============

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

Expand All @@ -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==<version>``
#. ``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==<version>``
#. ``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==<version>``, 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 <path to tests directory>``

.. _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
Expand Down
2 changes: 1 addition & 1 deletion exiftool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
24 changes: 14 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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="[email protected]",

# info
Expand All @@ -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/",
},


Expand Down Expand Up @@ -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'},

Expand Down

0 comments on commit 26f9dd7

Please sign in to comment.