Skip to content

Commit 00864cd

Browse files
committed
Merge branch 'release-0.12.1' into support-0.12.x
2 parents 7e70f74 + 536e2cd commit 00864cd

File tree

6 files changed

+38
-17
lines changed

6 files changed

+38
-17
lines changed

.github/workflows/cicd.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ name: Continuous Integration
1616

1717
on:
1818
push:
19-
branches:
19+
branches:
2020
- main
2121
- develop
22+
- support-*
2223
pull_request:
23-
branches:
24+
branches:
2425
- main
2526
- develop
27+
- support-*
2628
release:
2729
types:
2830
- published
@@ -35,7 +37,7 @@ jobs:
3537
runs-on: ubuntu-latest
3638
strategy:
3739
matrix:
38-
python-version:
40+
python-version:
3941
- '3.8'
4042
- '3.11'
4143

@@ -57,7 +59,7 @@ jobs:
5759
run: make clean
5860
- name: Run tests
5961
run: make PYTHON3=python check
60-
62+
6163
# Build the binary wheel as well as the source tar
6264
- name: Build Objects
6365
run: |

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.1.0
3+
rev: 23.12.0
44
hooks:
55
- id: black
66
- repo: https://github.com/pycqa/flake8
7-
rev: 6.0.0
7+
rev: 6.1.0
88
hooks:
99
- id: flake8
1010
- repo: https://github.com/pycqa/isort
11-
rev: 5.12.0
11+
rev: 5.13.2
1212
hooks:
1313
- id: isort
1414
name: isort (python)

case_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
#
1515
# We would appreciate acknowledgement if the software is used.
1616

17-
__version__ = "0.12.0"
17+
__version__ = "0.12.1"
1818

1919
from . import local_uuid # noqa: F401

case_utils/local_uuid.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,28 @@
3939
_logger = logging.getLogger(pathlib.Path(__file__).name)
4040

4141

42+
def _is_relative_to(p1: pathlib.Path, p2: pathlib.Path) -> bool:
43+
"""
44+
This function provides pathlib.is_relative_to to Pythons before 3.9. After the End of Life of Python 3.8, this function can be removed.
45+
"""
46+
if sys.version_info < (3, 9):
47+
try:
48+
_ = p1.relative_to(p2)
49+
return True
50+
except ValueError:
51+
return False
52+
else:
53+
return p1.is_relative_to(p2)
54+
55+
4256
def configure() -> None:
4357
"""
4458
This function is part of setting up _demo_uuid() to generate non-random UUIDs. See _demo_uuid() documentation for further setup notes.
4559
"""
4660
global DEMO_UUID_BASE
4761

62+
# _logger.debug("sys.argv = %r.", sys.argv)
63+
4864
if os.getenv("DEMO_UUID_REQUESTING_NONRANDOM") == "NONRANDOM_REQUESTED":
4965
warnings.warn(
5066
"Environment variable DEMO_UUID_REQUESTING_NONRANDOM is deprecated. See case_utils.local_uuid._demo_uuid for usage notes on its replacement, CASE_DEMO_NONRANDOM_UUID_BASE. Proceeding with random UUIDs.",
@@ -94,18 +110,23 @@ def configure() -> None:
94110
demo_uuid_base_parts.append(sys.argv[0])
95111
else:
96112
command_original_path = pathlib.Path(sys.argv[0])
113+
# _logger.debug("command_original_path = %r.", command_original_path)
97114
command_resolved_path = command_original_path.resolve()
115+
# _logger.debug("command_resolved_path = %r.", command_resolved_path)
116+
117+
# The command could be a command embedded in a virtual
118+
# environment, or it could be a script external to any virtual
119+
# environment.
98120
venv_original_path = pathlib.Path(env_venv_name)
99121
venv_resolved_path = venv_original_path.resolve()
100-
try:
122+
if _is_relative_to(command_resolved_path, venv_resolved_path):
101123
command_relative_path = command_resolved_path.relative_to(
102124
venv_resolved_path
103125
)
104126
# _logger.debug("command_relative_path = %r.", command_relative_path)
105127
demo_uuid_base_parts.append(str(command_relative_path))
106-
except ValueError:
107-
# _logger.debug("Command path is not relative to virtual environment path.")
108-
demo_uuid_base_parts.append(str(command_resolved_path))
128+
else:
129+
demo_uuid_base_parts.append(str(command_original_path))
109130

110131
if len(sys.argv) > 1:
111132
# Component: Arguments of argument vector.

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ license_files =
1919
[options]
2020
include_package_data = true
2121
install_requires =
22-
pandas
22+
pandas < 2.1.0
2323
pyshacl
24-
rdflib >= 6.2.0, < 7.0.0
24+
rdflib >= 6.2.0
2525
requests
2626
tabulate
2727
packages = find:

tests/case_utils/case_validate/uco_test_examples/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ SHELL := /bin/bash
1818

1919
top_srcdir := $(shell cd ../../../.. ; pwd)
2020

21-
case_srcdir := $(top_srcdir)/dependencies/CASE
22-
23-
uco_srcdir := $(case_srcdir)/dependencies/UCO
21+
uco_srcdir := $(top_srcdir)/dependencies/CASE/dependencies/UCO
2422

2523
examples_srcdir := $(uco_srcdir)/tests/examples
2624

0 commit comments

Comments
 (0)