Skip to content

Latest commit

 

History

History
138 lines (100 loc) · 4.02 KB

README.md

File metadata and controls

138 lines (100 loc) · 4.02 KB

design-patterns-python

CI Periodic safety check License MIT

A collection of design patterns in Python.
Source codes are independently rewritten from the Mr. Hiroshi Yuki's book (増補改訂版Java言語で学ぶデザインパターン入門) that is mentioned in Java.
Therefore, This repository is not described the detail of the process not to infringe on his writings and interests.

How to run

Just running individual tests by pattern.

$./run.sh <pattern>

# Example)
./run.sh observer

Example

example

Built With

  • pydantic: Data validation and settings management using Python type hints
  • multimethod: Multimethod provides a decorator for adding multiple argument dispatching to functions
    • using for overload
  • matplotlib: A comprehensive library for creating static, animated, and interactive visualizations

Development only

Getting Started

Prerequisites

  • pyenv: Python Version Management
  • poetry: Dependency Management for Python
  • make: Build tool
  • GUI
    • Because of tkinter (GUI Application)

Installing

# install python 3.9.11 with pyenv
$ pyenv install 3.9.11

# install dependencies
$ poetry install

# activate virtual environment
$ source .venv/bin/activate

Running the tests

$ make test

Deployment

  • -

Versioning

We use SemVer for versioning

Authors

License (Mr. Hiroshi Yuki)

Quoted from the source codes attached to the book.

MIT License

Copyright (c) 2001,2004 結城浩 / Hiroshi Yuki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.