-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readme rework draft #163
Readme rework draft #163
Conversation
README.rst
Outdated
@@ -1,6 +1,7 @@ | |||
tractor | |||
======= | |||
A `structured concurrent`_, async-native "`actor model`_" built on trio_ and multiprocessing_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good to me. If I were you, I'd want to decouple my pitch for tractor from multiprocessing
, and leave that as an implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryanhiebert it links to wikipedia not the stdlib; so it's in reference to actual muli-processing as an OS usage pattern.
Not sure if that was clear. Maybe multi-processing (with the dash) makes that more clear?
If you just mean that not focusing on it being implemented with multiple processes (since in theory we could somehow move to a threading system eventually?) then definitely worth considering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was thinking it was about the stdlib module. The dash would make more sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the plan is to move entirely off the stdlib module asap.
The only thing blocking that is #146 for which I'd like to keep the stdlib stuff to compare against.
@ryanhiebert btw there's a matrix room now for the project if you feel like joining us. |
b5cac1f
to
e637d9d
Compare
I think I figured out we can make a pretty simple "worker pool" example to address the first todo once #69 comes. Something along the lines of a round-robin request-response pool; real simple. Just sticking this comment as reminder for meself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed README updates look good to me, thanks @goodboy !
I want to come back and try the examples and a bit more in the coming weeks on Windows 😃
tractor/to_asyncio.py
Outdated
try: | ||
import uvloop | ||
loop = uvloop.new_event_loop() | ||
asyncio.set_event_loop(loop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but the helper uvloop.install()
exists. I'm unsure of any actual difference, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks v gtk.
README.rst
Outdated
or simply as a replacement for the stdlib's `multiprocessing` but built | ||
on async primitives for IPC. | ||
|
||
``tractor``'s nurseries lets you spawn ``trio`` *"actors"*: new Python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nitpicky, but I think nurseries let you
(instead of lets
) is the correct grammar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure this is fixed now.
README.rst
Outdated
----------------- | ||
- Infinitely nesteable process trees | ||
- A built-in API for inter-process streaming | ||
- A (first ever?) "native" multi-core debugger for Python using `pdb++`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited to try this soon!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
Further things todo:
EDITmoving these to above list. |
96daab2
to
dd6271c
Compare
For the worker pool example I'm thinking we might as well re-do the |
900654e
to
6d03000
Compare
6d03000
to
df750a1
Compare
f0a3b66
to
91d34c2
Compare
Latest. hopefully final rework is up! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from the trio room on Matrix: I was wrong about the empty line after the headings though.
.. code:: python | ||
|
||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the reST specs,
Several constructs begin with a marker, and the body of the construct
must be indented relative to the marker.
where in this case, the code-block
(I can't seem to find code
even in Sphinx-flavored reST) body should be indented by 3 space. I believe that the editor picked this up and caused some indentation issues below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh so you mean after the ..
there should be 3 spaces before the code::
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, e.g.
.. code-block:: python
"""
...
async def target():
try:
...
BTW could you please hide the resolved reviews, my international connection is terrible due to cable maintenance or something and GitHub's way of fetching content really does not help 😄
docs/README.rst
Outdated
await trio.sleep_forever() | ||
|
||
|
||
async def main(): | ||
|
||
async with tractor.open_nursery() as n: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Fixing all this.
docs/README.rst
Outdated
if __name__ == '__main__': | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well.
@guilledk yeah not sure what's going on with that worker pool link. |
docs/README.rst
Outdated
is ``tractor``'s IPC! | ||
|
||
|
||
.. _concurrent_actors_primes: https://github.com/goodboy/tractor/blob/master/examples/parallelism/concurrent_actors_primes.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guilledk not sure why it's not working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be it:
https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#use-custom-link-text
Do not include a space between the last word of the link text and the opening angle bracket for the anchor text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol nope nm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah no idea. The code looks right -> seems to be some GH thing.
1626fae
to
82ba680
Compare
Lol, well turns out CI did in fact find a bug due to #185. It appears that I'm going to pull out the commit that introduced this change to the debugging example, move that history to a new branch + PR along with changes to port all the debugging examples to the new API. |
a347804
to
14ac7a9
Compare
Thanks to @richardsheridan for many suggestions!
Check the rendered version.
TODO:
a definitive example once Allow passing function refs to Portal.run() ? #69 lands
[ ] the equivalent output fromwe stuck the command in the examples which I think is good enough for now.$TERM -e watch -n 0.1 "pstree -a $$" & python examples/parallelism/we_are_processes.py && kill $!
- [ ] maybe adeferred to Should we add a .gif to the readme? #199.gif
of the above bullet?Do we need the gifs?
I'm fine to add them later if peeps insist.
Defer to "branding" PR?:
- [ ] someone to pump ourdefer to Pump eet? #2.dev0
release somewhere (cuz I ain't doin it)Defer to docs rework PR (the readme should be simple)
- [ ] add some process tree diagrams using both something like mermaid.io and output fromdeferred to #157pstree
?