statelyai / xstate-python

XState for Python
MIT License
177 stars 18 forks source link

Wanting to contribute. #29

Closed JovaniPink closed 3 years ago

JovaniPink commented 3 years ago

👋

I'm looking to contribute to xstate-python python package and wanted to introduce my intentions for review.

  1. Update README
    • Be on a par with XState https://github.com/davidkpiano/xstate.
    • Contextualize content to welcome the use of the library.
    • Outline Documentation following some XState examples.
    • Move Testing and SCXML to doc or contributing.md.
  2. Update Folder Structure (This is a major category to work in linters & formatters)
    • Keeping .vscode then we have to rework the settings.json to take into account the user.
    • Let us go all the way and add launch.json to lower the barrier to test and debug.
    • Add standard virtual env, deps, typing, linting, and formatting.
    • Start thinking of this project as a python package in the python community - documentation :).
  3. Documenting Code
    • Docstring to get to know the library.

Cheers!

davidkpiano commented 3 years ago

That would all be greatly appreciated, thanks in advance @JovaniPink!

Another thing I'd like to focus on is a more Pythonic API, if you have any ideas around that.

albert-mathews commented 3 years ago

Hello, maybe this is the wrong place, but I'm trying to get a feel for the maturity of this project. is it "almost done' or "we just got started", maybe somewhere in the middle?

reading https://github.com/davidkpiano/xstate-python/blob/master/xstate/algorithm.py I noticed that there is some copy paste from https://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation

is the intention to eventually mirror all functionally of scxml? Sorry for the dumb question, I have no knowledge of Xstate(TypeScript)

@JovaniPink do you have a branch that is worth me checking out?

thanks

davidkpiano commented 3 years ago

Hello, maybe this is the wrong place, but I'm trying to get a feel for the maturity of this project. is it "almost done' or "we just got started", maybe somewhere in the middle?

It's somewhere in the middle. The algorithm is in place (not copy-paste; implemented in Python) - just need to add more tests, docs, etc.

JovaniPink commented 3 years ago

I’ve been using the code for some automation projects in python and worked fine using the OG Xstate docs.

I have a local branch started let me find some time next week. David jinxed me right when I wanted to help I was tasked some SQL reporting projects.

davidkpiano commented 3 years ago

I’ve been using the code for some automation projects in python and worked fine using the OG Xstate docs.

I have a local branch started let me find some time next week. David jinxed me right when I wanted to help I was tasked some SQL reporting projects.

Sorry about that! 😅

NixBiks commented 3 years ago

Another thing I'd like to focus on is a more Pythonic API, if you have any ideas around that.

I just want to understand your goal better. Do you mean to replace Machine({...}) with a more pythonic API?

I assume you still want to be able to do something like that, e.g. Machine.from_object({ ... }) (easily shareable between languages), but also the opportunity to build the machine in a more pythonic way.

davidkpiano commented 3 years ago

Another thing I'd like to focus on is a more Pythonic API, if you have any ideas around that.

I just want to understand your goal better. Do you mean to replace Machine({...}) with a more pythonic API?

I assume you still want to be able to do something like that, e.g. Machine.from_object({ ... }) (easily shareable between languages), but also the opportunity to build the machine in a more pythonic way.

Yes, or some sort of "builder-ish" syntax, like what transitions does: https://pypi.org/project/transitions/

NixBiks commented 3 years ago

alright but isn't the idea that we should be able to use the exact same json string in any supported language to represent a machine?

And then focus on language specific API's once that's ready?

davidkpiano commented 3 years ago

alright but isn't the idea that we should be able to use the exact same json string in any supported language to represent a machine?

And then focus on language specific API's once that's ready?

Yes, that should be the goal. We can defer creating a Pythonic API until then.

NixBiks commented 3 years ago

I think we can close this in favour of issue #32, #33, #35, #36, #37 and #38

@JovaniPink would love to get all your inputs and contributions. A lot of your original suggestions have just been addressed.

I want to address #35 next which should help with the documentation and understanding of what's going on in the code