pythonic-fp.queues 5.1.2__tar.gz → 5.2.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.
Files changed (33) hide show
  1. pythonic_fp_queues-5.2.0/PKG-INFO +51 -0
  2. pythonic_fp_queues-5.2.0/README.md +25 -0
  3. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/pyproject.toml +34 -24
  4. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/src/pythonic_fp/queues/de.py +52 -12
  5. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/src/pythonic_fp/queues/fifo.py +51 -11
  6. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/src/pythonic_fp/queues/lifo.py +55 -12
  7. pythonic_fp_queues-5.1.2/.github/workflows/static.yml +0 -64
  8. pythonic_fp_queues-5.1.2/.gitignore +0 -9
  9. pythonic_fp_queues-5.1.2/CHANGELOG.rst +0 -562
  10. pythonic_fp_queues-5.1.2/PKG-INFO +0 -64
  11. pythonic_fp_queues-5.1.2/README.rst +0 -38
  12. pythonic_fp_queues-5.1.2/docs/Makefile +0 -79
  13. pythonic_fp_queues-5.1.2/docs/gen_conf.py +0 -109
  14. pythonic_fp_queues-5.1.2/docs/requirements.txt +0 -2
  15. pythonic_fp_queues-5.1.2/docs/source/_static/.gitkeep +0 -0
  16. pythonic_fp_queues-5.1.2/docs/source/_templates/.gitkeep +0 -0
  17. pythonic_fp_queues-5.1.2/docs/source/changelog.rst +0 -7
  18. pythonic_fp_queues-5.1.2/docs/source/description.rst +0 -7
  19. pythonic_fp_queues-5.1.2/docs/source/docs/de.rst +0 -6
  20. pythonic_fp_queues-5.1.2/docs/source/docs/fifo.rst +0 -6
  21. pythonic_fp_queues-5.1.2/docs/source/docs/index.rst +0 -23
  22. pythonic_fp_queues-5.1.2/docs/source/docs/lifo.rst +0 -6
  23. pythonic_fp_queues-5.1.2/docs/source/index.rst +0 -30
  24. pythonic_fp_queues-5.1.2/docs/source/releases.rst +0 -16
  25. pythonic_fp_queues-5.1.2/docs/source/usage.rst +0 -22
  26. pythonic_fp_queues-5.1.2/src/pythonic_fp/queues/__init__.pyi +0 -0
  27. pythonic_fp_queues-5.1.2/src/pythonic_fp/queues/de.pyi +0 -31
  28. pythonic_fp_queues-5.1.2/src/pythonic_fp/queues/fifo.pyi +0 -24
  29. pythonic_fp_queues-5.1.2/src/pythonic_fp/queues/lifo.pyi +0 -23
  30. pythonic_fp_queues-5.1.2/tests/test_queues.py +0 -558
  31. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/LICENSE +0 -0
  32. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/src/pythonic_fp/queues/__init__.py +0 -0
  33. {pythonic_fp_queues-5.1.2 → pythonic_fp_queues-5.2.0}/src/pythonic_fp/queues/py.typed +0 -0
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: pythonic-fp-queues
3
+ Version: 5.2.0
4
+ Summary: Queues geared to different use cases.
5
+ Keywords: queue,fifo,lifo,dqueue
6
+ Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
7
+ Requires-Python: >=3.14
8
+ Description-Content-Type: text/markdown
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Framework :: Pytest
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
16
+ Classifier: Typing :: Typed
17
+ License-File: LICENSE
18
+ Requires-Dist: pythonic-fp-circulararray>=6.2.2,<6.4
19
+ Requires-Dist: pythonic-fp-fptools>=6.1,<6.2
20
+ Requires-Dist: pythonic-fp-gadgets>=4.5,<6
21
+ Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-queues/blob/main/CHANGELOG.md
22
+ Project-URL: Documentation, https://grscheller.github.io/pythonic-fp-queues/release/html/
23
+ Project-URL: Homepage, https://grscheller.github.io/pythonic-fp/
24
+ Project-URL: Source, https://github.com/grscheller/pythonic-fp-queues
25
+
26
+ # Pythonic FP - Queues
27
+
28
+ Queue-like datastructures.
29
+
30
+ PyPI project
31
+ [pythonic-fp-queues](https://pypi.org/project/pythonic-fp-queues).
32
+ Part of the
33
+ [pythonic-fp](https://grscheller.github.io/pythonic-fp/)
34
+ PyPI projects.
35
+
36
+ ## Documentation
37
+
38
+ Documentation and other links for this project are hosted on
39
+ [GitHub Pages](https://grscheller.github.io/pythonic-fp/projects/queues.html).
40
+
41
+ | module | class | name |
42
+ |:------ |:-----:|:---- |
43
+ | pythonic_fp.queues.fifo | FIFOQueue | First-In-First-Out Queue |
44
+ | pythonic_fp.queues.lifo | LIFOQueue | Last-In-First-Out Queue |
45
+ | pythonic_fp.queues.de | DEQueue | Double-Ended Queue |
46
+
47
+ ## Copyright and License
48
+
49
+ Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
50
+ License, Version 2.0. See the LICENSE file for details.
51
+
@@ -0,0 +1,25 @@
1
+ # Pythonic FP - Queues
2
+
3
+ Queue-like datastructures.
4
+
5
+ PyPI project
6
+ [pythonic-fp-queues](https://pypi.org/project/pythonic-fp-queues).
7
+ Part of the
8
+ [pythonic-fp](https://grscheller.github.io/pythonic-fp/)
9
+ PyPI projects.
10
+
11
+ ## Documentation
12
+
13
+ Documentation and other links for this project are hosted on
14
+ [GitHub Pages](https://grscheller.github.io/pythonic-fp/projects/queues.html).
15
+
16
+ | module | class | name |
17
+ |:------ |:-----:|:---- |
18
+ | pythonic_fp.queues.fifo | FIFOQueue | First-In-First-Out Queue |
19
+ | pythonic_fp.queues.lifo | LIFOQueue | Last-In-First-Out Queue |
20
+ | pythonic_fp.queues.de | DEQueue | Double-Ended Queue |
21
+
22
+ ## Copyright and License
23
+
24
+ Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
25
+ License, Version 2.0. See the LICENSE file for details.
@@ -4,9 +4,10 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "pythonic-fp-queues"
7
- version = "5.1.2"
8
- readme = "README.rst"
9
- requires-python = ">=3.13"
7
+ version = "5.2.0"
8
+ description = "Queues geared to different use cases."
9
+ readme = "README.md"
10
+ requires-python = ">=3.14" # floor: PEP 649/749 deferred annotations — class-level self-reference possible NameErrors on <3.14
10
11
  authors = [
11
12
  { name = "Geoffrey R. Scheller", email = "geoffrey@scheller.com" },
12
13
  ]
@@ -23,21 +24,26 @@ classifiers = [
23
24
  "License :: OSI Approved :: Apache Software License",
24
25
  "Operating System :: OS Independent",
25
26
  "Programming Language :: Python :: 3.14",
27
+ "Programming Language :: Python :: 3.15",
26
28
  "Typing :: Typed",
27
29
  ]
28
30
  dependencies = [
29
- "pythonic-fp-circulararray>=6.0.4",
30
- "pythonic-fp-fptools>=5.2.0",
31
+ "pythonic-fp-circulararray>=6.2.2,<6.4",
32
+ "pythonic-fp-fptools>=6.1,<6.2",
33
+ "pythonic-fp-gadgets>=4.5,<6",
31
34
  ]
32
- dynamic = ["description"]
33
35
 
34
36
  [project.urls]
35
- Changelog = "https://github.com/grscheller/pythonic-fp-queues/blob/main/CHANGELOG.rst"
36
- Documentation = "https://grscheller.github.io/pythonic-fp/projects/queues.html"
37
+ Changelog = "https://github.com/grscheller/pythonic-fp-queues/blob/main/CHANGELOG.md"
38
+ Documentation ="https://grscheller.github.io/pythonic-fp-queues/release/html/"
37
39
  Homepage = "https://grscheller.github.io/pythonic-fp/"
38
40
  Source = "https://github.com/grscheller/pythonic-fp-queues"
39
41
 
40
- [project.optional-dependencies]
42
+ [dependency-groups]
43
+ docs = [
44
+ "furo>=2025.12.19",
45
+ "sphinx>=9.1",
46
+ ]
41
47
  test = [
42
48
  "pytest>=8.4.1",
43
49
  ]
@@ -45,6 +51,22 @@ test = [
45
51
  [tool.flit.module]
46
52
  name = "pythonic_fp.queues"
47
53
 
54
+ [tool.flit.sdist]
55
+ exclude = [
56
+ "docs/",
57
+ "tests/",
58
+ "**/.mypy_cache/",
59
+ "**/.ruff_cache/",
60
+ "**/.pytest_cache/",
61
+ "**/__pycache__/",
62
+ "**/.dmypy.json",
63
+ ]
64
+
65
+ [tool.pytest]
66
+ addopts = ["-ra"]
67
+ consider_namespace_packages = true
68
+ testpaths = ["tests/"]
69
+
48
70
  [tool.mypy]
49
71
  explicit_package_bases = true
50
72
  local_partial_types = true
@@ -53,23 +75,12 @@ warn_redundant_casts = true
53
75
  warn_return_any = true
54
76
  warn_unused_configs = true
55
77
 
56
- [tool.pylsp-mypy]
57
- enabled = true
58
- live-mode = true
59
- dmypy = false
60
- strict = true
61
- report_progress = true
62
-
63
- [tool.pytest]
64
- addopts = [
65
- "-ra",
66
- ]
67
- consider_namespace_packages = true
68
- testpaths = ["tests/"]
69
-
70
78
  [tool.ruff]
71
79
  target-version = "py314"
72
80
 
81
+ [tool.ruff.lint]
82
+ ignore = ["RUF022", "E741"]
83
+
73
84
  [tool.ruff.lint.flake8-quotes]
74
85
  docstring-quotes = "double"
75
86
 
@@ -78,7 +89,6 @@ docstring-quotes = "double"
78
89
  "E731",
79
90
  "C901",
80
91
  ]
81
- "**/*.py" = ["E741"]
82
92
 
83
93
  [tool.ruff.format]
84
94
  quote-style = "single"
@@ -38,18 +38,22 @@ class DEQueue[D]:
38
38
 
39
39
  __slots__ = ('_ca',)
40
40
 
41
- def __init__(self, *dss: Iterable[D]) -> None:
41
+ def __init__(self, *ds: Iterable[D]) -> None:
42
42
  """
43
- :param dss: Takes 0 or 1 iterable parameters. Populates
44
- queue from the iterable left to right.
43
+ .. admonition:: Initializer
44
+
45
+ Initialize ``DEQueue`` with 0 or 1 iterables to populate
46
+ the queue left (front) to right (rear).
47
+
48
+ :param ds: Takes 0 or 1 iterable parameters.
49
+ :raises ValueError: When more than one parameter is provided.
45
50
  :raises TypeError: When passed a non-iterable parameter.
46
- :raises ValueError: When more than one parameter is given.
47
51
 
48
52
  """
49
- if (size := len(dss)) > 1:
53
+ if (size := len(ds)) > 1:
50
54
  msg = f'DEQueue expects at most 1 argument, got {size}'
51
55
  raise ValueError(msg)
52
- self._ca = CA(dss[0]) if size == 1 else CA()
56
+ self._ca = CA(ds[0]) if size == 1 else CA()
53
57
 
54
58
  def __bool__(self) -> bool:
55
59
  """
@@ -61,9 +65,25 @@ class DEQueue[D]:
61
65
  return len(self._ca) > 0
62
66
 
63
67
  def __len__(self) -> int:
68
+ """
69
+ .. admonition:: Get length
70
+
71
+ Return the number of data elements in the ``DEQueue``.
72
+
73
+ """
64
74
  return len(self._ca)
65
75
 
66
76
  def __eq__(self, other: object) -> bool:
77
+ """
78
+ .. admonition:: Equality comparison
79
+
80
+ If ``other`` is a ``DEQueue`` and the corresponding
81
+ elements of ``self`` and ``other`` compare as equal,
82
+ then return ``True``. Otherwise return ``False``.
83
+
84
+ :returns: ``self == other``
85
+
86
+ """
67
87
  if not isinstance(other, DEQueue):
68
88
  return False
69
89
  return self._ca == other._ca
@@ -91,20 +111,40 @@ class DEQueue[D]:
91
111
  return reversed(list(self._ca))
92
112
 
93
113
  def __repr__(self) -> str:
114
+ """
115
+ .. admonition:: String representation
116
+
117
+ Construct string 'DEQueue(d₁, d₂, … dₙ)' where
118
+
119
+ - d₁, d₂, … dₙ are the contents displayed with ``repr()``
120
+
121
+ :returns: A string to reproduce the ``DEQueue``.
122
+
123
+ """
94
124
  if len(self) == 0:
95
125
  return 'DEQueue()'
96
126
  return 'DEQueue(' + ', '.join(map(repr, self._ca)) + ')'
97
127
 
98
128
  def __str__(self) -> str:
129
+ r"""
130
+ .. admonition:: User string
131
+
132
+ Construct string '>< d₁ | d₂ | … | dₙ ><' where
133
+
134
+ - d₁, d₂, ..., dₙ are the contents displayed with ``str()``
135
+
136
+ :returns: A string meaningful to an end user.
137
+
138
+ """
99
139
  return '>< ' + ' | '.join(map(str, self)) + ' ><'
100
140
 
101
141
  def copy(self) -> 'DEQueue[D]':
102
142
  """
103
- .. admonition:: Shallow copy
143
+ .. admonition:: Copy
104
144
 
105
- Make a shallow copy of the queue.
145
+ Shallow copy the ``DEQueue``.
106
146
 
107
- :returns: Shallow copy of the ``DEQueue``.
147
+ :returns: New ``DEQueue`` instance containing the same references.
108
148
 
109
149
  """
110
150
  return DEQueue(self._ca)
@@ -200,7 +240,7 @@ class DEQueue[D]:
200
240
 
201
241
  :param f: Reducing function, first argument is for accumulator.
202
242
  :param start: Optional starting value.
203
- :returns: ``MayBe`` of reduced value with f, empty ``MayBe`` if
243
+ :returns: ``MayBe`` of reduced value with ``f``, empty ``MayBe`` if
204
244
  queue empty and no starting value given.
205
245
 
206
246
  """
@@ -223,8 +263,8 @@ class DEQueue[D]:
223
263
 
224
264
  :param f: Reducing function, second argument is for accumulator.
225
265
  :param start: Optional starting value.
226
- :returns: ``MayBe`` of reduced value with f, empty ``MayBe`` if
227
- queue empty and no starting value given.
266
+ :returns: ``MayBe`` of reduced value with ``f``, empty ``MayBe``
267
+ if queue empty and no starting value given.
228
268
 
229
269
  """
230
270
  if start is None:
@@ -37,18 +37,22 @@ class FIFOQueue[D]:
37
37
 
38
38
  __slots__ = ('_ca',)
39
39
 
40
- def __init__(self, *dss: Iterable[D]) -> None:
40
+ def __init__(self, *ds: Iterable[D]) -> None:
41
41
  """
42
- :param dss: Takes 0 or 1 iterable parameters. Populates
43
- queue from the iterable in FIFO order.
42
+ .. admonition:: Initializer
43
+
44
+ Initialize ``FIFOQueue`` with 0 or 1 iterables to populate
45
+ the queue in natural FIFO order.
46
+
47
+ :param ds: Takes 0 or 1 iterable parameters.
48
+ :raises ValueError: When more than one parameter is provided.
44
49
  :raises TypeError: When passed a non-iterable parameter.
45
- :raises ValueError: When more than one parameter is given.
46
50
 
47
51
  """
48
- if (size := len(dss)) > 1:
52
+ if (size := len(ds)) > 1:
49
53
  msg = f'FIFOQueue expects at most 1 iterable argument, got {size}'
50
54
  raise ValueError(msg)
51
- self._ca = CA(dss[0]) if size == 1 else CA()
55
+ self._ca = CA(ds[0]) if size == 1 else CA()
52
56
 
53
57
  def __bool__(self) -> bool:
54
58
  """
@@ -60,9 +64,25 @@ class FIFOQueue[D]:
60
64
  return len(self._ca) > 0
61
65
 
62
66
  def __len__(self) -> int:
67
+ """
68
+ .. admonition:: Get length
69
+
70
+ Return the number of data elements in the ``FIFOQueue``.
71
+
72
+ """
63
73
  return len(self._ca)
64
74
 
65
75
  def __eq__(self, other: object) -> bool:
76
+ """
77
+ .. admonition:: Equality comparison
78
+
79
+ If ``other`` is a ``FIFOQueue`` and the corresponding
80
+ elements of ``self`` and ``other`` compare as equal,
81
+ then return ``True``. Otherwise return ``False``.
82
+
83
+ :returns: ``self == other``
84
+
85
+ """
66
86
  if not isinstance(other, FIFOQueue):
67
87
  return False
68
88
  return self._ca == other._ca
@@ -79,20 +99,40 @@ class FIFOQueue[D]:
79
99
  return iter(list(self._ca))
80
100
 
81
101
  def __repr__(self) -> str:
102
+ """
103
+ .. admonition:: String representation
104
+
105
+ Construct string 'FIFOQueue(d₁, d₂, … dₙ)' where
106
+
107
+ - d₁, d₂, … dₙ are the contents displayed with ``repr()``
108
+
109
+ :returns: A string to reproduce the ``FIFOQueue``.
110
+
111
+ """
82
112
  if len(self) == 0:
83
113
  return 'FIFOQueue()'
84
114
  return 'FIFOQueue(' + ', '.join(map(repr, self._ca)) + ')'
85
115
 
86
116
  def __str__(self) -> str:
117
+ """
118
+ .. admonition:: User string
119
+
120
+ Construct string '<< d₁ < d₂ < … < dₙ <<' where
121
+
122
+ - d₁, d₂, ..., dₙ are the contents displayed with ``str()``
123
+
124
+ :returns: A string meaningful to an end user.
125
+
126
+ """
87
127
  return '<< ' + ' < '.join(map(str, self)) + ' <<'
88
128
 
89
129
  def copy(self) -> 'FIFOQueue[D]':
90
130
  """
91
- .. admonition:: Shallow copy
131
+ .. admonition:: Copy
92
132
 
93
- Make a shallow copy of the ``FIFOQueue``.
133
+ Shallow copy the ``FIFOQueue``.
94
134
 
95
- :returns: Shallow copy of the ``FIFOQueue``.
135
+ :returns: New ``FIFOQueue`` instance containing the same references.
96
136
 
97
137
  """
98
138
  return FIFOQueue(self._ca)
@@ -163,8 +203,8 @@ class FIFOQueue[D]:
163
203
 
164
204
  :param f: Reducing function, first argument is for accumulator.
165
205
  :param start: Optional starting value.
166
- :returns: ``MayBe`` of reduced value, empty ``MayBe`` if ``FIFOQueue``
167
- empty and no starting value given.
206
+ :returns: ``MayBe`` of reduced value with ``f``, empty ``MayBe``
207
+ if ``FIFOQueue`` empty and no starting value given.
168
208
 
169
209
  """
170
210
  if start is None:
@@ -37,18 +37,22 @@ class LIFOQueue[D]:
37
37
  """
38
38
  __slots__ = ('_ca',)
39
39
 
40
- def __init__(self, *dss: Iterable[D]) -> None:
40
+ def __init__(self, *ds: Iterable[D]) -> None:
41
41
  """
42
- :param dss: Takes 0 or 1 iterable parameters. Populates
43
- queue from the iterable in LIFO order.
42
+ .. admonition:: Initializer
43
+
44
+ Initialize ``LIFOQueue`` with 0 or 1 iterables to populate
45
+ the queue in natural LIFO order.
46
+
47
+ :param ds: Takes 0 or 1 iterable parameters.
48
+ :raises ValueError: When more than one parameter is provided.
44
49
  :raises TypeError: When passed a non-iterable parameter.
45
- :raises ValueError: When more than one parameter is given.
46
50
 
47
51
  """
48
- if (size := len(dss)) > 1:
52
+ if (size := len(ds)) > 1:
49
53
  msg = f'LIFOQueue expects at most 1 iterable argument, got {size}'
50
54
  raise ValueError(msg)
51
- self._ca = CA(dss[0]) if size == 1 else CA()
55
+ self._ca = CA(ds[0]) if size == 1 else CA()
52
56
 
53
57
  def __bool__(self) -> bool:
54
58
  """
@@ -60,9 +64,25 @@ class LIFOQueue[D]:
60
64
  return len(self._ca) > 0
61
65
 
62
66
  def __len__(self) -> int:
67
+ """
68
+ .. admonition:: Get length
69
+
70
+ Return the number of data elements in the ``LIFOQueue``.
71
+
72
+ """
63
73
  return len(self._ca)
64
74
 
65
75
  def __eq__(self, other: object) -> bool:
76
+ """
77
+ .. admonition:: Equality comparison
78
+
79
+ If ``other`` is a ``LIFOQueue`` and the corresponding
80
+ elements of ``self`` and ``other`` compare as equal,
81
+ then return ``True``. Otherwise return ``False``.
82
+
83
+ :returns: ``self == other``
84
+
85
+ """
66
86
  if not isinstance(other, LIFOQueue):
67
87
  return False
68
88
  return self._ca == other._ca
@@ -79,26 +99,49 @@ class LIFOQueue[D]:
79
99
  return reversed(list(self._ca))
80
100
 
81
101
  def __repr__(self) -> str:
102
+ """
103
+ .. admonition:: String representation
104
+
105
+ Construct string 'LIFOQueue(d₁, d₂, … dₙ)' where
106
+
107
+ - d₁, d₂, … dₙ are the contents displayed with ``repr()``
108
+
109
+ :returns: A string to reproduce the ``LIFOQueue``.
110
+
111
+ """
82
112
  if len(self) == 0:
83
113
  return 'LIFOQueue()'
84
114
  return 'LIFOQueue(' + ', '.join(map(repr, self._ca)) + ')'
85
115
 
86
116
  def __str__(self) -> str:
117
+ r"""
118
+ .. admonition:: User string
119
+
120
+ Construct string '|| d₁ > d₂ > … > dₙ ><' where
121
+
122
+ - d₁, d₂, ..., dₙ are the contents displayed with ``str()``
123
+
124
+ :returns: A string meaningful to an end user.
125
+
126
+ """
87
127
  return '|| ' + ' > '.join(map(str, self)) + ' ><'
88
128
 
89
129
  def copy(self) -> 'LIFOQueue[D]':
90
130
  """
91
- .. admonition:: Shallow copy
131
+ .. admonition:: Copy
92
132
 
93
- Make a shallow copy of the ``LIFOQueue``.
133
+ Shallow copy the ``LIFOQueue``.
94
134
 
95
- :returns: Shallow copy of the ``LIFOQueue``.
135
+ :returns: New ``LIFOQueue`` instance containing the same references.
96
136
 
97
137
  """
98
138
  return LIFOQueue(reversed(self._ca))
99
139
 
100
140
  def push(self, *ds: D) -> None:
101
- """Push items onto LIFOQueue.
141
+ """
142
+ .. admonition:: Push
143
+
144
+ Push items onto ``LIFOQueue``.
102
145
 
103
146
  :param ds: Items to be pushed onto ``LIFOQueue``.
104
147
 
@@ -145,8 +188,8 @@ class LIFOQueue[D]:
145
188
 
146
189
  :param f: Reducing function, first argument is for accumulator.
147
190
  :param start: Optional starting value.
148
- :returns: ``MayBe`` of reduced value, empty ``MayBe`` if ``LIFOQueue``
149
- empty and no starting value given.
191
+ :returns: ``MayBe`` of reduced value with ``f``, empty ``MayBe``
192
+ if ``LIFOQueue`` empty and no starting value given.
150
193
 
151
194
  """
152
195
  if start is None:
@@ -1,64 +0,0 @@
1
- name: Build and Deploy Furo Themed Sphinx Documentation
2
-
3
- on:
4
- push:
5
- branches: ["main"]
6
- workflow_dispatch:
7
-
8
- env:
9
- RELEASE: '5.1.2'
10
- DEVEL: '5.1.3'
11
- PYTHON: '3.14'
12
-
13
- permissions:
14
- contents: read
15
- pages: write
16
- id-token: write
17
-
18
- concurrency:
19
- group: "pages"
20
- cancel-in-progress: false
21
-
22
- jobs:
23
- deploy:
24
- runs-on: ubuntu-latest
25
- environment:
26
- name: github-pages
27
- url: ${{ steps.deployment.outputs.page_url }}
28
- steps:
29
- - name: Checkout
30
- uses: actions/checkout@v6
31
-
32
- - name: Select Python
33
- uses: actions/setup-python@v6
34
- with:
35
- python-version: ${{ env.PYTHON }}
36
-
37
- - name: Install Sphinx Dependencies
38
- run: |
39
- pip install -r docs/requirements.txt
40
- sudo apt-get install -y graphviz
41
-
42
- - name: Build Release Docs
43
- run: |
44
- pip install pythonic-fp-queues
45
- docs/gen_conf.py release ${{ env.RELEASE }} Queues queues > docs/source/conf.py
46
- sphinx-build -M html docs/source docs/build/release
47
-
48
- - name: Build Development Docs
49
- run: |
50
- pip install -e .
51
- docs/gen_conf.py devel ${{ env.DEVEL }} Queues queues > docs/source/conf.py
52
- sphinx-build -M html docs/source docs/build/development
53
-
54
- - name: Setup Pages
55
- uses: actions/configure-pages@v6
56
-
57
- - name: Upload Artifact
58
- uses: actions/upload-pages-artifact@v5
59
- with:
60
- path: docs/build
61
-
62
- - name: Deploy to GitHub Pages
63
- uses: actions/deploy-pages@v5
64
- id: deployment
@@ -1,9 +0,0 @@
1
- # Minimal version - only add to when necessary
2
- **/__pycache__/
3
- dist/
4
- docs/build/
5
- docs/source/conf.py
6
- **/.dmypy.json
7
- **/.mypy_cache/
8
- **/.pytest_cache/
9
- **/.ruff_cache