cbrkit 0.20.2__tar.gz → 0.20.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. {cbrkit-0.20.2/src/cbrkit.egg-info → cbrkit-0.20.4}/PKG-INFO +14 -30
  2. {cbrkit-0.20.2 → cbrkit-0.20.4}/README.md +13 -29
  3. {cbrkit-0.20.2 → cbrkit-0.20.4}/pyproject.toml +1 -1
  4. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/__init__.py +1 -1
  5. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/cli.py +6 -0
  6. {cbrkit-0.20.2 → cbrkit-0.20.4/src/cbrkit.egg-info}/PKG-INFO +14 -30
  7. {cbrkit-0.20.2 → cbrkit-0.20.4}/LICENSE +0 -0
  8. {cbrkit-0.20.2 → cbrkit-0.20.4}/setup.cfg +0 -0
  9. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/__main__.py +0 -0
  10. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/adapt/__init__.py +0 -0
  11. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/adapt/_attribute_value.py +0 -0
  12. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/adapt/generic.py +0 -0
  13. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/adapt/numbers.py +0 -0
  14. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/adapt/strings.py +0 -0
  15. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/api.py +0 -0
  16. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/eval/__init__.py +0 -0
  17. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/eval/_common.py +0 -0
  18. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/eval/_retrieval.py +0 -0
  19. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/helpers.py +0 -0
  20. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/loaders.py +0 -0
  21. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/py.typed +0 -0
  22. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/retrieval.py +0 -0
  23. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/reuse.py +0 -0
  24. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/__init__.py +0 -0
  25. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/_aggregator.py +0 -0
  26. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/_attribute_value.py +0 -0
  27. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/collections.py +0 -0
  28. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/generic.py +0 -0
  29. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/graphs/__init__.py +0 -0
  30. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/graphs/_astar.py +0 -0
  31. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/graphs/_isomorphism.py +0 -0
  32. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/graphs/_model.py +0 -0
  33. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/numbers.py +0 -0
  34. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/strings/__init__.py +0 -0
  35. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/sim/strings/taxonomy.py +0 -0
  36. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit/typing.py +0 -0
  37. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit.egg-info/SOURCES.txt +0 -0
  38. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit.egg-info/dependency_links.txt +0 -0
  39. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit.egg-info/entry_points.txt +0 -0
  40. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit.egg-info/requires.txt +0 -0
  41. {cbrkit-0.20.2 → cbrkit-0.20.4}/src/cbrkit.egg-info/top_level.txt +0 -0
  42. {cbrkit-0.20.2 → cbrkit-0.20.4}/tests/test_cycle.py +0 -0
  43. {cbrkit-0.20.2 → cbrkit-0.20.4}/tests/test_retrieve.py +0 -0
  44. {cbrkit-0.20.2 → cbrkit-0.20.4}/tests/test_reuse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cbrkit
3
- Version: 0.20.2
3
+ Version: 0.20.4
4
4
  Summary: Customizable Case-Based Reasoning (CBR) toolkit for Python with a built-in API and CLI
5
5
  Author-email: Mirko Lenz <mirko@mirkolenz.com>
6
6
  Project-URL: Repository, https://github.com/wi2trier/cbrkit
@@ -76,23 +76,22 @@ Requires-Dist: torch<3,>=2.5; sys_platform == "linux" and extra == "transformers
76
76
  Requires-Dist: transformers<5,>=4; extra == "transformers"
77
77
 
78
78
  <!-- markdownlint-disable MD033 MD041 -->
79
- <h2><p align="center">CBRkit</p></h2>
79
+ <h1><p align="center">CBRkit</p></h1>
80
+
80
81
  <p align="center">
81
82
  <img width="256px" alt="cbrkit logo" src="https://raw.githubusercontent.com/wi2trier/cbrkit/main/assets/logo.png" />
82
83
  </p>
84
+
83
85
  <p align="center">
84
86
  <a href="https://pypi.org/project/cbrkit/">PyPI</a> |
85
87
  <a href="https://wi2trier.github.io/cbrkit/">Docs</a> |
86
88
  <a href="https://github.com/wi2trier/cbrkit/tree/main/tests/test_retrieve.py">Example</a>
87
89
  </p>
90
+
88
91
  <p align="center">
89
92
  Customizable Case-Based Reasoning (CBR) toolkit for Python with a built-in API and CLI.
