From 07a8fa98fb193150c3a2ff05a707b6af585580d2 Mon Sep 17 00:00:00 2001 From: Andrea Zoppi Date: Tue, 20 Feb 2024 23:17:49 +0100 Subject: [PATCH] Improved docs Signed-off-by: Andrea Zoppi --- CHANGELOG.rst | 7 + .../bytesparse.base.HUMAN_ASCII.rst | 4 +- .../bytesparse.base.ImmutableMemory.rst | 159 +++++------ .../bytesparse.base.MutableBytesparse.rst | 265 +++++++++--------- .../bytesparse.base.MutableMemory.rst | 265 +++++++++--------- .../bytesparse.base.STR_MAX_CONTENT_SIZE.rst | 4 +- docs/_autosummary/bytesparse.base.rst | 78 +++--- .../bytesparse.inplace.Memory.rst | 265 +++++++++--------- .../bytesparse.inplace.bytesparse.rst | 265 +++++++++--------- docs/_autosummary/bytesparse.inplace.rst | 58 ++-- docs/_autosummary/bytesparse.io.MemoryIO.rst | 105 +++---- docs/_autosummary/bytesparse.io.SEEK_CUR.rst | 4 +- docs/_autosummary/bytesparse.io.SEEK_DATA.rst | 4 +- docs/_autosummary/bytesparse.io.SEEK_END.rst | 4 +- docs/_autosummary/bytesparse.io.SEEK_HOLE.rst | 4 +- docs/_autosummary/bytesparse.io.SEEK_SET.rst | 4 +- docs/_autosummary/bytesparse.io.rst | 80 +++--- docs/_autosummary/bytesparse.rst | 35 ++- docs/_static/{.keep => .gitkeep} | 0 docs/_templates/custom-base-template.rst | 5 + docs/_templates/custom-class-template.rst | 58 ++-- docs/_templates/custom-module-template.rst | 120 ++++---- docs/conf.py | 7 +- docs/index.rst | 2 +- docs/reference.rst | 1 - src/bytesparse/__init__.py | 2 +- src/bytesparse/base.py | 182 +++++++++++- src/bytesparse/inplace.py | 2 +- 28 files changed, 1110 insertions(+), 879 deletions(-) rename docs/_static/{.keep => .gitkeep} (100%) create mode 100644 docs/_templates/custom-base-template.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index adfdc49..e3118e8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Changelog ========= +0.1.0 (2024-02-22) +------------------ + +* Improved documentation. +* Version number deserved something more stable. + + 0.0.8 (2024-01-21) ------------------ diff --git a/docs/_autosummary/bytesparse.base.HUMAN_ASCII.rst b/docs/_autosummary/bytesparse.base.HUMAN_ASCII.rst index 131035d..6a9b2cd 100644 --- a/docs/_autosummary/bytesparse.base.HUMAN_ASCII.rst +++ b/docs/_autosummary/bytesparse.base.HUMAN_ASCII.rst @@ -1,5 +1,5 @@ -bytesparse.base.HUMAN\_ASCII -============================ +HUMAN\_ASCII +============ .. currentmodule:: bytesparse.base diff --git a/docs/_autosummary/bytesparse.base.ImmutableMemory.rst b/docs/_autosummary/bytesparse.base.ImmutableMemory.rst index 56311dc..f9e4c7f 100644 --- a/docs/_autosummary/bytesparse.base.ImmutableMemory.rst +++ b/docs/_autosummary/bytesparse.base.ImmutableMemory.rst @@ -1,83 +1,84 @@ -bytesparse.base.ImmutableMemory -=============================== +ImmutableMemory +=============== .. currentmodule:: bytesparse.base .. autoclass:: ImmutableMemory - :members: - :inherited-members: - :private-members: - :special-members: - - - - .. rubric:: Methods - - .. autosummary:: - :nosignatures: - - ~ImmutableMemory.__init__ - ~ImmutableMemory.block_span - ~ImmutableMemory.blocks - ~ImmutableMemory.bound - ~ImmutableMemory.chop - ~ImmutableMemory.collapse_blocks - ~ImmutableMemory.content_blocks - ~ImmutableMemory.content_items - ~ImmutableMemory.content_keys - ~ImmutableMemory.content_values - ~ImmutableMemory.copy - ~ImmutableMemory.count - ~ImmutableMemory.equal_span - ~ImmutableMemory.extract - ~ImmutableMemory.find - ~ImmutableMemory.from_blocks - ~ImmutableMemory.from_bytes - ~ImmutableMemory.from_items - ~ImmutableMemory.from_memory - ~ImmutableMemory.from_values - ~ImmutableMemory.fromhex - ~ImmutableMemory.gaps - ~ImmutableMemory.get - ~ImmutableMemory.hex - ~ImmutableMemory.hexdump - ~ImmutableMemory.index - ~ImmutableMemory.intervals - ~ImmutableMemory.items - ~ImmutableMemory.keys - ~ImmutableMemory.peek - ~ImmutableMemory.read - ~ImmutableMemory.readinto - ~ImmutableMemory.rfind - ~ImmutableMemory.rindex - ~ImmutableMemory.rvalues - ~ImmutableMemory.to_blocks - ~ImmutableMemory.to_bytes - ~ImmutableMemory.validate - ~ImmutableMemory.values - ~ImmutableMemory.view - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~ImmutableMemory.bound_endex - ~ImmutableMemory.bound_span - ~ImmutableMemory.bound_start - ~ImmutableMemory.content_endex - ~ImmutableMemory.content_endin - ~ImmutableMemory.content_parts - ~ImmutableMemory.content_size - ~ImmutableMemory.content_span - ~ImmutableMemory.content_start - ~ImmutableMemory.contiguous - ~ImmutableMemory.endex - ~ImmutableMemory.endin - ~ImmutableMemory.span - ~ImmutableMemory.start - - \ No newline at end of file + :members: + :inherited-members: + :private-members: + :special-members: + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~ImmutableMemory.bound_endex + ~ImmutableMemory.bound_span + ~ImmutableMemory.bound_start + ~ImmutableMemory.content_endex + ~ImmutableMemory.content_endin + ~ImmutableMemory.content_parts + ~ImmutableMemory.content_size + ~ImmutableMemory.content_span + ~ImmutableMemory.content_start + ~ImmutableMemory.contiguous + ~ImmutableMemory.endex + ~ImmutableMemory.endin + ~ImmutableMemory.span + ~ImmutableMemory.start + + + + + + + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~ImmutableMemory.__init__ + ~ImmutableMemory.block_span + ~ImmutableMemory.blocks + ~ImmutableMemory.bound + ~ImmutableMemory.chop + ~ImmutableMemory.collapse_blocks + ~ImmutableMemory.content_blocks + ~ImmutableMemory.content_items + ~ImmutableMemory.content_keys + ~ImmutableMemory.content_values + ~ImmutableMemory.copy + ~ImmutableMemory.count + ~ImmutableMemory.equal_span + ~ImmutableMemory.extract + ~ImmutableMemory.find + ~ImmutableMemory.from_blocks + ~ImmutableMemory.from_bytes + ~ImmutableMemory.from_items + ~ImmutableMemory.from_memory + ~ImmutableMemory.from_values + ~ImmutableMemory.fromhex + ~ImmutableMemory.gaps + ~ImmutableMemory.get + ~ImmutableMemory.hex + ~ImmutableMemory.hexdump + ~ImmutableMemory.index + ~ImmutableMemory.intervals + ~ImmutableMemory.items + ~ImmutableMemory.keys + ~ImmutableMemory.peek + ~ImmutableMemory.read + ~ImmutableMemory.readinto + ~ImmutableMemory.rfind + ~ImmutableMemory.rindex + ~ImmutableMemory.rvalues + ~ImmutableMemory.to_blocks + ~ImmutableMemory.to_bytes + ~ImmutableMemory.validate + ~ImmutableMemory.values + ~ImmutableMemory.view + diff --git a/docs/_autosummary/bytesparse.base.MutableBytesparse.rst b/docs/_autosummary/bytesparse.base.MutableBytesparse.rst index 3e4bbdf..a1f9a9e 100644 --- a/docs/_autosummary/bytesparse.base.MutableBytesparse.rst +++ b/docs/_autosummary/bytesparse.base.MutableBytesparse.rst @@ -1,136 +1,137 @@ -bytesparse.base.MutableBytesparse -================================= +MutableBytesparse +================= .. currentmodule:: bytesparse.base .. autoclass:: MutableBytesparse - :members: - :inherited-members: - :private-members: - :special-members: - - - - .. rubric:: Methods - - .. autosummary:: - :nosignatures: - - ~MutableBytesparse.__init__ - ~MutableBytesparse.append - ~MutableBytesparse.append_backup - ~MutableBytesparse.append_restore - ~MutableBytesparse.block_span - ~MutableBytesparse.blocks - ~MutableBytesparse.bound - ~MutableBytesparse.chop - ~MutableBytesparse.clear - ~MutableBytesparse.clear_backup - ~MutableBytesparse.clear_restore - ~MutableBytesparse.collapse_blocks - ~MutableBytesparse.content_blocks - ~MutableBytesparse.content_items - ~MutableBytesparse.content_keys - ~MutableBytesparse.content_values - ~MutableBytesparse.copy - ~MutableBytesparse.count - ~MutableBytesparse.crop - ~MutableBytesparse.crop_backup - ~MutableBytesparse.crop_restore - ~MutableBytesparse.cut - ~MutableBytesparse.delete - ~MutableBytesparse.delete_backup - ~MutableBytesparse.delete_restore - ~MutableBytesparse.equal_span - ~MutableBytesparse.extend - ~MutableBytesparse.extend_backup - ~MutableBytesparse.extend_restore - ~MutableBytesparse.extract - ~MutableBytesparse.fill - ~MutableBytesparse.fill_backup - ~MutableBytesparse.fill_restore - ~MutableBytesparse.find - ~MutableBytesparse.flood - ~MutableBytesparse.flood_backup - ~MutableBytesparse.flood_restore - ~MutableBytesparse.from_blocks - ~MutableBytesparse.from_bytes - ~MutableBytesparse.from_items - ~MutableBytesparse.from_memory - ~MutableBytesparse.from_values - ~MutableBytesparse.fromhex - ~MutableBytesparse.gaps - ~MutableBytesparse.get - ~MutableBytesparse.hex - ~MutableBytesparse.hexdump - ~MutableBytesparse.index - ~MutableBytesparse.insert - ~MutableBytesparse.insert_backup - ~MutableBytesparse.insert_restore - ~MutableBytesparse.intervals - ~MutableBytesparse.items - ~MutableBytesparse.keys - ~MutableBytesparse.peek - ~MutableBytesparse.poke - ~MutableBytesparse.poke_backup - ~MutableBytesparse.poke_restore - ~MutableBytesparse.pop - ~MutableBytesparse.pop_backup - ~MutableBytesparse.pop_restore - ~MutableBytesparse.popitem - ~MutableBytesparse.popitem_backup - ~MutableBytesparse.popitem_restore - ~MutableBytesparse.read - ~MutableBytesparse.readinto - ~MutableBytesparse.remove - ~MutableBytesparse.remove_backup - ~MutableBytesparse.remove_restore - ~MutableBytesparse.reserve - ~MutableBytesparse.reserve_backup - ~MutableBytesparse.reserve_restore - ~MutableBytesparse.reverse - ~MutableBytesparse.rfind - ~MutableBytesparse.rindex - ~MutableBytesparse.rvalues - ~MutableBytesparse.setdefault - ~MutableBytesparse.setdefault_backup - ~MutableBytesparse.setdefault_restore - ~MutableBytesparse.shift - ~MutableBytesparse.shift_backup - ~MutableBytesparse.shift_restore - ~MutableBytesparse.to_blocks - ~MutableBytesparse.to_bytes - ~MutableBytesparse.update - ~MutableBytesparse.update_backup - ~MutableBytesparse.update_restore - ~MutableBytesparse.validate - ~MutableBytesparse.values - ~MutableBytesparse.view - ~MutableBytesparse.write - ~MutableBytesparse.write_backup - ~MutableBytesparse.write_restore - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~MutableBytesparse.bound_endex - ~MutableBytesparse.bound_span - ~MutableBytesparse.bound_start - ~MutableBytesparse.content_endex - ~MutableBytesparse.content_endin - ~MutableBytesparse.content_parts - ~MutableBytesparse.content_size - ~MutableBytesparse.content_span - ~MutableBytesparse.content_start - ~MutableBytesparse.contiguous - ~MutableBytesparse.endex - ~MutableBytesparse.endin - ~MutableBytesparse.span - ~MutableBytesparse.start - - \ No newline at end of file + :members: + :inherited-members: + :private-members: + :special-members: + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~MutableBytesparse.bound_endex + ~MutableBytesparse.bound_span + ~MutableBytesparse.bound_start + ~MutableBytesparse.content_endex + ~MutableBytesparse.content_endin + ~MutableBytesparse.content_parts + ~MutableBytesparse.content_size + ~MutableBytesparse.content_span + ~MutableBytesparse.content_start + ~MutableBytesparse.contiguous + ~MutableBytesparse.endex + ~MutableBytesparse.endin + ~MutableBytesparse.span + ~MutableBytesparse.start + + + + + + + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~MutableBytesparse.__init__ + ~MutableBytesparse.append + ~MutableBytesparse.append_backup + ~MutableBytesparse.append_restore + ~MutableBytesparse.block_span + ~MutableBytesparse.blocks + ~MutableBytesparse.bound + ~MutableBytesparse.chop + ~MutableBytesparse.clear + ~MutableBytesparse.clear_backup + ~MutableBytesparse.clear_restore + ~MutableBytesparse.collapse_blocks + ~MutableBytesparse.content_blocks + ~MutableBytesparse.content_items + ~MutableBytesparse.content_keys + ~MutableBytesparse.content_values + ~MutableBytesparse.copy + ~MutableBytesparse.count + ~MutableBytesparse.crop + ~MutableBytesparse.crop_backup + ~MutableBytesparse.crop_restore + ~MutableBytesparse.cut + ~MutableBytesparse.delete + ~MutableBytesparse.delete_backup + ~MutableBytesparse.delete_restore + ~MutableBytesparse.equal_span + ~MutableBytesparse.extend + ~MutableBytesparse.extend_backup + ~MutableBytesparse.extend_restore + ~MutableBytesparse.extract + ~MutableBytesparse.fill + ~MutableBytesparse.fill_backup + ~MutableBytesparse.fill_restore + ~MutableBytesparse.find + ~MutableBytesparse.flood + ~MutableBytesparse.flood_backup + ~MutableBytesparse.flood_restore + ~MutableBytesparse.from_blocks + ~MutableBytesparse.from_bytes + ~MutableBytesparse.from_items + ~MutableBytesparse.from_memory + ~MutableBytesparse.from_values + ~MutableBytesparse.fromhex + ~MutableBytesparse.gaps + ~MutableBytesparse.get + ~MutableBytesparse.hex + ~MutableBytesparse.hexdump + ~MutableBytesparse.index + ~MutableBytesparse.insert + ~MutableBytesparse.insert_backup + ~MutableBytesparse.insert_restore + ~MutableBytesparse.intervals + ~MutableBytesparse.items + ~MutableBytesparse.keys + ~MutableBytesparse.peek + ~MutableBytesparse.poke + ~MutableBytesparse.poke_backup + ~MutableBytesparse.poke_restore + ~MutableBytesparse.pop + ~MutableBytesparse.pop_backup + ~MutableBytesparse.pop_restore + ~MutableBytesparse.popitem + ~MutableBytesparse.popitem_backup + ~MutableBytesparse.popitem_restore + ~MutableBytesparse.read + ~MutableBytesparse.readinto + ~MutableBytesparse.remove + ~MutableBytesparse.remove_backup + ~MutableBytesparse.remove_restore + ~MutableBytesparse.reserve + ~MutableBytesparse.reserve_backup + ~MutableBytesparse.reserve_restore + ~MutableBytesparse.reverse + ~MutableBytesparse.rfind + ~MutableBytesparse.rindex + ~MutableBytesparse.rvalues + ~MutableBytesparse.setdefault + ~MutableBytesparse.setdefault_backup + ~MutableBytesparse.setdefault_restore + ~MutableBytesparse.shift + ~MutableBytesparse.shift_backup + ~MutableBytesparse.shift_restore + ~MutableBytesparse.to_blocks + ~MutableBytesparse.to_bytes + ~MutableBytesparse.update + ~MutableBytesparse.update_backup + ~MutableBytesparse.update_restore + ~MutableBytesparse.validate + ~MutableBytesparse.values + ~MutableBytesparse.view + ~MutableBytesparse.write + ~MutableBytesparse.write_backup + ~MutableBytesparse.write_restore + diff --git a/docs/_autosummary/bytesparse.base.MutableMemory.rst b/docs/_autosummary/bytesparse.base.MutableMemory.rst index 5bcb6d0..96a820b 100644 --- a/docs/_autosummary/bytesparse.base.MutableMemory.rst +++ b/docs/_autosummary/bytesparse.base.MutableMemory.rst @@ -1,136 +1,137 @@ -bytesparse.base.MutableMemory -============================= +MutableMemory +============= .. currentmodule:: bytesparse.base .. autoclass:: MutableMemory - :members: - :inherited-members: - :private-members: - :special-members: - - - - .. rubric:: Methods - - .. autosummary:: - :nosignatures: - - ~MutableMemory.__init__ - ~MutableMemory.append - ~MutableMemory.append_backup - ~MutableMemory.append_restore - ~MutableMemory.block_span - ~MutableMemory.blocks - ~MutableMemory.bound - ~MutableMemory.chop - ~MutableMemory.clear - ~MutableMemory.clear_backup - ~MutableMemory.clear_restore - ~MutableMemory.collapse_blocks - ~MutableMemory.content_blocks - ~MutableMemory.content_items - ~MutableMemory.content_keys - ~MutableMemory.content_values - ~MutableMemory.copy - ~MutableMemory.count - ~MutableMemory.crop - ~MutableMemory.crop_backup - ~MutableMemory.crop_restore - ~MutableMemory.cut - ~MutableMemory.delete - ~MutableMemory.delete_backup - ~MutableMemory.delete_restore - ~MutableMemory.equal_span - ~MutableMemory.extend - ~MutableMemory.extend_backup - ~MutableMemory.extend_restore - ~MutableMemory.extract - ~MutableMemory.fill - ~MutableMemory.fill_backup - ~MutableMemory.fill_restore - ~MutableMemory.find - ~MutableMemory.flood - ~MutableMemory.flood_backup - ~MutableMemory.flood_restore - ~MutableMemory.from_blocks - ~MutableMemory.from_bytes - ~MutableMemory.from_items - ~MutableMemory.from_memory - ~MutableMemory.from_values - ~MutableMemory.fromhex - ~MutableMemory.gaps - ~MutableMemory.get - ~MutableMemory.hex - ~MutableMemory.hexdump - ~MutableMemory.index - ~MutableMemory.insert - ~MutableMemory.insert_backup - ~MutableMemory.insert_restore - ~MutableMemory.intervals - ~MutableMemory.items - ~MutableMemory.keys - ~MutableMemory.peek - ~MutableMemory.poke - ~MutableMemory.poke_backup - ~MutableMemory.poke_restore - ~MutableMemory.pop - ~MutableMemory.pop_backup - ~MutableMemory.pop_restore - ~MutableMemory.popitem - ~MutableMemory.popitem_backup - ~MutableMemory.popitem_restore - ~MutableMemory.read - ~MutableMemory.readinto - ~MutableMemory.remove - ~MutableMemory.remove_backup - ~MutableMemory.remove_restore - ~MutableMemory.reserve - ~MutableMemory.reserve_backup - ~MutableMemory.reserve_restore - ~MutableMemory.reverse - ~MutableMemory.rfind - ~MutableMemory.rindex - ~MutableMemory.rvalues - ~MutableMemory.setdefault - ~MutableMemory.setdefault_backup - ~MutableMemory.setdefault_restore - ~MutableMemory.shift - ~MutableMemory.shift_backup - ~MutableMemory.shift_restore - ~MutableMemory.to_blocks - ~MutableMemory.to_bytes - ~MutableMemory.update - ~MutableMemory.update_backup - ~MutableMemory.update_restore - ~MutableMemory.validate - ~MutableMemory.values - ~MutableMemory.view - ~MutableMemory.write - ~MutableMemory.write_backup - ~MutableMemory.write_restore - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~MutableMemory.bound_endex - ~MutableMemory.bound_span - ~MutableMemory.bound_start - ~MutableMemory.content_endex - ~MutableMemory.content_endin - ~MutableMemory.content_parts - ~MutableMemory.content_size - ~MutableMemory.content_span - ~MutableMemory.content_start - ~MutableMemory.contiguous - ~MutableMemory.endex - ~MutableMemory.endin - ~MutableMemory.span - ~MutableMemory.start - - \ No newline at end of file + :members: + :inherited-members: + :private-members: + :special-members: + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~MutableMemory.bound_endex + ~MutableMemory.bound_span + ~MutableMemory.bound_start + ~MutableMemory.content_endex + ~MutableMemory.content_endin + ~MutableMemory.content_parts + ~MutableMemory.content_size + ~MutableMemory.content_span + ~MutableMemory.content_start + ~MutableMemory.contiguous + ~MutableMemory.endex + ~MutableMemory.endin + ~MutableMemory.span + ~MutableMemory.start + + + + + + + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~MutableMemory.__init__ + ~MutableMemory.append + ~MutableMemory.append_backup + ~MutableMemory.append_restore + ~MutableMemory.block_span + ~MutableMemory.blocks + ~MutableMemory.bound + ~MutableMemory.chop + ~MutableMemory.clear + ~MutableMemory.clear_backup + ~MutableMemory.clear_restore + ~MutableMemory.collapse_blocks + ~MutableMemory.content_blocks + ~MutableMemory.content_items + ~MutableMemory.content_keys + ~MutableMemory.content_values + ~MutableMemory.copy + ~MutableMemory.count + ~MutableMemory.crop + ~MutableMemory.crop_backup + ~MutableMemory.crop_restore + ~MutableMemory.cut + ~MutableMemory.delete + ~MutableMemory.delete_backup + ~MutableMemory.delete_restore + ~MutableMemory.equal_span + ~MutableMemory.extend + ~MutableMemory.extend_backup + ~MutableMemory.extend_restore + ~MutableMemory.extract + ~MutableMemory.fill + ~MutableMemory.fill_backup + ~MutableMemory.fill_restore + ~MutableMemory.find + ~MutableMemory.flood + ~MutableMemory.flood_backup + ~MutableMemory.flood_restore + ~MutableMemory.from_blocks + ~MutableMemory.from_bytes + ~MutableMemory.from_items + ~MutableMemory.from_memory + ~MutableMemory.from_values + ~MutableMemory.fromhex + ~MutableMemory.gaps + ~MutableMemory.get + ~MutableMemory.hex + ~MutableMemory.hexdump + ~MutableMemory.index + ~MutableMemory.insert + ~MutableMemory.insert_backup + ~MutableMemory.insert_restore + ~MutableMemory.intervals + ~MutableMemory.items + ~MutableMemory.keys + ~MutableMemory.peek + ~MutableMemory.poke + ~MutableMemory.poke_backup + ~MutableMemory.poke_restore + ~MutableMemory.pop + ~MutableMemory.pop_backup + ~MutableMemory.pop_restore + ~MutableMemory.popitem + ~MutableMemory.popitem_backup + ~MutableMemory.popitem_restore + ~MutableMemory.read + ~MutableMemory.readinto + ~MutableMemory.remove + ~MutableMemory.remove_backup + ~MutableMemory.remove_restore + ~MutableMemory.reserve + ~MutableMemory.reserve_backup + ~MutableMemory.reserve_restore + ~MutableMemory.reverse + ~MutableMemory.rfind + ~MutableMemory.rindex + ~MutableMemory.rvalues + ~MutableMemory.setdefault + ~MutableMemory.setdefault_backup + ~MutableMemory.setdefault_restore + ~MutableMemory.shift + ~MutableMemory.shift_backup + ~MutableMemory.shift_restore + ~MutableMemory.to_blocks + ~MutableMemory.to_bytes + ~MutableMemory.update + ~MutableMemory.update_backup + ~MutableMemory.update_restore + ~MutableMemory.validate + ~MutableMemory.values + ~MutableMemory.view + ~MutableMemory.write + ~MutableMemory.write_backup + ~MutableMemory.write_restore + diff --git a/docs/_autosummary/bytesparse.base.STR_MAX_CONTENT_SIZE.rst b/docs/_autosummary/bytesparse.base.STR_MAX_CONTENT_SIZE.rst index 300e2cf..372f8b2 100644 --- a/docs/_autosummary/bytesparse.base.STR_MAX_CONTENT_SIZE.rst +++ b/docs/_autosummary/bytesparse.base.STR_MAX_CONTENT_SIZE.rst @@ -1,5 +1,5 @@ -bytesparse.base.STR\_MAX\_CONTENT\_SIZE -======================================= +STR\_MAX\_CONTENT\_SIZE +======================= .. currentmodule:: bytesparse.base diff --git a/docs/_autosummary/bytesparse.base.rst b/docs/_autosummary/bytesparse.base.rst index bfaf602..442fa82 100644 --- a/docs/_autosummary/bytesparse.base.rst +++ b/docs/_autosummary/bytesparse.base.rst @@ -1,42 +1,50 @@ -bytesparse.base +bytesparse.base =============== .. automodule:: bytesparse.base - - - .. rubric:: Module attributes - - .. autosummary:: - :toctree: - - STR_MAX_CONTENT_SIZE - HUMAN_ASCII - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - :nosignatures: - - ImmutableMemory - MutableBytesparse - MutableMemory - - - - - - + + + + .. rubric:: Attributes + + .. autosummary:: + :toctree: + :template: custom-base-template.rst + :nosignatures: + + ~STR_MAX_CONTENT_SIZE + ~HUMAN_ASCII + + + + + + + + + + + + .. rubric:: Classes + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + :nosignatures: + + ImmutableMemory + MutableBytesparse + MutableMemory + + + + + + + + + diff --git a/docs/_autosummary/bytesparse.inplace.Memory.rst b/docs/_autosummary/bytesparse.inplace.Memory.rst index 216b07e..c214b33 100644 --- a/docs/_autosummary/bytesparse.inplace.Memory.rst +++ b/docs/_autosummary/bytesparse.inplace.Memory.rst @@ -1,136 +1,137 @@ -bytesparse.inplace.Memory -========================= +Memory +====== .. currentmodule:: bytesparse.inplace .. autoclass:: Memory - :members: - :inherited-members: - :private-members: - :special-members: - - - - .. rubric:: Methods - - .. autosummary:: - :nosignatures: - - ~Memory.__init__ - ~Memory.append - ~Memory.append_backup - ~Memory.append_restore - ~Memory.block_span - ~Memory.blocks - ~Memory.bound - ~Memory.chop - ~Memory.clear - ~Memory.clear_backup - ~Memory.clear_restore - ~Memory.collapse_blocks - ~Memory.content_blocks - ~Memory.content_items - ~Memory.content_keys - ~Memory.content_values - ~Memory.copy - ~Memory.count - ~Memory.crop - ~Memory.crop_backup - ~Memory.crop_restore - ~Memory.cut - ~Memory.delete - ~Memory.delete_backup - ~Memory.delete_restore - ~Memory.equal_span - ~Memory.extend - ~Memory.extend_backup - ~Memory.extend_restore - ~Memory.extract - ~Memory.fill - ~Memory.fill_backup - ~Memory.fill_restore - ~Memory.find - ~Memory.flood - ~Memory.flood_backup - ~Memory.flood_restore - ~Memory.from_blocks - ~Memory.from_bytes - ~Memory.from_items - ~Memory.from_memory - ~Memory.from_values - ~Memory.fromhex - ~Memory.gaps - ~Memory.get - ~Memory.hex - ~Memory.hexdump - ~Memory.index - ~Memory.insert - ~Memory.insert_backup - ~Memory.insert_restore - ~Memory.intervals - ~Memory.items - ~Memory.keys - ~Memory.peek - ~Memory.poke - ~Memory.poke_backup - ~Memory.poke_restore - ~Memory.pop - ~Memory.pop_backup - ~Memory.pop_restore - ~Memory.popitem - ~Memory.popitem_backup - ~Memory.popitem_restore - ~Memory.read - ~Memory.readinto - ~Memory.remove - ~Memory.remove_backup - ~Memory.remove_restore - ~Memory.reserve - ~Memory.reserve_backup - ~Memory.reserve_restore - ~Memory.reverse - ~Memory.rfind - ~Memory.rindex - ~Memory.rvalues - ~Memory.setdefault - ~Memory.setdefault_backup - ~Memory.setdefault_restore - ~Memory.shift - ~Memory.shift_backup - ~Memory.shift_restore - ~Memory.to_blocks - ~Memory.to_bytes - ~Memory.update - ~Memory.update_backup - ~Memory.update_restore - ~Memory.validate - ~Memory.values - ~Memory.view - ~Memory.write - ~Memory.write_backup - ~Memory.write_restore - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~Memory.bound_endex - ~Memory.bound_span - ~Memory.bound_start - ~Memory.content_endex - ~Memory.content_endin - ~Memory.content_parts - ~Memory.content_size - ~Memory.content_span - ~Memory.content_start - ~Memory.contiguous - ~Memory.endex - ~Memory.endin - ~Memory.span - ~Memory.start - - \ No newline at end of file + :members: + :inherited-members: + :private-members: + :special-members: + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~Memory.bound_endex + ~Memory.bound_span + ~Memory.bound_start + ~Memory.content_endex + ~Memory.content_endin + ~Memory.content_parts + ~Memory.content_size + ~Memory.content_span + ~Memory.content_start + ~Memory.contiguous + ~Memory.endex + ~Memory.endin + ~Memory.span + ~Memory.start + + + + + + + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~Memory.__init__ + ~Memory.append + ~Memory.append_backup + ~Memory.append_restore + ~Memory.block_span + ~Memory.blocks + ~Memory.bound + ~Memory.chop + ~Memory.clear + ~Memory.clear_backup + ~Memory.clear_restore + ~Memory.collapse_blocks + ~Memory.content_blocks + ~Memory.content_items + ~Memory.content_keys + ~Memory.content_values + ~Memory.copy + ~Memory.count + ~Memory.crop + ~Memory.crop_backup + ~Memory.crop_restore + ~Memory.cut + ~Memory.delete + ~Memory.delete_backup + ~Memory.delete_restore + ~Memory.equal_span + ~Memory.extend + ~Memory.extend_backup + ~Memory.extend_restore + ~Memory.extract + ~Memory.fill + ~Memory.fill_backup + ~Memory.fill_restore + ~Memory.find + ~Memory.flood + ~Memory.flood_backup + ~Memory.flood_restore + ~Memory.from_blocks + ~Memory.from_bytes + ~Memory.from_items + ~Memory.from_memory + ~Memory.from_values + ~Memory.fromhex + ~Memory.gaps + ~Memory.get + ~Memory.hex + ~Memory.hexdump + ~Memory.index + ~Memory.insert + ~Memory.insert_backup + ~Memory.insert_restore + ~Memory.intervals + ~Memory.items + ~Memory.keys + ~Memory.peek + ~Memory.poke + ~Memory.poke_backup + ~Memory.poke_restore + ~Memory.pop + ~Memory.pop_backup + ~Memory.pop_restore + ~Memory.popitem + ~Memory.popitem_backup + ~Memory.popitem_restore + ~Memory.read + ~Memory.readinto + ~Memory.remove + ~Memory.remove_backup + ~Memory.remove_restore + ~Memory.reserve + ~Memory.reserve_backup + ~Memory.reserve_restore + ~Memory.reverse + ~Memory.rfind + ~Memory.rindex + ~Memory.rvalues + ~Memory.setdefault + ~Memory.setdefault_backup + ~Memory.setdefault_restore + ~Memory.shift + ~Memory.shift_backup + ~Memory.shift_restore + ~Memory.to_blocks + ~Memory.to_bytes + ~Memory.update + ~Memory.update_backup + ~Memory.update_restore + ~Memory.validate + ~Memory.values + ~Memory.view + ~Memory.write + ~Memory.write_backup + ~Memory.write_restore + diff --git a/docs/_autosummary/bytesparse.inplace.bytesparse.rst b/docs/_autosummary/bytesparse.inplace.bytesparse.rst index 2b7731b..f465565 100644 --- a/docs/_autosummary/bytesparse.inplace.bytesparse.rst +++ b/docs/_autosummary/bytesparse.inplace.bytesparse.rst @@ -1,136 +1,137 @@ -bytesparse.inplace.bytesparse -============================= +bytesparse +========== .. currentmodule:: bytesparse.inplace .. autoclass:: bytesparse - :members: - :inherited-members: - :private-members: - :special-members: - - - - .. rubric:: Methods - - .. autosummary:: - :nosignatures: - - ~bytesparse.__init__ - ~bytesparse.append - ~bytesparse.append_backup - ~bytesparse.append_restore - ~bytesparse.block_span - ~bytesparse.blocks - ~bytesparse.bound - ~bytesparse.chop - ~bytesparse.clear - ~bytesparse.clear_backup - ~bytesparse.clear_restore - ~bytesparse.collapse_blocks - ~bytesparse.content_blocks - ~bytesparse.content_items - ~bytesparse.content_keys - ~bytesparse.content_values - ~bytesparse.copy - ~bytesparse.count - ~bytesparse.crop - ~bytesparse.crop_backup - ~bytesparse.crop_restore - ~bytesparse.cut - ~bytesparse.delete - ~bytesparse.delete_backup - ~bytesparse.delete_restore - ~bytesparse.equal_span - ~bytesparse.extend - ~bytesparse.extend_backup - ~bytesparse.extend_restore - ~bytesparse.extract - ~bytesparse.fill - ~bytesparse.fill_backup - ~bytesparse.fill_restore - ~bytesparse.find - ~bytesparse.flood - ~bytesparse.flood_backup - ~bytesparse.flood_restore - ~bytesparse.from_blocks - ~bytesparse.from_bytes - ~bytesparse.from_items - ~bytesparse.from_memory - ~bytesparse.from_values - ~bytesparse.fromhex - ~bytesparse.gaps - ~bytesparse.get - ~bytesparse.hex - ~bytesparse.hexdump - ~bytesparse.index - ~bytesparse.insert - ~bytesparse.insert_backup - ~bytesparse.insert_restore - ~bytesparse.intervals - ~bytesparse.items - ~bytesparse.keys - ~bytesparse.peek - ~bytesparse.poke - ~bytesparse.poke_backup - ~bytesparse.poke_restore - ~bytesparse.pop - ~bytesparse.pop_backup - ~bytesparse.pop_restore - ~bytesparse.popitem - ~bytesparse.popitem_backup - ~bytesparse.popitem_restore - ~bytesparse.read - ~bytesparse.readinto - ~bytesparse.remove - ~bytesparse.remove_backup - ~bytesparse.remove_restore - ~bytesparse.reserve - ~bytesparse.reserve_backup - ~bytesparse.reserve_restore - ~bytesparse.reverse - ~bytesparse.rfind - ~bytesparse.rindex - ~bytesparse.rvalues - ~bytesparse.setdefault - ~bytesparse.setdefault_backup - ~bytesparse.setdefault_restore - ~bytesparse.shift - ~bytesparse.shift_backup - ~bytesparse.shift_restore - ~bytesparse.to_blocks - ~bytesparse.to_bytes - ~bytesparse.update - ~bytesparse.update_backup - ~bytesparse.update_restore - ~bytesparse.validate - ~bytesparse.values - ~bytesparse.view - ~bytesparse.write - ~bytesparse.write_backup - ~bytesparse.write_restore - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~bytesparse.bound_endex - ~bytesparse.bound_span - ~bytesparse.bound_start - ~bytesparse.content_endex - ~bytesparse.content_endin - ~bytesparse.content_parts - ~bytesparse.content_size - ~bytesparse.content_span - ~bytesparse.content_start - ~bytesparse.contiguous - ~bytesparse.endex - ~bytesparse.endin - ~bytesparse.span - ~bytesparse.start - - \ No newline at end of file + :members: + :inherited-members: + :private-members: + :special-members: + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~bytesparse.bound_endex + ~bytesparse.bound_span + ~bytesparse.bound_start + ~bytesparse.content_endex + ~bytesparse.content_endin + ~bytesparse.content_parts + ~bytesparse.content_size + ~bytesparse.content_span + ~bytesparse.content_start + ~bytesparse.contiguous + ~bytesparse.endex + ~bytesparse.endin + ~bytesparse.span + ~bytesparse.start + + + + + + + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~bytesparse.__init__ + ~bytesparse.append + ~bytesparse.append_backup + ~bytesparse.append_restore + ~bytesparse.block_span + ~bytesparse.blocks + ~bytesparse.bound + ~bytesparse.chop + ~bytesparse.clear + ~bytesparse.clear_backup + ~bytesparse.clear_restore + ~bytesparse.collapse_blocks + ~bytesparse.content_blocks + ~bytesparse.content_items + ~bytesparse.content_keys + ~bytesparse.content_values + ~bytesparse.copy + ~bytesparse.count + ~bytesparse.crop + ~bytesparse.crop_backup + ~bytesparse.crop_restore + ~bytesparse.cut + ~bytesparse.delete + ~bytesparse.delete_backup + ~bytesparse.delete_restore + ~bytesparse.equal_span + ~bytesparse.extend + ~bytesparse.extend_backup + ~bytesparse.extend_restore + ~bytesparse.extract + ~bytesparse.fill + ~bytesparse.fill_backup + ~bytesparse.fill_restore + ~bytesparse.find + ~bytesparse.flood + ~bytesparse.flood_backup + ~bytesparse.flood_restore + ~bytesparse.from_blocks + ~bytesparse.from_bytes + ~bytesparse.from_items + ~bytesparse.from_memory + ~bytesparse.from_values + ~bytesparse.fromhex + ~bytesparse.gaps + ~bytesparse.get + ~bytesparse.hex + ~bytesparse.hexdump + ~bytesparse.index + ~bytesparse.insert + ~bytesparse.insert_backup + ~bytesparse.insert_restore + ~bytesparse.intervals + ~bytesparse.items + ~bytesparse.keys + ~bytesparse.peek + ~bytesparse.poke + ~bytesparse.poke_backup + ~bytesparse.poke_restore + ~bytesparse.pop + ~bytesparse.pop_backup + ~bytesparse.pop_restore + ~bytesparse.popitem + ~bytesparse.popitem_backup + ~bytesparse.popitem_restore + ~bytesparse.read + ~bytesparse.readinto + ~bytesparse.remove + ~bytesparse.remove_backup + ~bytesparse.remove_restore + ~bytesparse.reserve + ~bytesparse.reserve_backup + ~bytesparse.reserve_restore + ~bytesparse.reverse + ~bytesparse.rfind + ~bytesparse.rindex + ~bytesparse.rvalues + ~bytesparse.setdefault + ~bytesparse.setdefault_backup + ~bytesparse.setdefault_restore + ~bytesparse.shift + ~bytesparse.shift_backup + ~bytesparse.shift_restore + ~bytesparse.to_blocks + ~bytesparse.to_bytes + ~bytesparse.update + ~bytesparse.update_backup + ~bytesparse.update_restore + ~bytesparse.validate + ~bytesparse.values + ~bytesparse.view + ~bytesparse.write + ~bytesparse.write_backup + ~bytesparse.write_restore + diff --git a/docs/_autosummary/bytesparse.inplace.rst b/docs/_autosummary/bytesparse.inplace.rst index 3fae576..4f5d0c0 100644 --- a/docs/_autosummary/bytesparse.inplace.rst +++ b/docs/_autosummary/bytesparse.inplace.rst @@ -1,33 +1,39 @@ -bytesparse.inplace +bytesparse.inplace ================== .. automodule:: bytesparse.inplace - - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - :nosignatures: - - Memory - bytesparse - - - - - - + + + + + + + + + + + + + + .. rubric:: Classes + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + :nosignatures: + + Memory + bytesparse + + + + + + + + + diff --git a/docs/_autosummary/bytesparse.io.MemoryIO.rst b/docs/_autosummary/bytesparse.io.MemoryIO.rst index 79ced8d..17ca6f6 100644 --- a/docs/_autosummary/bytesparse.io.MemoryIO.rst +++ b/docs/_autosummary/bytesparse.io.MemoryIO.rst @@ -1,56 +1,57 @@ -bytesparse.io.MemoryIO -====================== +MemoryIO +======== .. currentmodule:: bytesparse.io .. autoclass:: MemoryIO - :members: - :inherited-members: - :private-members: - :special-members: - - - - .. rubric:: Methods - - .. autosummary:: - :nosignatures: - - ~MemoryIO.__init__ - ~MemoryIO.close - ~MemoryIO.detach - ~MemoryIO.fileno - ~MemoryIO.flush - ~MemoryIO.getbuffer - ~MemoryIO.getvalue - ~MemoryIO.isatty - ~MemoryIO.peek - ~MemoryIO.read - ~MemoryIO.read1 - ~MemoryIO.readable - ~MemoryIO.readinto - ~MemoryIO.readinto1 - ~MemoryIO.readline - ~MemoryIO.readlines - ~MemoryIO.seek - ~MemoryIO.seekable - ~MemoryIO.skip_data - ~MemoryIO.skip_hole - ~MemoryIO.tell - ~MemoryIO.truncate - ~MemoryIO.writable - ~MemoryIO.write - ~MemoryIO.writelines - - - - - - .. rubric:: Attributes - - .. autosummary:: - - ~MemoryIO.closed - ~MemoryIO.memory - - \ No newline at end of file + :members: + :inherited-members: + :private-members: + :special-members: + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~MemoryIO.closed + ~MemoryIO.memory + + + + + + + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~MemoryIO.__init__ + ~MemoryIO.close + ~MemoryIO.detach + ~MemoryIO.fileno + ~MemoryIO.flush + ~MemoryIO.getbuffer + ~MemoryIO.getvalue + ~MemoryIO.isatty + ~MemoryIO.peek + ~MemoryIO.read + ~MemoryIO.read1 + ~MemoryIO.readable + ~MemoryIO.readinto + ~MemoryIO.readinto1 + ~MemoryIO.readline + ~MemoryIO.readlines + ~MemoryIO.seek + ~MemoryIO.seekable + ~MemoryIO.skip_data + ~MemoryIO.skip_hole + ~MemoryIO.tell + ~MemoryIO.truncate + ~MemoryIO.writable + ~MemoryIO.write + ~MemoryIO.writelines + diff --git a/docs/_autosummary/bytesparse.io.SEEK_CUR.rst b/docs/_autosummary/bytesparse.io.SEEK_CUR.rst index 9b111e6..9ffc306 100644 --- a/docs/_autosummary/bytesparse.io.SEEK_CUR.rst +++ b/docs/_autosummary/bytesparse.io.SEEK_CUR.rst @@ -1,5 +1,5 @@ -bytesparse.io.SEEK\_CUR -======================= +SEEK\_CUR +========= .. currentmodule:: bytesparse.io diff --git a/docs/_autosummary/bytesparse.io.SEEK_DATA.rst b/docs/_autosummary/bytesparse.io.SEEK_DATA.rst index 6d09c81..8f2bde9 100644 --- a/docs/_autosummary/bytesparse.io.SEEK_DATA.rst +++ b/docs/_autosummary/bytesparse.io.SEEK_DATA.rst @@ -1,5 +1,5 @@ -bytesparse.io.SEEK\_DATA -======================== +SEEK\_DATA +========== .. currentmodule:: bytesparse.io diff --git a/docs/_autosummary/bytesparse.io.SEEK_END.rst b/docs/_autosummary/bytesparse.io.SEEK_END.rst index 57589f6..53be1fe 100644 --- a/docs/_autosummary/bytesparse.io.SEEK_END.rst +++ b/docs/_autosummary/bytesparse.io.SEEK_END.rst @@ -1,5 +1,5 @@ -bytesparse.io.SEEK\_END -======================= +SEEK\_END +========= .. currentmodule:: bytesparse.io diff --git a/docs/_autosummary/bytesparse.io.SEEK_HOLE.rst b/docs/_autosummary/bytesparse.io.SEEK_HOLE.rst index 6e7229e..18d4da6 100644 --- a/docs/_autosummary/bytesparse.io.SEEK_HOLE.rst +++ b/docs/_autosummary/bytesparse.io.SEEK_HOLE.rst @@ -1,5 +1,5 @@ -bytesparse.io.SEEK\_HOLE -======================== +SEEK\_HOLE +========== .. currentmodule:: bytesparse.io diff --git a/docs/_autosummary/bytesparse.io.SEEK_SET.rst b/docs/_autosummary/bytesparse.io.SEEK_SET.rst index 2ebdbcb..74cbf71 100644 --- a/docs/_autosummary/bytesparse.io.SEEK_SET.rst +++ b/docs/_autosummary/bytesparse.io.SEEK_SET.rst @@ -1,5 +1,5 @@ -bytesparse.io.SEEK\_SET -======================= +SEEK\_SET +========= .. currentmodule:: bytesparse.io diff --git a/docs/_autosummary/bytesparse.io.rst b/docs/_autosummary/bytesparse.io.rst index 370420f..8bdd5b0 100644 --- a/docs/_autosummary/bytesparse.io.rst +++ b/docs/_autosummary/bytesparse.io.rst @@ -1,43 +1,51 @@ -bytesparse.io +bytesparse.io ============= .. automodule:: bytesparse.io - - - .. rubric:: Module attributes - - .. autosummary:: - :toctree: - - SEEK_SET - SEEK_CUR - SEEK_END - SEEK_DATA - SEEK_HOLE - - - - - - - - - - .. rubric:: Classes - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - :nosignatures: - - MemoryIO - - - - - - + + + + .. rubric:: Attributes + + .. autosummary:: + :toctree: + :template: custom-base-template.rst + :nosignatures: + + ~SEEK_SET + ~SEEK_CUR + ~SEEK_END + ~SEEK_DATA + ~SEEK_HOLE + + + + + + + + + + + + .. rubric:: Classes + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + :nosignatures: + + MemoryIO + + + + + + + + + diff --git a/docs/_autosummary/bytesparse.rst b/docs/_autosummary/bytesparse.rst index 380acbb..737aebb 100644 --- a/docs/_autosummary/bytesparse.rst +++ b/docs/_autosummary/bytesparse.rst @@ -3,30 +3,27 @@ .. automodule:: bytesparse - - - - - - - - - - - - -.. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: - bytesparse.base - bytesparse.inplace - bytesparse.io + + + + + + + + + + + + + + + + diff --git a/docs/_static/.keep b/docs/_static/.gitkeep similarity index 100% rename from docs/_static/.keep rename to docs/_static/.gitkeep diff --git a/docs/_templates/custom-base-template.rst b/docs/_templates/custom-base-template.rst new file mode 100644 index 0000000..70a5c80 --- /dev/null +++ b/docs/_templates/custom-base-template.rst @@ -0,0 +1,5 @@ +{{ name | escape | underline }} + +.. currentmodule:: {{ module }} + +.. auto{{ objtype }}:: {{ objname }} diff --git a/docs/_templates/custom-class-template.rst b/docs/_templates/custom-class-template.rst index 1bdd6e1..7dcb245 100644 --- a/docs/_templates/custom-class-template.rst +++ b/docs/_templates/custom-class-template.rst @@ -1,32 +1,34 @@ -{{ fullname | escape | underline}} +{{ name | escape | underline }} .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - :members: - :inherited-members: - :private-members: - :special-members: - - {% block methods %} - {% if methods %} - .. rubric:: {{ _('Methods') }} - - .. autosummary:: - :nosignatures: - {% for item in methods %} - ~{{ name }}.{{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ _('Attributes') }} - - .. autosummary:: - {% for item in attributes %} - ~{{ name }}.{{ item }} - {%- endfor %} - {% endif %} - {% endblock %} + :members: + :inherited-members: + :private-members: + :special-members: + + +{% block attributes %} +{% if attributes %} + .. rubric:: {{ _('Attributes') }} + + .. autosummary:: +{% for item in attributes %} + ~{{ name }}.{{ item }} +{%- endfor %} +{% endif %} +{% endblock %} + + +{% block methods %} +{% if methods %} + .. rubric:: {{ _('Methods') }} + + .. autosummary:: + :nosignatures: +{% for item in methods %} + ~{{ name }}.{{ item }} +{%- endfor %} +{% endif %} +{% endblock %} diff --git a/docs/_templates/custom-module-template.rst b/docs/_templates/custom-module-template.rst index d066d0e..f833552 100644 --- a/docs/_templates/custom-module-template.rst +++ b/docs/_templates/custom-module-template.rst @@ -1,66 +1,76 @@ -{{ fullname | escape | underline}} +{{ fullname | escape | underline }} .. automodule:: {{ fullname }} - {% block attributes %} - {% if attributes %} - .. rubric:: Module attributes - - .. autosummary:: - :toctree: - {% for item in attributes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block functions %} - {% if functions %} - .. rubric:: {{ _('Functions') }} - - .. autosummary:: - :toctree: - :nosignatures: - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: {{ _('Classes') }} - - .. autosummary:: - :toctree: - :template: custom-class-template.rst - :nosignatures: - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: {{ _('Exceptions') }} - - .. autosummary:: - :toctree: - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} + +{% block attributes %} +{% if attributes %} + .. rubric:: {{ _('Attributes') }} + + .. autosummary:: + :toctree: + :template: custom-base-template.rst + :nosignatures: +{% for item in attributes %} + ~{{ item }} +{%- endfor %} +{% endif %} +{% endblock %} + + +{% block functions %} +{% if functions %} + .. rubric:: {{ _('Functions') }} + + .. autosummary:: + :toctree: + :template: custom-base-template.rst + :nosignatures: +{% for item in functions %} + ~{{ item }} +{%- endfor %} +{% endif %} +{% endblock %} + + +{% block classes %} +{% if classes %} + .. rubric:: {{ _('Classes') }} + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + :nosignatures: +{% for item in classes %} + {{ item }} +{%- endfor %} +{% endif %} +{% endblock %} + + +{% block exceptions %} +{% if exceptions %} + .. rubric:: {{ _('Exceptions') }} + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + :nosignatures: +{% for item in exceptions %} + {{ item }} +{%- endfor %} +{% endif %} +{% endblock %} + + {% block modules %} {% if modules %} .. autosummary:: - :toctree: - :template: custom-module-template.rst - :recursive: + :toctree: + :template: custom-module-template.rst {% for item in modules %} - {{ item }} + {{ item }} {%- endfor %} {% endif %} {% endblock %} diff --git a/docs/conf.py b/docs/conf.py index dcbf535..6d87c1b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,7 @@ def read_version(): source_suffix = '.rst' master_doc = 'index' project = 'bytesparse' -year = '2020-2023' +year = '2020-2024' author = 'Andrea Zoppi' copyright = f'{year}, {author}' version = release = read_version() @@ -44,7 +44,7 @@ def read_version(): } # on_rtd is whether we are on readthedocs.org -#on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +# on_rtd = os.environ.get('READTHEDOCS', None) == 'True' html_theme = 'furo' @@ -67,6 +67,8 @@ def read_version(): autosummary_generate = True autosummary_generate_overwrite = True +toc_object_entries_show_parents = 'hide' + napoleon_google_docstring = True napoleon_numpy_docstring = False napoleon_include_init_with_doc = False @@ -75,5 +77,6 @@ def read_version(): napoleon_use_param = True napoleon_include_private_with_doc = True napoleon_include_special_with_doc = True +napoleon_custom_sections = [('Method Groups', 'params_style')] typehints_document_rtype = False diff --git a/docs/index.rst b/docs/index.rst index 4c68068..f14ac3a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,10 +12,10 @@ Contents authors changelog + Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/docs/reference.rst b/docs/reference.rst index b647a31..b26a650 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -4,7 +4,6 @@ Reference .. autosummary:: :toctree: _autosummary :template: custom-module-template.rst - :recursive: bytesparse bytesparse.base diff --git a/src/bytesparse/__init__.py b/src/bytesparse/__init__.py index 06c00e5..7b179a9 100644 --- a/src/bytesparse/__init__.py +++ b/src/bytesparse/__init__.py @@ -112,7 +112,7 @@ """ -__version__ = '0.0.8' +__version__ = '0.1.0' from .inplace import Memory from .inplace import bytesparse diff --git a/src/bytesparse/base.py b/src/bytesparse/base.py index d8bc72a..4607136 100644 --- a/src/bytesparse/base.py +++ b/src/bytesparse/base.py @@ -124,6 +124,96 @@ class ImmutableMemory(collections.abc.Sequence, >>> memory = Memory.from_bytes(b'Hello, World!', offset=5) >>> memory.to_blocks() [[5, b'Hello, World!']] + + Method Groups: + + Addressing: + :meth:`__len__` + :meth:`_block_index_at` + :meth:`_block_index_endex` + :meth:`_block_index_start` + :meth:`block_span` + :meth:`bound` + :attr:`bound_endex` + :attr:`bound_span` + :attr:`bound_start` + :attr:`content_endex` + :attr:`content_endin` + :attr:`content_parts` + :attr:`content_size` + :attr:`content_span` + :attr:`content_start` + :attr:`count` + :attr:`endex` + :attr:`endin` + :attr:`span` + :attr:`start` + + Comparison: + :meth:`__bool__` + :meth:`__eq__` + :attr:`contiguous` + :meth:`validate` + + Creation: + :meth:`__copy__` + :meth:`__deepcopy__` + :meth:`__init__` + :meth:`copy` + :meth:`extract` + :meth:`from_blocks` + :meth:`from_bytes` + :meth:`from_items` + :meth:`from_memory` + :meth:`from_values` + :meth:`fromhex` + + Export: + :meth:`__bytes__` + :meth:`__repr__` + :meth:`__str__` + :meth:`hex` + :meth:`hexdump` + :meth:`read` + :meth:`readinto` + :meth:`to_blocks` + :meth:`to_bytes` + :meth:`view` + + Iteration: + :meth:`__iter__` + :meth:`__reversed__` + :meth:`blocks` + :meth:`chop` + :meth:`content_blocks` + :meth:`content_items` + :meth:`content_keys` + :meth:`content_values` + :meth:`equal_span` + :meth:`gaps` + :meth:`intervals` + :meth:`items` + :meth:`keys` + :meth:`rvalues` + + Search: + :meth:`__contains__` + :meth:`__getitem__` + :meth:`count` + :meth:`equal_span` + :meth:`find` + :meth:`index` + :meth:`rfind` + :meth:`rindex` + + Vector: + :meth:`__add__` + :meth:`__mul__` + :meth:`__or__` + :meth:`collapse_blocks` + :meth:`extract` + :meth:`get` + :meth:`peek` """ @abc.abstractmethod @@ -3288,8 +3378,89 @@ class MutableMemory(ImmutableMemory, See Also: :obj:`ImmutableMemory` + Method Groups: + + Setting: + :meth:`__setitem__` + :attr:`bound_endex` + :attr:`bound_span` + :attr:`bound_start` + :meth:`poke` + :meth:`reverse` + :meth:`setdefault` + :meth:`shift` + + Merging: + :meth:`__ior__` + :meth:`fill` + :meth:`flood` + :meth:`update` + + Extension: + :meth:`__iadd__` + :meth:`__imul__` + :meth:`append` + :meth:`extend` + :meth:`insert` + :meth:`reserve` + :meth:`write` + + Deletion: + :meth:`__delitem__` + :meth:`clear` + :meth:`crop` + :meth:`cut` + :meth:`delete` + :meth:`pop` + :meth:`popitem` + :meth:`remove` + + Backup: + :meth:`append_backup` + :meth:`clear_backup` + :meth:`crop_backup` + :meth:`delete_backup` + :meth:`extend_backup` + :meth:`fill_backup` + :meth:`flood_backup` + :meth:`insert_backup` + :meth:`poke_backup` + :meth:`pop_backup` + :meth:`popitem_backup` + :meth:`remove_backup` + :meth:`reserve_backup` + :meth:`setdefault_backup` + :meth:`shift_backup` + :meth:`update_backup` + :meth:`write_backup` + + Restore: + :meth:`append_restore` + :meth:`clear_restore` + :meth:`crop_restore` + :meth:`delete_restore` + :meth:`extend_restore` + :meth:`fill_restore` + :meth:`flood_restore` + :meth:`insert_restore` + :meth:`poke_restore` + :meth:`pop_restore` + :meth:`popitem_restore` + :meth:`remove_restore` + :meth:`reserve_restore` + :meth:`setdefault_restore` + :meth:`shift_restore` + :meth:`update_restore` + :meth:`write_restore` + + Internal: + :meth:`_prebound_endex` + :meth:`_prebound_endex_backup` + :meth:`_prebound_start` + :meth:`_prebound_start_backup` """ - __doc__ += ImmutableMemory.__doc__[ImmutableMemory.__doc__.index('Arguments:'):] + __doc__ += ImmutableMemory.__doc__[ImmutableMemory.__doc__.index('Arguments:'): + ImmutableMemory.__doc__.index('Method Groups:')] @abc.abstractmethod def __delitem__( @@ -5328,6 +5499,15 @@ class MutableBytesparse(MutableMemory, abc.ABC): Traceback (most recent call last): ... TypeError: string argument without an encoding + + Method Groups: + + Creation: + :meth:`__init__` + + Addressing: + :meth:`_rectify_address` + :meth:`_rectify_span` """ @abc.abstractmethod diff --git a/src/bytesparse/inplace.py b/src/bytesparse/inplace.py index 3c052c1..870bc70 100644 --- a/src/bytesparse/inplace.py +++ b/src/bytesparse/inplace.py @@ -25,7 +25,7 @@ r"""In-place implementation. -This implementation in pure Python uses the basic :obj:``bytearray`` data type +This implementation in pure Python uses the basic :class:`bytearray` data type to hold block data, which allows mutable in-place operations. """