Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CompuGlobal
.. image:: https://img.shields.io/pypi/pyversions/compuglobal.svg
:target: https://pypi.python.org/pypi/compuglobal

.. image:: https://img.shields.io/readthedocs/compuglobal
.. image:: https://app.readthedocs.org/projects/compuglobal/badge/?version=latest&style=flat
:target: https://compuglobal.readthedocs.io/en/latest/

.. image:: https://img.shields.io/github/actions/workflow/status/MitchellAW/CompuGlobal/test.yml?label=tests
Expand Down Expand Up @@ -70,29 +70,6 @@ Basic Usage

For documented examples, check `here.`_

What's New
------------
**0.3.0 - Breaking changes**

These changes are to accommodate the extensive update to the APIs with new features:

- All synchronous implementations of the package have been removed
- The async endpoints persist and are now accessible via **compuglobal** or **compuglobal.aio** as done previously
- The `Master Of All Science`_ API appears to be unavailable at this point in time and redirects to Frinkiac, I have added a **deprecation warning** to this API and it will remain unless the API returns
- The package now requires **Python 3.13+**
- Image, comic, and gif generation are all now performed using the API rather than from a Screencap

.. code-block:: py

# This is now async
simpsons = compuglobal.Frinkiac()

# Previous usage
await screencap.get_gif_url()

# New usage
await simpsons.get_gif_url(screencap)

Preview
------------
.. image:: https://raw.githubusercontent.com/MitchellAW/MitchellAW.github.io/refs/heads/master/images/nothing-at-all.gif
Expand Down
158 changes: 158 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
.. currentmodule:: compuglobal

Changelog
=========

0.3.8
-----

Added
~~~~~
- Timestamp helper class for handling timestamps

0.3.7
-------

Added
~~~~~
- Optional season filters, season_minimum, and season_maximum for the following methods:

- :meth:`AsyncCompuGlobalAPI.search`
- :meth:`AsyncCompuGlobalAPI.search_for_screencap`
- :meth:`AsyncCompuGlobalAPI.get_random_screencap`

Miscellaneous
~~~~~~~~~~~~~
- Add support for optional query parameters with validation

0.3.6
-------

Breaking Changes
~~~~~~~~~~~~~~~~
- All instances of :class:`AsyncCompuGlobalAPI` now always require :class:`aiohttp.ClientSession`
- Search methods :meth:`AsyncCompuGlobalAPI.search` and :meth:`AsyncCompuGlobalAPI.search_for_screencap` now return lists containing :class:`FrameResult` instead of :class:`Frame`
- Rename :class:`NoSearchResultsFound` to :class:`NoSearchResultsFoundError`

Added
~~~~~
- :class:`FrameResult` model for search results
- :class:`~compuglobal.models.base.BaseCompuGlobalModel` as parent for all models with desired serialization/validation behaviour

Fixed
~~~~~
- Custom subtitles not being applied for comic panels
- Font color length validation
- Subtitle duration calculation
- Extra slash (/) in gif url

Miscellaneous
~~~~~~~~~~~~~
- Add unit tests for all models and API calls
- Add integration tests with real APIs
- Apply ruff rules to entire project

0.3.5
-------

Added
~~~~~
- :meth:`Subtitle.get_duration` for getting Subtitle duration

Fixed
~~~~~
- Incorrect path param using in :meth:`AsyncCompuGlobalAPI.get_frames`
- Custom subtitles not being used in comics/gifs

0.3.4
-------

Fixed
~~~~~
- Incorrect frames used in :class:`ComicStrip`
- Missing field alias in :class:`EpisodeSummary`

0.3.3
-------

Fixed
~~~~~
- Missing panels in :class:`ComicStrip`

0.3.2
-------

Added
~~~~~
- Methods for missing API endpoints:

- :meth:`AsyncCompuGlobalAPI.browse_episode`
- :meth:`AsyncCompuGlobalAPI.get_transcript`
- :meth:`AsyncCompuGlobalAPI.navigator`

- Methods for getting caption as a string:

- :meth:`StreamOverlay.get_caption`
- :meth:`Screencap.get_caption`

- Methods for building models from a :class:`Screencap` directly:

- :meth:`ComicPanel.from_screencap`, :meth:`ComicStrip.from_screencap`, and :meth:`Stream.from_screencap` for

Fixed
~~~~~
- Missing panels in :class:`ComicStrip`


0.3.1
-------

Breaking Changes
~~~~~~~~~~~~~~~~
- Made all models immutable

Added
~~~~~
- All models to compuglobal import scope

0.3.0
-------

Breaking Changes
~~~~~~~~~~~~~~~~
These changes are to accommodate the extensive update to the APIs with new features:

- All synchronous implementations of the package have been removed
- The async endpoints persist and are now accessible via :mod:`compuglobal` or :mod:`compuglobal.aio` as done previously
- The Master Of All Science API appears to be unavailable at this point in time and redirects to Frinkiac, I have added a deprecation warning to this API and it will remain unless the API returns
- The package now requires Python 3.13+
- Image, comic, and gif generation are all now performed using the API rather than from a Screencap:

- :meth:`AsyncCompuGlobalAPI.get_image_url`
- :meth:`AsyncCompuGlobalAPI.get_gif_url`

.. code-block:: py

# This is now async
simpsons = compuglobal.Frinkiac()

# Previous usage
await screencap.get_gif_url()

# New usage
await simpsons.get_gif_url(screencap)

Added
~~~~~
- Endpoints for comic panels/strips:

- :meth:`AsyncCompuGlobalAPI.get_comic_panel_url`
- :meth:`AsyncCompuGlobalAPI.get_comic_strip_url`
- Models for comics:
- :ref:`See Comic models here <comics>`
- Default font for APIs to use in text Overlays

Miscellaneous
~~~~~~~~~~~~~
- Moved fonts to its own module
- Added default values to :class:`Stream`
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinxcontrib_trio",
"sphinx_rtd_theme",
Expand All @@ -29,6 +30,11 @@
add_module_names = True
autoclass_content = "class"

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"aiohttp": ("https://docs.aiohttp.org/en/stable/", None),
}

napoleon_use_google_docstring = False
napoleon_use_param = False
napoleon_use_ivar = True
Expand Down
15 changes: 15 additions & 0 deletions docs/errors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. currentmodule:: compuglobal

Errors
===================

APIPageStatusError
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: APIPageStatusError
:members:


NoSearchResultsFoundError
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: NoSearchResultsFoundError
:members:
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
:maxdepth: 3

aio
changelog
errors
models
all

Expand Down
9 changes: 9 additions & 0 deletions docs/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Overlays
:members:
:exclude-members: model_config

.. _comics:

Comics
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: ComicPanel
Expand Down Expand Up @@ -88,3 +90,10 @@ Fonts

.. autoclass:: FontFamily
:members:


**Base Model:**

.. autoclass:: compuglobal.models.base.BaseCompuGlobalModel
:members:
:no-index: