Skip to content

Commit

Permalink
Merge pull request #161 from arnauddupuis/arnauddupuis/issue123
Browse files Browse the repository at this point in the history
arnauddupuis/issue123
  • Loading branch information
arnauddupuis committed Jun 15, 2021
2 parents d7cfeda + 44da2aa commit 967b55b
Show file tree
Hide file tree
Showing 44 changed files with 1,076 additions and 229 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ jobs:
build:
working_directory: ~/pygamelib
docker:
- image: circleci/python:3.7
- image: circleci/python:3.9
environment:
PIPENV_VENV_IN_PROJECT: true
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.9/site-packages
- restore_cache:
key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
key: python39-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
command: |
sudo pip3 install pipenv
pipenv install --dev
- save_cache:
key: deps10-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
key: python39-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
paths:
- ".venv"
- "/usr/local/bin"
- "/usr/local/lib/python3.7/site-packages"
- "/usr/local/lib/python3.9/site-packages"
- run:
name: Run linting and metrics
command: |
Expand Down
1 change: 1 addition & 0 deletions .legacy/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ numpy==1.19.2
readchar==2.0.1
six==1.16.0
wcwidth==0.2.5
importlib_resources==5.1.3
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ colorama = ">=0.3.8"
readchar = ">=2.0.0"
appdirs = ">=1.4.4"
blessed = ">=1.17.0"
importlib_resources = ">=5.1.3"
numpy = "*"
# Please update the .legacy/requirements.txt with new dependencies added here.
242 changes: 150 additions & 92 deletions Pipfile.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions docs/generated/pygamelib.base.Console.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pygamelib.base.Console
======================

.. currentmodule:: pygamelib.base

.. autoclass:: Console


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Console.__init__
~Console.instance






24 changes: 24 additions & 0 deletions docs/generated/pygamelib.base.Math.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pygamelib.base.Math
===================

.. currentmodule:: pygamelib.base

.. autoclass:: Math


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Math.__init__
~Math.distance
~Math.intersect






26 changes: 26 additions & 0 deletions docs/generated/pygamelib.base.PglBaseObject.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pygamelib.base.PglBaseObject
============================

.. currentmodule:: pygamelib.base

.. autoclass:: PglBaseObject


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~PglBaseObject.__init__
~PglBaseObject.attach
~PglBaseObject.be_notified
~PglBaseObject.detach
~PglBaseObject.notify






6 changes: 6 additions & 0 deletions docs/generated/pygamelib.base.PglException.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pygamelib.base.PglException
===========================

.. currentmodule:: pygamelib.base

.. autoexception:: PglException
6 changes: 6 additions & 0 deletions docs/generated/pygamelib.base.PglInvalidLevelException.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pygamelib.base.PglInvalidLevelException
=======================================

.. currentmodule:: pygamelib.base

.. autoexception:: PglInvalidLevelException
6 changes: 6 additions & 0 deletions docs/generated/pygamelib.base.PglInvalidTypeException.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pygamelib.base.PglInvalidTypeException
======================================

.. currentmodule:: pygamelib.base

.. autoexception:: PglInvalidTypeException
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pygamelib.base.PglObjectIsNotMovableException
=============================================

.. currentmodule:: pygamelib.base

.. autoexception:: PglObjectIsNotMovableException
6 changes: 6 additions & 0 deletions docs/generated/pygamelib.base.PglOutOfBoardBoundException.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pygamelib.base.PglOutOfBoardBoundException
==========================================

.. currentmodule:: pygamelib.base

.. autoexception:: PglOutOfBoardBoundException
65 changes: 65 additions & 0 deletions docs/generated/pygamelib.base.Text.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
pygamelib.base.Text
===================

.. currentmodule:: pygamelib.base

.. autoclass:: Text


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Text.__init__
~Text.attach
~Text.be_notified
~Text.black
~Text.black_bright
~Text.black_dim
~Text.blue
~Text.blue_bright
~Text.blue_dim
~Text.cyan
~Text.cyan_bright
~Text.cyan_dim
~Text.debug
~Text.detach
~Text.fatal
~Text.green
~Text.green_bright
~Text.green_dim
~Text.info
~Text.magenta
~Text.magenta_bright
~Text.magenta_dim
~Text.notify
~Text.print_white_on_red
~Text.red
~Text.red_bright
~Text.red_dim
~Text.render_to_buffer
~Text.warn
~Text.white
~Text.white_bright
~Text.white_dim
~Text.yellow
~Text.yellow_bright
~Text.yellow_dim