90
93
  </p>
91
- <!-- <p align="center">
92
- <a href="https://youtu.be/27dG4MagDhE">
93
- <img width="256px" alt="cbrkit presentation" src="https://img.youtube.com/vi/27dG4MagDhE/0.jpg" />
94
- </a>
95
- </p> -->
94
+
96
95
  <p align="center">
97
96
  <a href="https://youtu.be/27dG4MagDhE">CBRkit Presentation</a>
98
97
  <br/>
@@ -101,7 +100,7 @@ Requires-Dist: transformers<5,>=4; extra == "transformers"
101
100
 
102
101
  ---
103
102
 
104
- # CBRkit
103
+ <!-- PDOC_START -->
105
104
 
106
105
  CBRkit is a customizable and modular toolkit for Case-Based Reasoning (CBR) in Python.
107
106
  It provides a set of tools for loading cases and queries, defining similarity measures, and retrieving cases based on a query.
@@ -340,7 +339,7 @@ Coming soon...
340
339
 
341
340
  ## REST API and CLI
342
341
 
343
- In order to use the built-in API and CLI, you need to define a retriever in a Python module using the function `cbrkit.retrieval.build()`.
342
+ In order to use the built-in API and CLI, you need to define a retriever/reuser in a Python module using the function `cbrkit.retrieval.build()` and/or `cbrkit.reuse.build()`.
344
343
  For example, the file `./retriever_module.py` could contain the following code:
345
344
 
346
345
  ```python
@@ -356,35 +355,20 @@ Our custom retriever can then be specified for the API/CLI using standard Python
356
355
 
357
356
  ### CLI
358
357
 
359
- When installing with the `cli` extra, CBRkit provides a command line interface that can be started with the following command:
358
+ When installing with the `cli` extra, CBRkit provides a command line interface:
360
359
 
361
360
  ```shell
362
- cbrkit retrieve PATH_TO_CASEBASE PATH_TO_QUERY retriever_module:custom_retriever
361
+ cbrkit --help
363
362
  ```
364
363
 
365
- It will then print the retrieval results to the console, so you could pipe the output to a file or another command.
364
+ Please visit the [documentation](https://wi2trier.github.io/cbrkit/cbrkit/cli.html) for more information on how to use the CLI.
366
365
 
367
366
  ### API
368
367
 
369
- When installing with the `api` extra, CBRkit provides a REST API server that can be started with the following command:
368
+ When installing with the `api` extra, CBRkit provides a REST API server:
370
369
 
371
370
  ```shell
372
- cbrkit serve retriever_module:custom_retriever
373
- ```
374
-
375
- It offers a single endpoint `/retrieve` that accepts POST requests with a JSON body with the following structure:
376
-
377
- ```json
378
- {
379
- "casebase": {
380
- "case1": ...,
381
- "case2": ...
382
- },
383
- "queries": {
384
- "query1": ...,
385
- "query2": ...
386
- }
387
- }
371
+ cbrkit serve --help
388
372
  ```
389
373
 
390
- The server will return a JSON object containing the retrieval results for each query.
374
+ After starting the server, you can access the API documentation at `http://localhost:8000/docs`.
@@ -1,21 +1,20 @@
1
1
  <!-- markdownlint-disable MD033 MD041 -->
2
- <h2><p align="center">CBRkit</p></h2>
2
+ <h1><p align="center">CBRkit</p></h1>
3
+
3
4
  <p align="center">
4
5
  <img width="256px" alt="cbrkit logo" src="https://raw.githubusercontent.com/wi2trier/cbrkit/main/assets/logo.png" />
5
6
  </p>
7
+
6
8
  <p align="center">
7
9
  <a href="https://pypi.org/project/cbrkit/">PyPI</a> |
8
10
  <a href="https://wi2trier.github.io/cbrkit/">Docs</a> |
9
11
  <a href="https://github.com/wi2trier/cbrkit/tree/main/tests/test_retrieve.py">Example</a>
10
12
  </p>
13
+
11
14
  <p align="center">
12
15
  Customizable Case-Based Reasoning (CBR) toolkit for Python with a built-in API and CLI.
13
16
  </p>
14
- <!-- <p align="center">
15
- <a href="https://youtu.be/27dG4MagDhE">
16
- <img width="256px" alt="cbrkit presentation" src="https://img.youtube.com/vi/27dG4MagDhE/0.jpg" />
17
- </a>
18
- </p> -->
17
+
19
18
  <p align="center">
