diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..23d3c98 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,43 @@ +# refer: https://github.com/dependabot/dependabot-core/blob/main/.github/dependabot.yml +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates managed by Composer once a week + interval: "weekly" + day: "wednesday" + time: "03:00" + timezone: "Europe/London" + + # python + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + day: "wednesday" + time: "03:00" + timezone: "Europe/London" + groups: + common: + patterns: + - hashin + - cython + - flake8 + # Keep the package managers themselves separate because they are higher risk + # and also higher visibility--ie, users generally want latest, so we don't + # want breakage in the `common` group to prevent updating package manager versions + pip: + patterns: + - pip + pip-tools: + patterns: + - pip-tools + pipenv: + patterns: + - pipfile + - pipenv + poetry: + patterns: + - poetry diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 979708b..7922929 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13" ] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/DEVELOPERS.md b/DEVELOPERS.md index e56f691..215e891 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -21,7 +21,7 @@ Clone this repo and cd into the root directory of the repo. ## Pre-requisites -Python 3.8 and later versions are supported. +Python 3.9 and later versions are supported. Build the docker image: diff --git a/Dockerfile b/Dockerfile index 674345d..fb3b4c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=3.8 +ARG VERSION=3.9 FROM python:${VERSION}-bookworm COPY requirements.txt requirements-dev.txt /tmp/ diff --git a/README.md b/README.md index f902bf9..f27339e 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,13 @@ Sample python code that uses the datatrails python SDK to manage particular types of assets such as 'doors', 'cards', 'containers' etc. +Only supplied as examples of python code that accesses the datatrails archivist. + +No tests - released 'AS-IS' + # Installing the samples code -Python 3.8 and later versions are supported. +Python 3.9 and later versions are supported. Use the standard python pip utility: diff --git a/Taskfile.yml b/Taskfile.yml index 0543b43..ad97424 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -10,11 +10,6 @@ tasks: - test -s archivist_samples/about.py api: - desc: Build a docker environment with the right dependencies and utilities - cmds: - - docker build --no-cache --build-arg VERSION=3.8 -f Dockerfile -t datatrails-samples-api . - - api-3.9: desc: Build a docker environment with the right dependencies and utilities cmds: - docker build --no-cache --build-arg VERSION=3.9 -f Dockerfile -t datatrails-samples-api . @@ -34,6 +29,11 @@ tasks: cmds: - docker build --no-cache --build-arg VERSION=3.12 -f Dockerfile -t datatrails-samples-api . + api-3.13: + desc: Build a docker environment with the right dependencies and utilities + cmds: + - docker build --no-cache --build-arg VERSION=3.13 -f Dockerfile -t datatrails-samples-api . + check: desc: Check the style, bug and quality of the code deps: [about] diff --git a/archivist_samples/c2pa/README.md b/archivist_samples/c2pa/README.md index ae58599..502b3b5 100644 --- a/archivist_samples/c2pa/README.md +++ b/archivist_samples/c2pa/README.md @@ -6,7 +6,7 @@ Note: For clarity and simplicity this sample does not show how to create the C2P ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") @@ -47,4 +47,4 @@ see `run.py` for example. ## Public Access -By default the document created is private, and cannot be viewed publically. \ No newline at end of file +By default the document created is private, and cannot be viewed publically. diff --git a/archivist_samples/c2pa/c2pa.py b/archivist_samples/c2pa/c2pa.py index acb4ed1..1b0e10f 100644 --- a/archivist_samples/c2pa/c2pa.py +++ b/archivist_samples/c2pa/c2pa.py @@ -132,6 +132,7 @@ def create( # # authors is a list in the form {'display_name': 'Bob', 'email':'Bob@example.com'} # + # pylint: disable=too-many-positional-arguments # pylint: disable=too-many-arguments def publish( self, diff --git a/archivist_samples/document/README.md b/archivist_samples/document/README.md index 0735f83..cf52dc3 100644 --- a/archivist_samples/document/README.md +++ b/archivist_samples/document/README.md @@ -17,7 +17,7 @@ If the document contains sensitive information, it is also possible to just prov ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") @@ -58,4 +58,4 @@ see `run.py` for example. ## Public Access -By default the document created is private, and cannot be viewed publically. \ No newline at end of file +By default the document created is private, and cannot be viewed publically. diff --git a/archivist_samples/document/document.py b/archivist_samples/document/document.py index d6e4b4b..88712e1 100644 --- a/archivist_samples/document/document.py +++ b/archivist_samples/document/document.py @@ -1,6 +1,7 @@ # pylint:disable=missing-function-docstring # docstrings # pylint:disable=missing-module-docstring # docstrings # pylint:disable=missing-class-docstring # docstrings +# pylint:disable=too-many-positional-arguments try: # Python < 3.9 diff --git a/archivist_samples/door_entry/README.md b/archivist_samples/door_entry/README.md index ea4b535..01768b0 100644 --- a/archivist_samples/door_entry/README.md +++ b/archivist_samples/door_entry/README.md @@ -9,7 +9,7 @@ This sample simulates a set of smart connected door locks processing and reporti ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the DataTrails samples package. If you are just trying out the pre-made samples you should get the official [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") from PyPi. If you are modifying this sample and want to try out your changes then you'll need to rebuild the wheel: please refer to the developer instructions in the top level of this repository to see how to do that. diff --git a/archivist_samples/estate_info/README.md b/archivist_samples/estate_info/README.md index 4e70a26..16f7575 100644 --- a/archivist_samples/estate_info/README.md +++ b/archivist_samples/estate_info/README.md @@ -7,7 +7,7 @@ The `estate-info` sample very simply demonstrates how to read and enumerate Asse ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the DataTrails samples package. If you are just trying out the pre-made samples you should get the official [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") from PyPi. If you are modifying this sample and want to try out your changes then you'll need to rebuild the wheel: please refer to the developer instructions in the top level of this repository to see how to do that. diff --git a/archivist_samples/sbom_document/README.md b/archivist_samples/sbom_document/README.md index bb3f1fc..deb7a3a 100644 --- a/archivist_samples/sbom_document/README.md +++ b/archivist_samples/sbom_document/README.md @@ -11,7 +11,7 @@ This sample shows how to quickly get started with integrating your build and SBO ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") diff --git a/archivist_samples/signed_records/README.md b/archivist_samples/signed_records/README.md index 8ccea87..ed21bb9 100644 --- a/archivist_samples/signed_records/README.md +++ b/archivist_samples/signed_records/README.md @@ -10,7 +10,7 @@ The `signed-records` sample demonstrates how to integrate message-level signatur ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the DataTrails samples package. If you are just trying out the pre-made samples you should get the official [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") from PyPi. If you are modifying this sample and want to try out your changes then you'll need to rebuild the wheel: please refer to the developer instructions in the top level of this repository to see how to do that. diff --git a/archivist_samples/software_bill_of_materials/README.md b/archivist_samples/software_bill_of_materials/README.md index cfd3b0c..cde3be1 100644 --- a/archivist_samples/software_bill_of_materials/README.md +++ b/archivist_samples/software_bill_of_materials/README.md @@ -11,7 +11,7 @@ This sample shows how to quickly get started with integrating your build and SBO ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") diff --git a/archivist_samples/synsation/README.md b/archivist_samples/synsation/README.md index 6e9d552..b203bfd 100644 --- a/archivist_samples/synsation/README.md +++ b/archivist_samples/synsation/README.md @@ -12,7 +12,7 @@ The suite includes a number of entry points / samples that illustrate different ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the DataTrails samples package. If you are just trying out the pre-made samples you should get the official [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") from PyPi. If you are modifying this sample and want to try out your changes then you'll need to rebuild the wheel: please refer to the developer instructions in the top level of this repository to see how to do that. diff --git a/archivist_samples/synsation/synsation_industries.py b/archivist_samples/synsation/synsation_industries.py index 185fc1c..0159271 100755 --- a/archivist_samples/synsation/synsation_industries.py +++ b/archivist_samples/synsation/synsation_industries.py @@ -5,6 +5,7 @@ # This also demonstrates the capability to make locations and assets 1:1 # pylint: disable=missing-docstring +# pylint: disable=too-many-positional-arguments import logging import random diff --git a/archivist_samples/synsation/synsation_manufacturing.py b/archivist_samples/synsation/synsation_manufacturing.py index eff0282..ff42f8d 100755 --- a/archivist_samples/synsation/synsation_manufacturing.py +++ b/archivist_samples/synsation/synsation_manufacturing.py @@ -2,6 +2,7 @@ # pylint: disable=missing-docstring # pylint: disable=too-many-arguments +# pylint: disable=too-many-positional-arguments import string import random diff --git a/archivist_samples/synsation/synsation_smartcity.py b/archivist_samples/synsation/synsation_smartcity.py index 89db8ed..cfcfb0d 100755 --- a/archivist_samples/synsation/synsation_smartcity.py +++ b/archivist_samples/synsation/synsation_smartcity.py @@ -1,6 +1,7 @@ # Definitions and data for Synsation Smart City demo data # pylint: disable=missing-docstring +# pylint: disable=too-many-positional-arguments import logging diff --git a/archivist_samples/testing/assets.py b/archivist_samples/testing/assets.py index 62121e6..8ea4cf3 100755 --- a/archivist_samples/testing/assets.py +++ b/archivist_samples/testing/assets.py @@ -83,7 +83,6 @@ def assets_create( ) except ArchivistNotFoundError: - LOGGER.info("%s does not exist", display_name) asset_attrs["arc_display_name"] = display_name if location is not None: location = locations_create_if_not_exists( diff --git a/archivist_samples/wipp/README.md b/archivist_samples/wipp/README.md index f48c3c8..d518297 100644 --- a/archivist_samples/wipp/README.md +++ b/archivist_samples/wipp/README.md @@ -9,7 +9,7 @@ This sample uses publicly-available information about WIPP (Waste Isolation Pilo ## Pre-requisites -* Python 3.8 and later versions are supported. +* Python 3.9 and later versions are supported. * Install the [DataTrails samples Python package](https://pypi.org/project/datatrails-samples/ "PyPi package page") diff --git a/pyproject.toml b/pyproject.toml index 278db35..1e463fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,7 @@ persistent = true # Minimum Python version to use for version dependent checks. Will default to the # version used to run pylint. -py-version = "3.8" +py-version = "3.9" # Discover python modules and packages in the file system subtree. # recursive = diff --git a/requirements.txt b/requirements.txt index 80a739e..d6e978a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ cryptography~=41.0.2 -importlib-resources==3.0.0; python_version < '3.9' pyyaml~=6.0.1 # when testing a new version of the github datatrails-python repo copy the wheel @@ -7,4 +6,4 @@ pyyaml~=6.0.1 # the following lines. Also do similar in the Dockerfile. # That way one can test an unreleased version of github datatrails-samples. # NB dont forget to uncomment before merging !! -datatrails-archivist==0.32.0 +datatrails-archivist==0.34.1 diff --git a/setup.cfg b/setup.cfg index d395bcc..0c0cba3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,7 @@ classifiers = Intended Audience :: Developers License :: OSI Approved :: MIT License Operating System :: POSIX :: Linux - Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Topic :: Utilities project_urls = @@ -55,7 +55,7 @@ packages = include_package_data = True platforms = any -python_requires = >=3.8 +python_requires = >=3.9 setup_requires = setuptools-git-versioning [options.entry_points]