Skip to content

Commit 3407254

Browse files
committed
update
brand new update 2.0
1 parent 997ca26 commit 3407254

File tree

228 files changed

+28408
-24145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+28408
-24145
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Detect Python code only from these folders
2+
src/** linguist-detectable=true
3+
test/** linguist-detectable=true
4+
5+
# Ignore documentation and build artifacts in language stats
6+
docs/** linguist-detectable=false

.github/workflows/python-package.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [ "3.10", "3.11", "3.12" ]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install flake8 pytest
31+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+
- name: Lint with flake8
33+
run: |
34+
# stop the build if there are Python syntax errors or undefined names
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
- name: Install package in editable mode
39+
run: pip install -e .
40+
- name: Test with pytest
41+
run: |
42+
pytest test/

.gitignore

Lines changed: 153 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,164 @@
1-
*.py[co]
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
25

3-
# Packages
4-
*.egg
5-
*.egg-info
6-
dist
7-
build
8-
eggs
9-
parts
10-
bin
11-
var
12-
sdist
13-
develop-eggs
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
develop-eggs/
12+
dist/
13+
downloads/
14+
eggs/
15+
.eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
wheels/
22+
share/python-wheels/
23+
*.egg-info/
1424
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
1533

1634
# Installer logs
1735
pip-log.txt
36+
pip-delete-this-directory.txt
1837

1938
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.nox/
2042
.coverage
21-
.tox
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*.cover
48+
*.py,cover
49+
.hypothesis/
50+
.pytest_cache/
51+
cover/
2252

23-
#Translations
53+
# Translations
2454
*.mo
55+
*.pot
56+
57+
# Django stuff:
58+
*.log
59+
local_settings.py
60+
db.sqlite3
61+
db.sqlite3-journal
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
.pybuilder/
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
# For a library or package, you might want to ignore these files since the code is
86+
# intended to run in multiple environments; otherwise, check them in:
87+
# .python-version
88+
89+
# pipenv
90+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
92+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
93+
# install all needed dependencies.
94+
#Pipfile.lock
95+
96+
# poetry
97+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
98+
# This is especially recommended for binary packages to ensure reproducibility, and is more
99+
# commonly ignored for libraries.
100+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
101+
#poetry.lock
102+
103+
# pdm
104+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
105+
#pdm.lock
106+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
107+
# in version control.
108+
# https://pdm.fming.dev/#use-with-ide
109+
.pdm.toml
110+
111+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
112+
__pypackages__/
113+
114+
# Celery stuff
115+
celerybeat-schedule
116+
celerybeat.pid
117+
118+
# SageMath parsed files
119+
*.sage.py
120+
121+
# Environments
122+
.env
123+
.venv
124+
env/
125+
venv/
126+
ENV/
127+
env.bak/
128+
venv.bak/
129+
130+
# Spyder project settings
131+
.spyderproject
132+
.spyproject
133+
134+
# Rope project settings
135+
.ropeproject
136+
137+
# mkdocs documentation
138+
/site
139+
140+
# mypy
141+
.mypy_cache/
142+
.dmypy.json
143+
dmypy.json
144+
145+
# Pyre type checker
146+
.pyre/
147+
148+
# pytype static type analyzer
149+
.pytype/
150+
151+
# Cython debug symbols
152+
cython_debug/
153+
154+
# PyCharm
155+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
156+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
157+
# and can be added to the global gitignore or merged into this file. For a more nuclear
158+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
159+
#.idea/
25160

26-
#Mr Developer
27-
.mr.developer.cfg
161+
.DS_Store
162+
.idea
163+
__pycache__
164+
src/PureMVC.egg-info

LICENSE

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
* PureMVC MultiCore Framework for Python (Ported) - Copyright © 2012 Daniele Esposti
2-
* PureMVC - Copyright © 2006-2012 Futurescale, Inc.
1+
BSD 3-Clause License
2+
3+
* PureMVC MultiCore Framework for Python - Copyright © 2025 Saad Shams
4+
* PureMVC - Copyright © 2025 Futurescale, Inc.
35
* All rights reserved.
46

57
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,60 @@
1-
## [PureMVC](http://puremvc.github.com/) Python MultiCore Framework
2-
PureMVC is a lightweight framework for creating applications based upon the classic [Model-View-Controller](http://en.wikipedia.org/wiki/Model-view-controller) design meta-pattern. This is a Python port of the [AS3 reference implementation of the MultiCore Version](https://github.com/PureMVC/puremvc-as3-multicore-framework/wiki). It supports [modular programming](http://en.wikipedia.org/wiki/Modular_programming) through the use of [Multiton](http://en.wikipedia.org/wiki/Multiton) Core actors instead of the [Singleton](http://en.wikipedia.org/wiki/Singleton_pattern)s used in the [Standard Version](https://github.com/PureMVC/puremvc-python-standard-framework/wiki).
1+
## [PureMVC](http://puremvc.github.com/) Python MultiCore Framework [![Python package](https://github.com/saadshams/puremvc-python-multicore-framework/actions/workflows/python-package.yml/badge.svg)](https://github.com/PureMVC/puremvc-python-multicore-framework/actions/workflows/python-package.yml)
32

4-
The unit tests are included in this repository.
3+
PureMVC is a lightweight framework for creating applications based upon the classic [Model-View-Controller](http://en.wikipedia.org/wiki/Model-view-controller) design meta-pattern. It supports [modular programming](http://en.wikipedia.org/wiki/Modular_programming) through the use of [Multiton](http://en.wikipedia.org/wiki/Multiton) Core actors instead of the [Singleton](http://en.wikipedia.org/wiki/Singleton_pattern)s used in the [Standard Version](https://github.com/PureMVC/puremvc-python-standard-framework/wiki).
54

6-
* [API Docs](http://puremvc.org/pages/docs/Python/legacy/multicore)
7-
* [Discussion](http://forums.puremvc.org/index.php?topic=2057)
8-
* [Overview Presentation](http://puremvc.tv/#P002/)
5+
* [PyPI Package](https://pypi.org/project/PureMVC/)
6+
* [API Docs](https://puremvc.org/pages/docs/python/multicore)
7+
* [Legacy Implementation](https://github.com/PureMVC/puremvc-python-multicore-framework/tree/1.0.1)
98

10-
## Status
11-
Production - [Version 1.0.1](https://github.com/PureMVC/puremvc-python-multicore-framework/blob/master/VERSION)
9+
# Installation
10+
11+
```commandline
12+
pip install PureMVC
13+
```
14+
<!---
15+
Development: pip install -e .
16+
Testing: pytest test/
17+
Build: python -m build
18+
Publish: python3 -m twine upload dist/*
19+
20+
Documentation: Generate
21+
mkdir docs && cd docs && sphinx-quickstart --sep -p PureMVC -a "Saad Shams" -v "2.0.0" -r "BSD 3-Clause License" -l "en"
22+
cd ../ && sphinx-apidoc -o docs/source src/puremvc && cd docs && make html && open build/html/index.html && cd ..
23+
24+
Documentation: Update
25+
sphinx-apidoc -o docs/source src/puremvc --force && cd docs && make html && open build/html/index.html && cd ..
26+
27+
conf.py
28+
import os
29+
import sys
30+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'src')))
31+
extensions = ['sphinx.ext.autodoc']
32+
html_theme = 'sphinx_rtd_theme'
1233
13-
## Screenshot
14-
![PureMVC Python MultiCore Unit Tests](http://puremvc.org/pages/images/screenshots/PureMVC-Shot-Python-MC-UnitTests.png)
34+
index.rst
35+
13: modules
36+
-->
37+
38+
## Status
39+
Production - [Version 2.0](https://github.com/PureMVC/puremvc-python-multicore-framework/blob/master/VERSION)
1540

1641
## Platforms / Technologies
1742
* [Python](http://en.wikipedia.org/wiki/Python_(programming_language))
43+
* [NumPy](https://numpy.org)
44+
* [Pandas](https://pandas.pydata.org)
45+
* [TensorFlow](https://www.tensorflow.org)
46+
* [PyTorch](https://pytorch.org)
47+
48+
## Reference
49+
50+
* [PythonWheels](https://pythonwheels.com)
51+
* [Classifiers](https://pypi.org/classifiers/)
52+
* [Sphinx Documentation](https://www.sphinx-doc.org/en/master/index.html)
53+
* [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html)
1854

1955
## License
20-
* PureMVC MultiCore Framework for Python (Ported) - Copyright © 2012 Daniele Esposti
21-
* PureMVC - Copyright © 2006-2012 Futurescale, Inc.
56+
* PureMVC MultiCore Framework for Python - Copyright © 2025 [Saad Shams](https://www.linkedin.com/in/muizz/)
57+
* PureMVC - Copyright © 2025 [Futurescale, Inc.](http://futurescale.com/)
2258
* All rights reserved.
2359

2460
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

VERSION

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
1-
PureMVC MultiCore Framework for Python (Ported)
2-
--------------------------------------------------------------------------
3-
Release Date: 20/02/2013
4-
Platform: Python 2.5+
5-
Version: 1
6-
Revision: 0
7-
Minor: 1
8-
Authors: Toby de Havilland <[email protected]>
9-
Daniele Esposti <[email protected]>
1+
PureMVC MultiCore Framework for Swift
102
--------------------------------------------------------------------------
11-
1.0.1 - * Renamed 'noteType' keyword in Notification's constructor to 'type'
12-
for consistency
13-
14-
1.0.0 - * Official PureMVC.org release
15-
16-
0.3.2 - * Added unit test for non-null values in Proxy's constructor
17-
* Fixes in unit tests code to support Python 2.5
18-
19-
0.3.1 - * Fixed fabric test() task and added task's descriptions
20-
* Fixed class inheritance where some classes inherit twice from the
21-
same interface
22-
* Improved docs strings
23-
* Added missing tests in the unit test list
24-
* Facade.getInstance() returns a new instance of the current class
25-
instead of a base Facade class
26-
* The 'body' argument in sendNotification() methods is always optional
27-
* Proxy class should call it's superclass in the constructor
28-
29-
0.3.0 - Renamed main package from puremvc_mc to puremvc
30-
31-
0.2.1 - Made code PEP8 compliant
32-
33-
0.2 - Improved unit test to cover multicore features
34-
35-
0.1 - Initial project port from AS3 code
3+
Release Date: 05/15/25
4+
Platform: Python 3
5+
Version: 2
6+
Revision: 0
7+
Minor: 0
8+
Author: Saad Shams <[email protected]>
9+
--------------------------------------------------------------------------
10+
2.0 - Brand new implementation of ported code, equivalent to AS3 MultiCore Version 1.0.5.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 commit comments

Comments
 (0)