20
19
  <a href="https://youtu.be/27dG4MagDhE">CBRkit Presentation</a>
21
20
  <br/>
@@ -24,7 +23,7 @@
24
23
 
25
24
  ---
26
25
 
27
- # CBRkit
26
+ <!-- PDOC_START -->
28
27
 
29
28
  CBRkit is a customizable and modular toolkit for Case-Based Reasoning (CBR) in Python.
30
29
  It provides a set of tools for loading cases and queries, defining similarity measures, and retrieving cases based on a query.
@@ -263,7 +262,7 @@ Coming soon...
263
262
 
264
263
  ## REST API and CLI
265
264
 
266
- In order to use the built-in API and CLI, you need to define a retriever in a Python module using the function `cbrkit.retrieval.build()`.
265
+ In order to use the built-in API and CLI, you need to define a retriever/reuser in a Python module using the function `cbrkit.retrieval.build()` and/or `cbrkit.reuse.build()`.
267
266
  For example, the file `./retriever_module.py` could contain the following code:
268
267
 
269
268
  ```python
@@ -279,35 +278,20 @@ Our custom retriever can then be specified for the API/CLI using standard Python
279
278
 
280
279
  ### CLI
281
280
 
282
- When installing with the `cli` extra, CBRkit provides a command line interface that can be started with the following command:
281
+ When installing with the `cli` extra, CBRkit provides a command line interface:
283
282
 
284
283
  ```shell
285
- cbrkit retrieve PATH_TO_CASEBASE PATH_TO_QUERY retriever_module:custom_retriever
284
+ cbrkit --help
286
285
  ```
287
286
 
288
- It will then print the retrieval results to the console, so you could pipe the output to a file or another command.
287
+ Please visit the [documentation](https://wi2trier.github.io/cbrkit/cbrkit/cli.html) for more information on how to use the CLI.
289
288
 
290
289
  ### API
291
290
 
292
- When installing with the `api` extra, CBRkit provides a REST API server that can be started with the following command:
291
+ When installing with the `api` extra, CBRkit provides a REST API server:
293
292
 
294
293
  ```shell
295
- cbrkit serve retriever_module:custom_retriever
296
- ```
297
-
298
- It offers a single endpoint `/retrieve` that accepts POST requests with a JSON body with the following structure:
299
-
300
- ```json
301
- {
302
- "casebase": {
303
- "case1": ...,
304
- "case2": ...
305
- },
306
- "queries": {
307
- "query1": ...,
308
- "query2": ...
309
- }
310
- }
294
+ cbrkit serve --help
311
295
  ```
312
296
 
313
- The server will return a JSON object containing the retrieval results for each query.
297
+ After starting the server, you can access the API documentation at `http://localhost:8000/docs`.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cbrkit"
3
- version = "0.20.2"
3
+ version = "0.20.4"
4
4
  description = "Customizable Case-Based Reasoning (CBR) toolkit for Python with a built-in API and CLI"
5
5
  authors = [{ name = "Mirko Lenz", email = "mirko@mirkolenz.com" }]
6
6
  readme = "README.md"
@@ -2,7 +2,7 @@
2
2
  **[🌟 GitHub Project 🌟](https://github.com/wi2trier/cbrkit)**
3
3
 
4
4
  .. include:: ../../README.md
5
- :start-after: # CBRkit
5
+ :start-after: <!-- PDOC_START -->
6
6
 
7
7
  """
8
8
 
@@ -1,3 +1,7 @@
1
+ """
2
+ .. include:: ../../cli.md
3
+ """
4
+
1
5
  import json
2
6
  import os
3
7
  import sys
@@ -14,6 +18,8 @@ except ModuleNotFoundError:
14
18
 
15
19
  import cbrkit
16
20
 
21
+ __all__ = ["app"]
22
+
17
23
  app = typer.Typer()
18
24
 
19
25
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cbrkit
3
- Version: 0.20.2
3
+ Version: 0.20.4
4
4
  Summary: Customizable Case-Based Reasoning (CBR) toolkit for Python with a built-in API and CLI
5
5
  Author-email: Mirko Lenz <mirko@mirkolenz.com>
6
6
  Project-URL: Repository, https://github.com/wi2trier/cbrkit
@@ -76,23 +76,22 @@ Requires-Dist: torch<3,>=2.5; sys_platform == "linux" and extra == "transformers
76
76
  Requires-Dist: transformers<5,>=4; extra == "transformers"
77
77
 
78
78
  <!-- markdownlint-disable MD033 MD041 -->
79
- <h2><p align="center">CBRkit</p></h2>
79
+ <h1><p align="center">CBRkit</p></h1>
80
+
80
81
  <p align="center">
81
82
  <img width="256px" alt="cbrkit logo" src="https://raw.githubusercontent.com/wi2trier/cbrkit/main/assets/logo.png" />
82
83
  </p>
84
+
83
85
  <p align="center">
84
86
  <a href="https://pypi.org/project/cbrkit/">PyPI</a> |
85
87
  <a href="https://wi2trier.github.io/cbrkit/">Docs</a> |
86
88
  <a href="https://github.com/wi2trier/cbrkit/tree/main/tests/test_retrieve.py">Example</a>
87
89
  </p>
90
+
88
91
  <p align="center">
89
92
  Customizable Case-Based Reasoning (CBR) toolkit for Python with a built-in API and CLI.
90
93
  </p>
91
- <!-- <p align="center">
92
- <a href="https://youtu.be/27dG4MagDhE">
93
- <img width="256px" alt="cbrkit presentation" src="https://img.youtube.com/vi/27dG4MagDhE/0.jpg" />
94
- </a>
95
- </p> -->
94
+
96
95
  <p align="center">
97
96
  <a href="https://youtu.be/27dG4MagDhE">CBRkit Presentation</a>
98
97
  <br/>
@@ -101,7 +100,7 @@ Requires-Dist: transformers<5,>=4; extra == "transformers"
101
100
 
102
101
  ---
103
102
 
104
- # CBRkit
103
+ <!-- PDOC_START -->
105
104
 
106
105
  CBRkit is a customizable and modular toolkit for Case-Based Reasoning (CBR) in Python.
107
106
  It provides a set of tools for loading cases and queries, defining similarity measures, and retrieving cases based on a query.
@@ -340,7 +339,7 @@ Coming soon...
340
339
 
341
340
  ## REST API and CLI
342
341
 
343
- In order to use the built-in API and CLI, you need to define a retriever in a Python module using the function `cbrkit.retrieval.build()`.
342
+ In order to use the built-in API and CLI, you need to define a retriever/reuser in a Python module using the function `cbrkit.retrieval.build()` and/or `cbrkit.reuse.build()`.
344
343
  For example, the file `./retriever_module.py` could contain the following code:
345
344
 
346
345
  ```python
@@ -356,35 +355,20 @@ Our custom retriever can then be specified for the API/CLI using standard Python
356
355
 
357
356
  ### CLI
358
357
 
359
- When installing with the `cli` extra, CBRkit provides a command line interface that can be started with the following command:
358
+ When installing with the `cli` extra, CBRkit provides a command line interface:
360
359
 
361
360
  ```shell
362
- cbrkit retrieve PATH_TO_CASEBASE PATH_TO_QUERY retriever_module:custom_retriever
361
+ cbrkit --help
363
362
  ```
364
363
 
365
- It will then print the retrieval results to the console, so you could pipe the output to a file or another command.
364
+ Please visit the [documentation](https://wi2trier.github.io/cbrkit/cbrkit/cli.html) for more information on how to use the CLI.
366
365
 
367
366
  ### API
368
367
 
369
- When installing with the `api` extra, CBRkit provides a REST API server that can be started with the following command:
368
+ When installing with the `api` extra, CBRkit provides a REST API server:
370
369
 
371
370
  ```shell
372
- cbrkit serve retriever_module:custom_retriever
373
- ```
374
-
375
- It offers a single endpoint `/retrieve` that accepts POST requests with a JSON body with the following structure:
376
-
377
- ```json
378
- {
379
- "casebase": {
380
- "case1": ...,
381
- "case2": ...
382
- },
383
- "queries": {
384
- "query1": ...,
385
- "query2": ...
386
- }
387
- }
371
+ cbrkit serve --help
388
372
  ```
389
373
 
390
- The server will return a JSON object containing the retrieval results for each query.
374
+ After starting the server, you can access the API documentation at `http://localhost:8000/docs`.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes