Skip to content

Commit 4433266

Browse files
authored
Update for releasing 1.1.0 (#140)
* Update for releasing 1.1.0
1 parent 4079411 commit 4433266

File tree

9 files changed

+62
-16
lines changed

9 files changed

+62
-16
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ repos:
2121
- id: flake8
2222

2323
- repo: https://github.com/psf/black
24-
rev: 24.4.0
24+
rev: 24.4.2
2525
hooks:
2626
- id: black
2727

2828
- repo: https://github.com/pre-commit/mirrors-mypy
29-
rev: v1.9.0
29+
rev: v1.10.0
3030
hooks:
3131
- id: mypy
3232

docs/api_reference.rst

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
..
2-
Copyright (c) 2022, 2023, Oracle and/or its affiliates.
2+
Copyright (c) 2022, 2024, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at
44
https://oss.oracle.com/licenses/upl.
55
@@ -11,6 +11,16 @@ Aggregators
1111
.. autoclass:: coherence.Aggregators
1212
:members:
1313

14+
Comparator
15+
----------
16+
.. autoclass:: coherence.Comparator
17+
:members:
18+
19+
Extractors
20+
----------
21+
.. autoclass:: coherence.Extractors
22+
:members:
23+
1424
Filters
1525
-------
1626
.. autoclass:: coherence.Filters
@@ -83,8 +93,9 @@ Modules
8393
:maxdepth: 3
8494
:titlesonly:
8595

86-
api_reference/processor.rst
87-
api_reference/filter.rst
96+
api_reference/aggregator.rst
97+
api_reference/comparator.rst
8898
api_reference/event.rst
8999
api_reference/extractor.rst
90-
api_reference/aggregator.rst
100+
api_reference/filter.rst
101+
api_reference/processor.rst

docs/api_reference/comparator.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
..
2+
Copyright (c) 2024, Oracle and/or its affiliates.
3+
Licensed under the Universal Permissive License v 1.0 as shown at
4+
https://oss.oracle.com/licenses/upl.
5+
6+
====================
7+
coherence.comparator
8+
====================
9+
.. toctree::
10+
:maxdepth: 4
11+
12+
ExtractorComparator
13+
-------------------
14+
.. autoclass:: coherence.comparator.ExtractorComparator
15+
:show-inheritance:
16+
17+
InverseComparator
18+
-----------------
19+
.. autoclass:: coherence.comparator.InverseComparator
20+
:show-inheritance:
21+
22+
SafeComparator
23+
--------------
24+
.. autoclass:: coherence.comparator.SafeComparator
25+
:show-inheritance:

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ----------------------------------------------------------------------------------------------------------------------
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at
44
# https://oss.oracle.com/licenses/upl.
55
#
@@ -23,7 +23,7 @@
2323
sys.path.insert(0, os.path.abspath("../src"))
2424

2525
# The full version, including alpha/beta/rc tags
26-
release = "1.0.3"
26+
release = "1.1.0"
2727

2828
# -- Project information -----------------------------------------------------
2929

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://oss.oracle.com/licenses/upl.
44
[tool.poetry]
55
name = "coherence-client"
6-
version = "1.0.3"
6+
version = "1.1.0"
77
description = """The Coherence Python Client allows Python applications to act as cache clients to a \
88
Coherence Cluster using Google's gRPC framework as the network transport."""
99
packages = [

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2024, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at
33
# https://oss.oracle.com/licenses/upl.
44

55
from distutils.core import setup
66

77
setup(
88
name="coherence-client",
9-
version="1.0.3",
9+
version="1.1.0",
1010
packages=["coherence"],
1111
url="https://github.com/oracle/coherence-py-client",
1212
license="UPL",

src/coherence/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2024, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at
33
# https://oss.oracle.com/licenses/upl.
44

@@ -16,6 +16,7 @@
1616
from .client import Options as Options
1717
from .client import Session as Session
1818
from .client import TlsOptions as TlsOptions
19+
from .comparator import Comparator as Comparator
1920
from .extractor import Extractors as Extractors
2021
from .filter import Filters as Filters
2122
from .processor import Processors as Processors

src/coherence/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,12 @@ def add_index(
465465
"""
466466
Add an index to this map.
467467
468-
:param extractor: The :class: `coherence.extractor.ValueExtractor` object that is used to extract
468+
:param extractor: The :class:`coherence.extractor.ValueExtractor` object that is used to extract
469469
an indexable Object from a value stored in the
470470
indexed Map. Must not be 'None'.
471471
:param ordered: true if the contents of the indexed information
472472
should be ordered false otherwise.
473-
:param comparator: The :class: `coherence.comparator.Comparator` object which imposes an ordering
473+
:param comparator: The :class:`coherence.comparator.Comparator` object which imposes an ordering
474474
on entries in the indexed map or None if the
475475
entries' values natural ordering should be used.
476476
"""
@@ -480,7 +480,7 @@ def remove_index(self, extractor: ValueExtractor[T, E]) -> None:
480480
"""
481481
Removes an index on this `NamedMap`.
482482
483-
:param extractor: The :class: `coherence.extractor.ValueExtractor` object that is used to extract
483+
:param extractor: The :class:`coherence.extractor.ValueExtractor` object that is used to extract
484484
an indexable Object from a value stored in the
485485
indexed Map. Must not be 'None'.
486486

src/coherence/comparator.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2024, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at
33
# https://oss.oracle.com/licenses/upl.
44

@@ -12,26 +12,35 @@
1212

1313

1414
class Comparator(ABC):
15+
"""Comparator is used to control the ordering for collections of objects"""
16+
1517
def __init__(self) -> None:
1618
super().__init__()
1719

1820

1921
@proxy("comparator.SafeComparator")
2022
class SafeComparator(Comparator):
23+
"""None-safe delegating comparator. None values are evaluated as "less then" any non None value."""
24+
2125
def __init__(self, property_name: str) -> None:
2226
super().__init__()
2327
self.comparator = ExtractorComparator(property_name)
2428

2529

2630
@proxy("comparator.InverseComparator")
2731
class InverseComparator(Comparator):
32+
"""Comparator that reverses the result of another comparator."""
33+
2834
def __init__(self, property_name: str) -> None:
2935
super().__init__()
3036
self.comparator = ExtractorComparator(property_name)
3137

3238

3339
@proxy("comparator.ExtractorComparator")
3440
class ExtractorComparator(Comparator):
41+
"""Comparator implementation that uses specified :class:`coherence.extractor.ValueExtractor` to
42+
extract value(s) to be used for comparison."""
43+
3544
def __init__(self, property_name: str) -> None:
3645
super().__init__()
3746
self.extractor = UniversalExtractor[Any](property_name)

0 commit comments

Comments
 (0)