Skip to content

Commit

Permalink
deploy: e8dafad
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbhughes committed Jul 29, 2024
1 parent 76f0ad6 commit a6b9fab
Show file tree
Hide file tree
Showing 123 changed files with 9,688 additions and 4,839 deletions.
138 changes: 138 additions & 0 deletions _sources/autoapi/punchbowl/data/history/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
punchbowl.data.history
======================

.. py:module:: punchbowl.data.history
Attributes
----------

.. autoapisummary::

punchbowl.data.history.HistoryEntry


Classes
-------

.. autoapisummary::

punchbowl.data.history.History


Module Contents
---------------

.. py:data:: HistoryEntry
.. py:class:: History
Representation of the history of edits done to a PUNCHData object.


.. py:attribute:: _entries
:type: list[HistoryEntry]
:value: []



.. py:method:: add_entry(entry: HistoryEntry) -> None
Add an entry to the History log.

:param entry: A HistoryEntry object to add to the History log
:type entry: HistoryEntry

:rtype: None



.. py:method:: add_now(source: str, comment: str) -> None
Add a new history entry at the current time.

:param source: what module of the code the history entry originates from
:type source: str
:param comment: a note of what the history comment means
:type comment: str

:rtype: None



.. py:method:: clear() -> None
Clear all the history entries so the History is blank.

:rtype: None



.. py:method:: __getitem__(index: int) -> HistoryEntry
Given an index, return the requested HistoryEntry.

:param index: numerical index of the history entry, increasing number typically indicates an older entry
:type index: int

:returns: history at specified `index`
:rtype: HistoryEntry



.. py:method:: most_recent() -> HistoryEntry
Get the most recent HistoryEntry, i.e. the youngest.

:returns: returns HistoryEntry that is the youngest
:rtype: HistoryEntry



.. py:method:: __len__() -> int
Get length.



.. py:method:: __str__() -> str
Format a string combining all the history entries.

:returns: a combined record of the history entries
:rtype: str



.. py:method:: __iter__() -> History
Iterate.



.. py:method:: __next__() -> HistoryEntry
Get next.



.. py:method:: __eq__(other: History) -> bool
Check equality of two History objects.



.. py:method:: from_fits_header(head: astropy.io.fits.Header) -> History
:classmethod:


Construct a history from a FITS header.

:param head: a FITS header to read from
:type head: Header

:returns: the history derived from a given FITS header
:rtype: History



Loading

0 comments on commit a6b9fab

Please sign in to comment.