.. rubric:: Attributes

.. autosummary::

~Text.bg_color
~Text.fg_color
~Text.length
~Text.text


34 changes: 34 additions & 0 deletions docs/generated/pygamelib.base.Vector2D.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pygamelib.base.Vector2D
=======================

.. currentmodule:: pygamelib.base

.. autoclass:: Vector2D


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Vector2D.__init__
~Vector2D.from_direction
~Vector2D.length
~Vector2D.unit





.. rubric:: Attributes

.. autosummary::

~Vector2D.column
~Vector2D.row
~Vector2D.x
~Vector2D.y


23 changes: 17 additions & 6 deletions docs/source/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,21 @@
base
====

.. automodule:: pygamelib.base
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
The base module provide basic objects and exceptions that are used by the entire library.

.. toctree::

pygamelib.base.Math.rst
pygamelib.base.PglBaseObject.rst
pygamelib.base.PglException.rst
pygamelib.base.PglInvalidLevelException.rst
pygamelib.base.PglInvalidTypeException.rst
pygamelib.base.PglObjectIsNotMovableException.rst
pygamelib.base.PglOutOfBoardBoundException.rst
pygamelib.base.Text.rst
pygamelib.base.Vector2D.rst
base_deprecated

.. autoattribute:: pygamelib.base.Text

.. automodule:: pygamelib.base
:noindex:
18 changes: 18 additions & 0 deletions docs/source/base_deprecated.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. _base_deprecated-module:

base (deprecated)
=================

These are the deprecated objects of the pygamelib.base module. They should not be used
as they are going to be removed in future versions.

.. toctree::

pygamelib.base.HacException.rst
pygamelib.base.HacInvalidLevelException.rst
pygamelib.base.HacInvalidTypeException.rst
pygamelib.base.HacObjectIsNotMovableException.rst
pygamelib.base.HacOutOfBoardBoundException.rst

.. automodule:: pygamelib.base
:noindex:
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# -- Project information -----------------------------------------------------

project = "pygamelib"
copyright = "2019-2020, Arnaud Dupuis"
copyright = "2019-2021, Arnaud Dupuis"
author = "Arnaud Dupuis"

# The short X.Y version
Expand Down
5 changes: 2 additions & 3 deletions docs/source/pygamelib.base.HacException.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:orphan:

pygamelib.base.HacException
===========================
HacException
============

.. currentmodule:: pygamelib.base

Expand Down
5 changes: 2 additions & 3 deletions docs/source/pygamelib.base.HacInvalidLevelException.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:orphan:

pygamelib.base.HacInvalidLevelException
=======================================
HacInvalidLevelException
========================

.. currentmodule:: pygamelib.base

Expand Down
5 changes: 2 additions & 3 deletions docs/source/pygamelib.base.HacInvalidTypeException.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:orphan:

pygamelib.base.HacInvalidTypeException
======================================
HacInvalidTypeException
=======================

.. currentmodule:: pygamelib.base

Expand Down
5 changes: 2 additions & 3 deletions docs/source/pygamelib.base.HacObjectIsNotMovableException.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:orphan:

pygamelib.base.HacObjectIsNotMovableException
=============================================
HacObjectIsNotMovableException
==============================

.. currentmodule:: pygamelib.base

Expand Down
5 changes: 2 additions & 3 deletions docs/source/pygamelib.base.HacOutOfBoardBoundException.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:orphan:

pygamelib.base.HacOutOfBoardBoundException
==========================================
HacOutOfBoardBoundException
===========================

.. currentmodule:: pygamelib.base

Expand Down
8 changes: 6 additions & 2 deletions docs/source/pygamelib.base.Math.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
pygamelib.base.Math
===================
Math
====

.. currentmodule:: pygamelib.base

.. autoclass:: Math
:members:
:inherited-members:
:undoc-members:
:show-inheritance:


.. automethod:: __init__
Expand Down

0 comments on commit 967b55b

Please sign in to comment.