forked from viblo/pymunk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO.txt
72 lines (60 loc) · 3.78 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
v6.x
----
- Think about experimental repr of Body
- Get inspiration of examples and debug drawing from here: https://github.com/liabru/matter-js
- add better example benchmark for threaded solver
- automatic test build of android apk
- cleanup implementation of autoexample sphinx extension
- pickle: fix shape id
- make example of good timestep handling
- update most example code to use shape.density or shape.mass instead of
body.mass and moment.
- maybe it would be good to use pip install pymunk[docs] or something to distribute docs and examples?
- make running examples with python -m pymunk.examples... somehow. See pybox2d for inspiration
- make running docs with python -m pymunk.docs... somehow. See pygame for inspiration
- can autosummary be used? (see stackoverflow answer)
- tests of py2exe/pyinstaller/cx_freeze?
- make example where a container is used for a complex shape such as car: https://stackoverflow.com/questions/55146932/grouping-without-collision-adding-and-removing-multiple-bodies-and-polygons-i/55150431#55150431
- Update docs with collision chapter. ShapeFilter, collision callbacks and such
- use env variables for pymunkoptions, like pygame https://stackoverflow.com/questions/56258942/is-there-an-environment-variable-to-disable-pymunk-chipmunk-from-printing-loadi
- Write in docs about troubleshooting more prominent, and that its good to consider the properties on constraints like max_force
- Add Check that its not allowed to change body of shape added to space
- Make sure there's a check to see that the bodies of a constraint are added to space before constraint is added
- Add TKInter util module
- Add a CITATION.cff file https://github.com/citation-file-format/citation-file-format http://citeas.org/cite/pymunk
- Update demos to not use positive_y_is_up hack except in a single case.
- Write something about the usage of logging.debug logs somewhere.
- Made docstrings appear in documentation for class & instance variables like Body.DYNAMIC
- Update benchmark
- Update get_vertices doc to use body.local_to_world shorthand to conv.
- Package pymunk for Pyodide
- Add Canvas util module (after pyodide)
v7+ (all potentially breaking changes)
---
- Think about split between pymunk.util and pymunk modules
Typing a existing project - learnings
-------------------------------------
General
- Typing is recent addition, and many useful things are only available in very recent versions.
E.g. Literal is only in Python 3.8 and later.
mypy
- problems with bugs / missing features in mypy
- in implementation of Vector class: __add__ vs __radd__ https://github.com/python/mypy/issues/9388
- in allowing both vec2d and tuple/list: setters cant have different type from getter https://github.com/python/mypy/issues/3004
- __path__ not supported in packages. https://github.com/python/mypy/issues/1422
- problems with bugs / missing features in pyright
- differences in what is allowed between mypy and pyright/pylance.
- https://github.com/microsoft/pyright/issues/992
- The Pyright maintainer is super quick to respond, fix and release fixes for bug reports!
- Mypy issues feels slower to actually act on issues (But issue tracker is also very fast to
respond, and have GvR actively replying to many issues).
pyright
- Strange & unintuitive rules, such as type requirements for __add__ not the same as those of + (pyright)
https://github.com/microsoft/pyright/issues/992
Notes
-----
When freeing an object you do have to be careful that nothing else has a reference to it (dangling pointers).
Shapes and joints have a reference to the bodies they were attached to, so you have to free them before the
bodies that they reference.
Similarly, don't free a shape, joint or body before removing it from a space.
Unless I'm forgetting something, those are really the only gotchas.