Skip to content

Commit fdc3241

Browse files
committed
Merge branch 'release-0.11.1' into support-0.11.x
2 parents 435d67e + 13674d4 commit fdc3241

File tree

6 files changed

+37
-16
lines changed

6 files changed

+37
-16
lines changed

.github/workflows/cicd.yml

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

1414
on:
1515
push:
16-
branches:
16+
branches:
1717
- main
1818
- develop
19+
- support-*
1920
pull_request:
20-
branches:
21+
branches:
2122
- main
2223
- develop
24+
- support-*
2325
release:
2426
types:
2527
- published
@@ -32,7 +34,7 @@ jobs:
3234
runs-on: ubuntu-latest
3335
strategy:
3436
matrix:
35-
python-version:
37+
python-version:
3638
- '3.8'
3739
- '3.11'
3840

@@ -54,7 +56,7 @@ jobs:
5456
run: make clean
5557
- name: Run tests
5658
run: make PYTHON3=python check
57-
59+
5860
# Build the binary wheel as well as the source tar
5961
- name: Build Objects
6062
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
@@ -11,6 +11,6 @@
1111
#
1212
# We would appreciate acknowledgement if the software is used.
1313

14-
__version__ = "0.11.0"
14+
__version__ = "0.11.1"
1515

1616
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
@@ -32,12 +32,28 @@
3232
_logger = logging.getLogger(pathlib.Path(__file__).name)
3333

3434

35+
def _is_relative_to(p1: pathlib.Path, p2: pathlib.Path) -> bool:
36+
"""
37+
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.
38+
"""
39+
if sys.version_info < (3, 9):
40+
try:
41+
_ = p1.relative_to(p2)
42+
return True
43+
except ValueError:
44+
return False
45+
else:
46+
return p1.is_relative_to(p2)
47+
48+
3549
def configure() -> None:
3650
"""
3751
This function is part of setting up demo_uuid() to generate non-random UUIDs. See demo_uuid() documentation for further setup notes.
3852
"""
3953
global DEMO_UUID_BASE
4054

55+
# _logger.debug("sys.argv = %r.", sys.argv)
56+
4157
if os.getenv("DEMO_UUID_REQUESTING_NONRANDOM") == "NONRANDOM_REQUESTED":
4258
warnings.warn(
4359
"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.",
@@ -87,18 +103,23 @@ def configure() -> None:
87103
demo_uuid_base_parts.append(sys.argv[0])
88104
else:
89105
command_original_path = pathlib.Path(sys.argv[0])
106+
# _logger.debug("command_original_path = %r.", command_original_path)
90107
command_resolved_path = command_original_path.resolve()
108+
# _logger.debug("command_resolved_path = %r.", command_resolved_path)
109+
110+
# The command could be a command embedded in a virtual
111+
# environment, or it could be a script external to any virtual
112+
# environment.
91113
venv_original_path = pathlib.Path(env_venv_name)
92114
venv_resolved_path = venv_original_path.resolve()
93-
try:
115+
if _is_relative_to(command_resolved_path, venv_resolved_path):
94116
command_relative_path = command_resolved_path.relative_to(
95117
venv_resolved_path
96118
)
97119
# _logger.debug("command_relative_path = %r.", command_relative_path)
98120
demo_uuid_base_parts.append(str(command_relative_path))
99-
except ValueError:
100-
# _logger.debug("Command path is not relative to virtual environment path.")
101-
demo_uuid_base_parts.append(str(command_resolved_path))
121+
else:
122+
demo_uuid_base_parts.append(str(command_original_path))
102123

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

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ license_files =
1919
[options]
2020
include_package_data = true
2121
install_requires =
22-
pandas
22+
pandas < 2.1.0
2323
pyshacl
2424
rdflib >= 6.2.0
2525
requests

tests/case_utils/case_validate/uco_test_examples/Makefile

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

1616
top_srcdir := $(shell cd ../../../.. ; pwd)
1717

18-
case_srcdir := $(top_srcdir)/dependencies/CASE
19-
20-
uco_srcdir := $(case_srcdir)/dependencies/UCO
18+
uco_srcdir := $(top_srcdir)/dependencies/CASE/dependencies/UCO
2119

2220
examples_srcdir := $(uco_srcdir)/tests/examples
2321

0 commit comments

Comments
 (0)