From 19ddfe3e23d69e6ce9fd769f5f0d29cda642d650 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Tue, 29 Aug 2023 15:31:03 -0400 Subject: [PATCH 1/9] Bump Actions This is in response to the Actions log interface on GitHub indicating some Actions were out of date. Signed-off-by: Alex Nelson --- .github/workflows/cicd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 34bbcf7..a2d9689 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -40,13 +40,13 @@ jobs: - '3.11' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: '11' - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Pre-commit Checks @@ -71,7 +71,7 @@ jobs: # Upload the packages on all develop and main pipleines for test consumption - name: Upload HTML Docs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: packages path: ./dist/ From 98593d05e7514d00a2f9c933dcd0f2730b72641d Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 26 Oct 2023 17:00:11 -0400 Subject: [PATCH 2/9] case_sparql_select: Update JSON index and orient parameter combinations A follow-on patch will regenerate Make-managed files. References: * https://github.com/pandas-dev/pandas/pull/52143 Signed-off-by: Alex Nelson --- .../test_data_frame_to_table_text_json.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py b/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py index 545666c..7533cc2 100644 --- a/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py +++ b/tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py @@ -55,10 +55,22 @@ def make_data_frame_to_json_table_text_parameters() -> ( "values", ]: # Handle incompatible parameter pairings for JSON mode. - if use_index is False: - if json_orient not in {"split", "table"}: + if use_index is True: + if json_orient not in { + "columns", + "index", + "split", + "table", + }: + continue + elif use_index is False: + if json_orient not in { + "records", + "split", + "table", + "values", + }: continue - yield (json_orient, output_mode, use_header, use_index) else: yield ("columns", output_mode, use_header, use_index) From 4fc448aeb607a6cd641d55cd72617f28a5cab029 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Thu, 26 Oct 2023 17:01:07 -0400 Subject: [PATCH 3/9] Regenerate Make-managed files Signed-off-by: Alex Nelson --- ...check-w3-output-with_header-without_index-orient-records.json | 1 + ....check-w3-output-with_header-without_index-orient-values.json | 1 + ...ck-w3-output-without_header-without_index-orient-records.json | 1 + ...eck-w3-output-without_header-without_index-orient-values.json | 1 + 4 files changed, 4 insertions(+) create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json create mode 100644 tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json new file mode 100644 index 0000000..f053616 --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-records.json @@ -0,0 +1 @@ +[{"?name":"Johnny Lee Outlaw","?mbox":"mailto:jlow@example.com"},{"?name":"Peter Goodguy","?mbox":"mailto:peter@example.org"}] diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json new file mode 100644 index 0000000..e49c3eb --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-with_header-without_index-orient-values.json @@ -0,0 +1 @@ +[["Johnny Lee Outlaw","mailto:jlow@example.com"],["Peter Goodguy","mailto:peter@example.org"]] diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json new file mode 100644 index 0000000..f053616 --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-records.json @@ -0,0 +1 @@ +[{"?name":"Johnny Lee Outlaw","?mbox":"mailto:jlow@example.com"},{"?name":"Peter Goodguy","?mbox":"mailto:peter@example.org"}] diff --git a/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json new file mode 100644 index 0000000..e49c3eb --- /dev/null +++ b/tests/case_utils/case_sparql_select/.check-w3-output-without_header-without_index-orient-values.json @@ -0,0 +1 @@ +[["Johnny Lee Outlaw","mailto:jlow@example.com"],["Peter Goodguy","mailto:peter@example.org"]] From 7e7398a69e5cde127d207b8ab83ced3236376588 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Fri, 27 Oct 2023 08:52:56 -0400 Subject: [PATCH 4/9] Expand Python testing to Python 3.12 Python 3.12 was released October 2nd. No effects were observed on Make-managed files. References: * https://peps.python.org/pep-0693/#release-schedule Signed-off-by: Alex Nelson --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a2d9689..61de436 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -37,7 +37,7 @@ jobs: matrix: python-version: - '3.9' - - '3.11' + - '3.12' steps: - uses: actions/checkout@v3 From ec96f5ff118058b6a4104f64f220701ecccb1189 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Wed, 8 Nov 2023 07:51:13 -0500 Subject: [PATCH 5/9] Bump pySHACL dependency to >= 0.24.0 No effects were observed on Make-managed files. References: * https://github.com/RDFLib/pySHACL/releases/tag/v0.24.0 Signed-off-by: Alex Nelson --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 826c63f..fefcc22 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,8 +20,8 @@ license_files = include_package_data = true install_requires = pandas - pyshacl - rdflib >= 6.2.0, < 7.0.0 + pyshacl >= 0.24.0 + rdflib requests tabulate packages = find: From e142f710f0c6573f63ee113b4fa70ff99e54502c Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 13 Nov 2023 08:51:05 -0500 Subject: [PATCH 6/9] Review pre-commit pinned versions as prerelease step This practice has been tested in other CASE Python projects using the CDO Git-flow branching pattern. References: * https://cyberdomainontology.org/ontology/development/#branching-cdo-git-flow * https://github.com/casework/CASE-Implementation-ExifTool/pull/44 * https://github.com/casework/CASE-Implementation-GNU-Time/pull/54 * https://github.com/casework/CASE-Implementation-PROV-O/pull/92 Signed-off-by: Alex Nelson --- .github/workflows/prerelease.yml | 42 ++++++++++++++++++++++++++++++++ Makefile | 15 ++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/prerelease.yml diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..a4dfe11 --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,42 @@ +# Portions of this file contributed by NIST are governed by the +# following statement: +# +# This software was developed at the National Institute of Standards +# and Technology by employees of the Federal Government in the course +# of their official duties. Pursuant to Title 17 Section 105 of the +# United States Code, this software is not subject to copyright +# protection within the United States. NIST assumes no responsibility +# whatsoever for its use by other parties, and makes no guarantees, +# expressed or implied, about its quality, reliability, or any other +# characteristic. +# +# We would appreciate acknowledgement if the software is used. + +# This workflow uses Make to review direct dependencies of this +# repository. + +name: Prerelease + +on: + pull_request: + branches: + - main + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.9' + - '3.12' + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Review dependencies + run: make check-supply-chain-pre-commit diff --git a/Makefile b/Makefile index 3d5560f..bebec08 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,8 @@ all: \ .venv-pre-commit/var/.pre-commit-built.log .PHONY: \ + check-supply-chain \ + check-supply-chain-pre-commit \ download .git_submodule_init.done.log: \ @@ -89,6 +91,19 @@ check: \ --directory tests \ check +# This target's dependencies potentially modify the working directory's Git state, so it is intentionally not a dependency of check. +check-supply-chain: \ + check-supply-chain-pre-commit + +# This target is scheduled to run as part of prerelease review. +check-supply-chain-pre-commit: \ + .venv-pre-commit/var/.pre-commit-built.log + source .venv-pre-commit/bin/activate \ + && pre-commit autoupdate + git diff \ + --exit-code \ + .pre-commit-config.yaml + clean: @$(MAKE) \ PYTHON3=$(PYTHON3) \ From d58cdbbf76b9a96584e7e54b3f87d45e83c1d2fe Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 13 Nov 2023 08:56:33 -0500 Subject: [PATCH 7/9] Set RDFLib ceiling to <8.0.0 References: * https://github.com/casework/CASE-Utilities-Python/issues/120 Signed-off-by: Alex Nelson --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index fefcc22..eaa7b47 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,7 +21,7 @@ include_package_data = true install_requires = pandas pyshacl >= 0.24.0 - rdflib + rdflib < 8 requests tabulate packages = find: From 040e8a093eb20a9ad9c4bb4aee2530ff9367a1b6 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 13 Nov 2023 10:00:00 -0500 Subject: [PATCH 8/9] Bump versions The `case_validate` version is bumped to acknowledge behavior changes from pySHACL 0.24.0. References: * https://github.com/RDFLib/pySHACL/issues/213 Signed-off-by: Alex Nelson --- case_utils/__init__.py | 2 +- case_utils/case_validate/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/case_utils/__init__.py b/case_utils/__init__.py index ee0b8df..1421b3e 100644 --- a/case_utils/__init__.py +++ b/case_utils/__init__.py @@ -14,6 +14,6 @@ # # We would appreciate acknowledgement if the software is used. -__version__ = "0.13.0" +__version__ = "0.14.0" from . import local_uuid # noqa: F401 diff --git a/case_utils/case_validate/__init__.py b/case_utils/case_validate/__init__.py index babea69..8e606ee 100644 --- a/case_utils/case_validate/__init__.py +++ b/case_utils/case_validate/__init__.py @@ -32,7 +32,7 @@ details.) """ -__version__ = "0.4.0" +__version__ = "0.5.0" import argparse import logging From 637e2f899116f225f69099cc872233e2166f3cfc Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 13 Nov 2023 10:02:54 -0500 Subject: [PATCH 9/9] Run pre-commit autoupdate No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57e17c2..56a9ae4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ repos: - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.11.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort