dtools.circular-array 3.13.0__tar.gz → 3.14.0__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.
@@ -8,6 +8,13 @@ PyPI grscheller.circular-array project.
8
8
 
9
9
  ## Releases and Important Milestones
10
10
 
11
+ ### Version 3.13.1 - PyPI release date 2025-05-10
12
+
13
+ - Made package just a single module
14
+ - dtools.circular_array.ca -> dtools.circular_array
15
+ - dtools/circular_array.ca.py -> dtools/circular_array.py
16
+ - docstring consolidations/updates
17
+
11
18
  ### Version 3.13.0 - PyPI release date 2025-05-06
12
19
 
13
20
  - version no longer determined dynamically
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dtools.circular-array
3
- Version: 3.13.0
4
- Summary: ### Developer Tools - Circular Array Data Structure
3
+ Version: 3.14.0
4
+ Summary: ### An indexable circular array data structure.
5
5
  Keywords: circular array,dequeue,pop,push,indexable,auto resizing
6
6
  Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
7
7
  Requires-Python: >=3.12
@@ -16,8 +16,8 @@ Classifier: Typing :: Typed
16
16
  License-File: LICENSE
17
17
  Requires-Dist: pytest >=8.3.5 ; extra == "test"
18
18
  Project-URL: Changelog, https://github.com/grscheller/dtools-circular-array/blob/main/CHANGELOG.md
19
- Project-URL: Documentation, https://grscheller.github.io/dtools-docs/circular-array
20
- Project-URL: Homepage, https://github.com/grscheller/dtools-docs
19
+ Project-URL: Documentation, https://grscheller.github.io/dtools-namespace-projects/circular-array
20
+ Project-URL: Homepage, https://github.com/grscheller/dtools-namespace-projects/blob/main/README.md
21
21
  Project-URL: Source, https://github.com/grscheller/dtools-circular-array
22
22
  Provides-Extra: test
23
23
 
@@ -32,8 +32,8 @@ structure,
32
32
  - **Detailed documentation**
33
33
  - [Detailed API documentation][3] on *GH-Pages*
34
34
 
35
- This project is part of the [Developer Tools for Python][4] **dtools.**
36
- namespace project.
35
+ This project is part of the [Developer Tools for Python][4] **dtools**
36
+ namespace projects.
37
37
 
38
38
  ## Overview
39
39
 
@@ -53,8 +53,11 @@ Useful either if used directly like a Python list, or in a "has-a"
53
53
  relationship when implementing other data structures.
54
54
 
55
55
  - *module* dtools.circular_array
56
- - *class* CA: circular array data structure
57
- - *function* ca: factory function to produce a CA from data
56
+ - *class* `CA:` circular array data structure
57
+ - initializer takes 1 or 0 iterators
58
+ - like `list` or `set`
59
+ - *function* `ca`: produces a `CA` from function's arguments
60
+ - similar use case as syntactic constructs `[]` or `{}`
58
61
 
59
62
  Above nomenclature modeled after builtin data types like `list`, where
60
63
  `CA` and `ca` correspond respectfully to `list` and `[]` in their use
@@ -63,7 +66,7 @@ cases.
63
66
  #### Usage
64
67
 
65
68
  ```python
66
- from dtools.circular_array.ca import CA, ca
69
+ from dtools.circular_array import CA, ca
67
70
 
68
71
  ca1 = ca(1, 2, 3)
69
72
  assert ca1.popl() == 1
@@ -81,8 +84,8 @@ cases.
81
84
  tup4 = ca2.poprt(4)
82
85
  assert tup3 == (1, 2, 3)
83
86
  assert tup4 == (10, 9, 8, 7)
84
- assert ca2 == CA(4, 5, 6)
85
- four, *rest = ca.popft(1000)
87
+ assert ca2 == ca(4, 5, 6)
88
+ four, *rest = ca2.poplt(1000)
86
89
  assert four == 4
87
90
  assert rest == [5, 6]
88
91
  assert len(ca2) == 0
@@ -96,10 +99,8 @@ cases.
96
99
  assert len(ca2) == 0
97
100
  ```
98
101
 
99
- ______________________________________________________________________
100
-
101
102
  [1]: https://pypi.org/project/dtools.circular-array
102
103
  [2]: https://github.com/grscheller/dtools-circular-array
103
- [3]: https://grscheller.github.io/dtools-docs/circular-array
104
- [4]: https://github.com/grscheller/dtools-docs
104
+ [3]: https://grscheller.github.io/dtools-namespace-projects/circular-array
105
+ [4]: https://github.com/grscheller/dtools-namespace-projects/blob/main/README.md
105
106
 
@@ -9,8 +9,8 @@ structure,
9
9
  - **Detailed documentation**
10
10
  - [Detailed API documentation][3] on *GH-Pages*
11
11
 
12
- This project is part of the [Developer Tools for Python][4] **dtools.**
13
- namespace project.
12
+ This project is part of the [Developer Tools for Python][4] **dtools**
13
+ namespace projects.
14
14
 
15
15
  ## Overview
16
16
 
@@ -30,8 +30,11 @@ Useful either if used directly like a Python list, or in a "has-a"
30
30
  relationship when implementing other data structures.
