Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VERSION=3.8
ARG VERSION=3.9
FROM python:${VERSION}-bookworm

COPY requirements.txt requirements-dev.txt /tmp/
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
10 changes: 5 additions & 5 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions archivist_samples/c2pa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -47,4 +47,4 @@ see `run.py` for example.

## Public Access

By default the document created is private, and cannot be viewed publically.
By default the document created is private, and cannot be viewed publically.
1 change: 1 addition & 0 deletions archivist_samples/c2pa/c2pa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions archivist_samples/document/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -58,4 +58,4 @@ see `run.py` for example.

## Public Access

By default the document created is private, and cannot be viewed publically.
By default the document created is private, and cannot be viewed publically.
1 change: 1 addition & 0 deletions archivist_samples/document/document.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/door_entry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/estate_info/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/sbom_document/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/signed_records/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/software_bill_of_materials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/synsation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions archivist_samples/synsation/synsation_industries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions archivist_samples/synsation/synsation_manufacturing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# pylint: disable=missing-docstring
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments

import string
import random
Expand Down
1 change: 1 addition & 0 deletions archivist_samples/synsation/synsation_smartcity.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion archivist_samples/testing/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion archivist_samples/wipp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
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
# (generated by 'task wheel') from that repo and comment
# 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
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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]
Expand Down