Package: pronom-tools
PRONOM Release ToolsTools for working with PRONOM releases.PRONOM Release ToolsToolingPRONOM ToolsCheck existingRelease statsPRONOM StatsEnvironmentPortsPRONOM CronExample cronPRONOM SummaryDeveloper installpiptoxRun tests (all)Run tests-onlyRun linting-onlypre-commitPackagingpyproject.tomlLocal packagingPublishingToolingA summary of the tooling included. A total of three tools are packaged in this
repository, and they can all be run with the-hflag to see what options
are available. The three tools are:pronom-tools
pronom-stats
pronom-cronThese can be installed from the Python Packaging Index (PyPi)here.More information can be found about the commands below.PRONOM ToolsCoordinate PRONOM release output to produce a summary about the dataset and
provide links to latest release information, including links to the latest
PRONOM signature files.To run:python-msrc.pronom_tools.pronom_toolsCheck existing{"date":"2023-11-23","latest_puid":"fmt/1924","version":"V116","sig_file":"https://cdn.nationalarchives.gov.uk/documents/DROID_SignatureFile_V116.xml","container_sig":"https://cdn.nationalarchives.gov.uk/documents/container-signature-20231127.xml","xpuid_const":"x-fmt/455"}Release stats{"date":"2023-11-23","latest_puid":"fmt/1924","version":"V116","sig_file":"https://cdn.nationalarchives.gov.uk/documents/DROID_SignatureFile_V116.xml","container_sig":"https://cdn.nationalarchives.gov.uk/documents/container-signature-20231127.xml","xpuid_const":"x-fmt/455","pronom_data":[{"name":"Broadcast WAVE 0 Generic","description":"complete","signature":true,"identifier":"fmt/1"},{"name":"Microsoft Word for Macintosh Document 3.0","description":"complete","signature":true,"identifier":"x-fmt/1"}]}PRONOM StatsProvides a HTTP server to store stats about a PRONOM release based on the
different scripts above.To run:python-msrc.pronom_stats.pronom_statsEnvironmentApronom.emvfile is needed that looks as follows:# Config for PRONOM tools.
SERVER_AUTH=badf00d
SERVER_ADDR=http://127.0.0.1:26000PortsPorts that are used by this application:pronom api: 26000
pronom summary site: 26001PRONOM CronPRONOM Cron can be run as a cron task to update the pronom summary database
on a regular basis. Run with-ito initialize, and from there, run itn-times a day to look for a new PRONOM release.To run:python-msrc.pronom_cron.pronom_cronExample cronNB. the following example requires that cron-stats is setup and running so
that the stats downloaded during the cron job can be stored.To test for a new PRONOM release every four hours run:crontab-eAnd then add a task to run every four hours.0 */4 * * * pronom-cronFor more cron examples seecron guru,PRONOM SummarySummarize a PRONOM by comparing the PRONOM dataset with its corresponding
signature files. The output for a single file format looks as follows:{"name":"yEnc Encoded File","description":"complete","signature":true,"identifier":"fmt/1100"}To run:python-msrc.pronom_summary.pronom_summaryDeveloper installpipSetup a virtual environmentvenvand install the local development
requirements as follows:python3-mvenvvenvsourcevenv/bin/activate
python-mpipinstall-rrequirements/local.txttoxRun tests (all)python-mtoxRun tests-onlypython-mtox-epy3Run linting-onlypython-mtox-elintingpre-commitPre-commit can be used to provide more feedback before committing code. This
reduces reduces the number of commits you might want to make when working on
code, it's also an alternative to running tox manually.To set up pre-commit, providingpip installhas been run above:pre-commit installThis repository contains a default number of pre-commit hooks, but there may
be others suited to different projects. A list of other pre-commit hooks can be
foundhere.PackagingTheMakefilecontains helper functions for packaging and release.Makefile functions can be reviewed by callingmakefrom the root of this
repository:cleanCleanthepackagedirectorydocsGeneratedocumentationhelpPrintthishelpmessagepackage-checkCheckthedistributionisvalidpackage-depsUpgradedependenciesforpackagingpackage-sourcePackagethesourcecodepackage-uploadUploadpackagetopypipackage-upload-testUploadpackagetotest.pypipre-commitRunallpre-commitchecksserve-docsServethedocumentationtar-sourcePackagerepositoryastarforeasydistributionpyproject.tomlPackaging consumes the metadata inpyproject.tomlwhich helps to describe
the project on the officialpypi.orgrepository. Have a look at the
documentation and comments there to help you create a suitably descriptive
metadata file.Local packagingTo create a python wheel for testing locally, or distributing to colleagues
run:make package-sourceAtarandwhlfile will be stored in adist/directory. Thewhlfile
can be installed as follows:pip install <your-package>.whlPublishingPublishing for public use can be achieved with:make package-upload-testormake package-uploadmake-package-upload-testwill upload the package totest.pypi.orgwhich provides a way to look at package metadata and documentation and ensure
that it is correct before uploading to the officialpypi.orgrepository usingmake package-upload.