31
31
 
32
32
  - *module* dtools.circular_array
33
- - *class* CA: circular array data structure
34
- - *function* ca: factory function to produce a CA from data
33
+ - *class* `CA:` circular array data structure
34
+ - initializer takes 1 or 0 iterators
35
+ - like `list` or `set`
36
+ - *function* `ca`: produces a `CA` from function's arguments
37
+ - similar use case as syntactic constructs `[]` or `{}`
35
38
 
36
39
  Above nomenclature modeled after builtin data types like `list`, where
37
40
  `CA` and `ca` correspond respectfully to `list` and `[]` in their use
@@ -40,7 +43,7 @@ cases.
40
43
  #### Usage
41
44
 
42
45
  ```python
43
- from dtools.circular_array.ca import CA, ca
46
+ from dtools.circular_array import CA, ca
44
47
 
45
48
  ca1 = ca(1, 2, 3)
46
49
  assert ca1.popl() == 1
@@ -58,8 +61,8 @@ cases.
58
61
  tup4 = ca2.poprt(4)
59
62
  assert tup3 == (1, 2, 3)
60
63
  assert tup4 == (10, 9, 8, 7)
61
- assert ca2 == CA(4, 5, 6)
62
- four, *rest = ca.popft(1000)
64
+ assert ca2 == ca(4, 5, 6)
65
+ four, *rest = ca2.poplt(1000)
63
66
  assert four == 4
64
67
  assert rest == [5, 6]
65
68
  assert len(ca2) == 0
@@ -73,9 +76,7 @@ cases.
73
76
  assert len(ca2) == 0
74
77
  ```
75
78
 
76
- ______________________________________________________________________
77
-
78
79
  [1]: https://pypi.org/project/dtools.circular-array
79
80
  [2]: https://github.com/grscheller/dtools-circular-array
80
- [3]: https://grscheller.github.io/dtools-docs/circular-array
81
- [4]: https://github.com/grscheller/dtools-docs
81
+ [3]: https://grscheller.github.io/dtools-namespace-projects/circular-array
82
+ [4]: https://github.com/grscheller/dtools-namespace-projects/blob/main/README.md
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "dtools.circular-array"
7
- version = "3.13.0"
7
+ version = "3.14.0"
8
8
  authors = [{ name = "Geoffrey R. Scheller", email = "geoffrey@scheller.com" }]
9
9
  license = { file = "LICENSE" }
10
10
  readme = "README.md"
@@ -35,10 +35,10 @@ test = [
35
35
  ]
36
36
 
37
37
  [project.urls]
38
- Homepage = "https://github.com/grscheller/dtools-docs"
38
+ Homepage = "https://github.com/grscheller/dtools-namespace-projects/blob/main/README.md"
39
39
  Source = "https://github.com/grscheller/dtools-circular-array"
40
40
  Changelog = "https://github.com/grscheller/dtools-circular-array/blob/main/CHANGELOG.md"
41
- Documentation = "https://grscheller.github.io/dtools-docs/circular-array"
41
+ Documentation = "https://grscheller.github.io/dtools-namespace-projects/circular-array"
42
42
 
43
43
  [tool.flit.sdist]
44
44
  exclude = ["dist", "tests", ".gitignore", ".mypy_cache", ".pytest_cache"]
@@ -12,10 +12,19 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- """### An indexable circular array data structure."""
15
+ """### An indexable circular array data structure.
16
+
17
+ An indexable, sliceable, auto-resizing circular array
18
+ data structure with amortized O(1) pushes and pops either end.
19
+
20
+ """
16
21
 
17
22
  from __future__ import annotations
18
23
 
24
+ __author__ = 'Geoffrey R. Scheller'
25
+ __copyright__ = 'Copyright (c) 2023-2025 Geoffrey R. Scheller'
26
+ __license__ = 'Apache License 2.0'
27
+
19
28
  from collections.abc import Callable, Iterable, Iterator
20
29
  from typing import cast, Never, overload, TypeVar
21
30
 
@@ -27,7 +36,7 @@ D = TypeVar('D')
27
36
  class CA[D]:
28
37
  """Indexable circular array data structure
29
38
 
30
- - generic, stateful data structure
39
+ - generic, stateful, invariant data structure
31
40
  - amortized O(1) pushing and popping from either end
32
41
  - O(1) random access any element
33
42
  - will resize itself as needed
@@ -1,32 +0,0 @@
1
- # Copyright 2023-2025 Geoffrey R. Scheller
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- """### Developer Tools - Circular Array Data Structure
16
-
17
- Package for an indexable, sliceable, auto-resizing circular array
18
- data structure with amortized O(1) pushes and pops either end.
19
-
20
- Circular array data structure.
21
-
22
- - *module* dtools.circular_array.ca
23
- - *class* dtools.circular_array.ca.CA
24
- - initializer takes up to 1 iterable
25
- - *function* dtools.circular_array.ca.ca
26
- - constructs a `CA` from a variable number of arguments
27
-
28
- """
29
-
30
- __author__ = 'Geoffrey R. Scheller'
31
- __copyright__ = 'Copyright (c) 2023-2025 Geoffrey R. Scheller'
32
- __license__ = 'Apache License 2.0'