Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Finding the right home for community examples #1442

fpliger started this conversation in General
Discussion options

The topic of "where do we host and cherish community examples" has been around for a while and we should decide what to do and the best place to handle it.

The goal of this discussion is to raise the topic again, understand why this discussion is important, what tools we have to "make it work", and where to go next.

What's the goal of examples in the main core repo?

There are 2 main reasons why we have examples in the main core codebase:

  1. Showcase some core functionality and examples that capture use cases that exercise features and supported packages that are representative of a significant amount of users or indirectly exercise internals that we want to make sure just "work"
  2. Be a baseline for our core tests in order to exercise more complex use cases and reduce the number of regressions when we merge PRs

Why it's a problem to merge additional examples [from non core maintainers]

The main problem is that, once the code is merged, it's the core maintainers responsibility to maintain and make sure that code works as we develop new features and make changes. The more we merge, the more work for core developers. Once we merge an example we are basically accepting potential tech debt that might emerge in the future.

An additional issue is that many new examples are similar to examples that already exist in the codebase or that exercising the same internals of the previous examples and, hence, not as effective as a tool to ensure item 2 in the reasons we have examples above.

What's the current state?

The reality is that, right now, there's now "cozy home" for the examples. The effort started with the pyscript-collective was to create a repo that would be created and maintained by the PyScript community and would focus on collecting curated material (in the form of examples, tutorials, articles, etc..) but effectively, it stalled.

What should we do?

I think there's a lot of value in having a place for the community to gather and maintain an examples catalog as well as tutorials. Imho, there's a lot of value in that but it also requires some effort from the community to maintain it. Ideally, the more we can automate, the better.

I'd love to see if we can make a lot of the effort be automated. For instance:

  • have a clear description of the process to merge and maintain new examples
  • reuse some of the core tests boilerplate that we have to add automated tests for examples
  • have labels that show the state of the examples for different versions of PyScript, if they work and what not

Ideally, I'd love to see the community curate those examples and always make sure that they are up to date and of great quality but that requires commitment from people and I (we) can't guarantee that. The list above tries to at least add visibility to that and make curators' lives easier.

Finally, I think the best option is to leverage pyscript.com and have examples hosted there. The question is, do we want to have a repo where people curate and merge examples to, and these examples are automatically deployed to a PyScript Collective Examples account or do we want to go with a different proposal/flow?

Would love to hear other thoughts or alternative proposals and finally make a concrete step towards a clear path.

You must be logged in to vote

Replies: 7 comments 17 replies

Comment options

fpliger
May 2, 2023
Maintainer Author

Another option is that all we do is just to just keep a list of interesting/community examples and let all of that be self maintained by the authors.

The downside of that is that it's harder to curate things and make sure examples are not broken or outdated.

You must be logged in to vote
8 replies
Comment options

So far there is always either some other test failure with the same cause that is much easier to understand or it's a flake.

Comment options

fpliger May 2, 2023
Maintainer Author

Ah, yeah. These are good to capture and eventually move elsewhere as well if it makes sense.

Comment options

Personally, I think this (a list of links to community examples) is a thing we should promote. It's relatively low-lift for the maintainers, and is a relatively easy catch all for "Hey neat thing! Go submit it to the community list over here!"

I think we should discuss this in addition to deciding what to do with examples that are in the main codebase.

The toga example has been broken for awhile too.

Comment options

Finally, I think the best option is to leverage pyscript.com and have examples hosted there. The question is, do we want to have a repo where people curate and merge examples to, and these examples are automatically deployed to a PyScript Collective Examples account or do we want to go with a different proposal/flow?

I think an alternative proposal/flow would be better on people learning python and using PyScript. Maybe some basic checks to keys and such would be required. Also, if users could tag or classify their examples, it would help as the examples grow.

A list may work at the start, but are there any plans to make a "collection" page that would be searchable on pyscript.com?

Comment options

fpliger May 24, 2023
Maintainer Author

@bkrayfield sorry, I missed your comment...

That was in the scope of https://github.com/pyscript/pyscript-collective but I think there was a lot going on and it got in the way.

Comment options

Finally, I think the best option is to leverage pyscript.com and have examples hosted there.

To me this is the best way to go but my thoughts can be summarized as such:

  • we don't want to test examples if these are community examples ... it's not our responsibility and it causes friction to whoever would like to just showcase PyScript for this or that specific case
  • the rest of the Web write demos / examples in codepen or any other fully public and free space ... pyscript.com provide all the tools already to create awesome examples and we should make it simple for anyone to create these PyScript examples. This means we should really publish on npm our project and let anyone integrate it with ease anywhere they like and, if that's pyscript.com, it's even better but it shouldn't be the only way to demo PyScript (npm also automatically translates into multiple CDNs to grab the project, not just one)
  • there are repositories maintained by the community with links to all the things ... one example when picking a CSS lib for VP was https://github.com/troxler/awesome-css-frameworks but there are many others and it should be the go-to page for examples. Since PRs will likely arrive from contributors, it's also contributors duty to keep these demo alive but it takes little effort to file an issue saying a link is broken and it shouldn't be hard on us to address those issues
  • beside a CoC Idon't think we should create any friction in submissions ... a template with a link and a quick description should be all it takes to review and merge new entries

Maybe I am making this easier than it is but if create any unnecessary friction developers don't care dealing with in the wild (see code pens, builder.io or any other) we'll simply receive less examples to showcase and the repo will stall in purpose and usefulness.

Also +1 to what hood said around tests but that's probably worth a specific discussion beside this one.

You must be logged in to vote
7 replies
Comment options

fpliger May 4, 2023
Maintainer Author

@hoodmane not sure which examples you are referencing to. The ones we keep in core or community-created ones (and very likely hosted elsewhere)? If you me the latter, I don't think they are release blocker (for most 99% of the time), if you mean the former, I do think they are release blockers.

Comment options

@fpliger My feeling is we don't really disagree on anything here.

Comment options

I was referring to the ones we keep in core.

Comment options

I really want to make sure our community has almost 0 friction when it comes to contributing and sharing examples

which is what I wrote too? 🤔

it really sucks, from a user wanting to check out examples and learn perspective, to find examples that are old and outdated

we can automate in CI url crawling and file issues when these are 404s ... I am not sure what you are otherwise suggesting.

Comment options

fpliger May 10, 2023
Maintainer Author

I really want to make sure our community has almost 0 friction when it comes to contributing and sharing examples

which is what I wrote too? 🤔

Oh wow, @WebReflection , I meant "I don't necessarily disagree" and not "agree"!! 🤦

it really sucks, from a user wanting to check out examples and learn perspective, to find examples that are old and outdated

we can automate in CI url crawling and file issues when these are 404s ... I am not sure what you are otherwise suggesting.

Yeah. Was thinking mainly that + interpreter tracebacks/console errors that clearly mean the app is broken or something similar. Basically the bare minimum amount of checks that signal that the app at least runs.

Comment options

It took me a while to give my 2cents here, but here goes.

Collective

I think partly of the reason why the collective didn't get more traction was caused by me being busy with other things since I told Paul that I would help there. The collective still feels like a great way for us to curate examples and let folks contribute to pyscript but there are a couple of things that I am concerned:

  • The maintenance of an example relies on the maintainers of the collective
  • We have a very strict policy to get an example merged, and we have pushed some changes to a contributor PR to make it in the style we want plus writing tests

Perhaps we should be less strict on the contributions, obviously, we want the examples to be of good quality and have tests so we know they work, but it feels like we may need to have a bit of balance, maintainers can't do it all.

Should we revisit the collective again and perhaps decide on a loose structure for it? @pauleveritt is likely to have some thoughts here.

I think an alternative proposal/flow would be better on people learning python and using PyScript. Maybe some basic checks to keys and such would be required. Also, if users could tag or classify their examples, it would help as the examples grow.

I like that idea, we could tag examples with beginner, intermediate, advanced or something 🤔

Awesome lists

there are repositories maintained by the community with links to all the things ... one example when picking a CSS lib for VP was https://github.com/troxler/awesome-css-frameworks but there are many others and it should be the go-to page for examples.

We currently do have an awesome list in the collective and after our last community call, I created this PR in pyscript.net but it still waiting for a merge.

Perhaps we could start with an Awesome List where folks could contribute their projects, tutorials and talks to the list and if they wish the contributors could use pyscript.com to host their projects - we probably just need to have a good PR issue or readme telling users how to host their projects if needed.

I guess the takeaway from this is that we probably should meet up (community call?) and decide what we want to do with examples and contributions because it's clear we do have users that would like to contribute to the project by sharing their creations.

You must be logged in to vote
0 replies
Comment options

fpliger
May 10, 2023
Maintainer Author

Perhaps we could start with an Awesome List where folks could contribute their projects, tutorials and talks to the list and if they wish the contributors could use pyscript.com to host their projects - we probably just need to have a good PR issue or readme telling users how to host their projects if needed.

I think that's a good starting point that would move us a bit closer to the final goal without having to pick the home for examples yet (which, I know, is the core of this discussion 😅 ). +1

  • The maintenance of an example relies on the maintainers of the collective
  • We have a very strict policy to get an example merged, and we have pushed some changes to a contributor PR to make it in the style we want plus writing tests

Perhaps we should be less strict on the contributions, obviously, we want the examples to be of good quality and have tests so we know they work, but it feels like we may need to have a bit of balance, maintainers can't do it all.

That really is the core of the matter.

Maybe you are right and would be beneficial to have a community call on the matter... let's try to have one soon then!

You must be logged in to vote
1 reply
Comment options

I'm up for any direction you'd like to go and will do whatever work you'd like.

Comment options

Apologies for an OT fanboy moment, but... @WebReflection it's wonderful being in a thread with you. I spent last summer, at a beach on northern French coast, reading all your stuff. Repeatedly. And imagining how to project your ideas into a Python-based SSG. I'd say Ryan Carniato and you are the two I've studied the most. Thanks for your years (decades?) of web platform advocacy.

You must be logged in to vote
1 reply
Comment options

blushing for real, too kind of you @pauleveritt , thanks a lot and glad you found whatever it was interesting ... I often just rant but definitively I do care about the Web since about ever and it's very rewarding to know somebody found my stuff any useful 😊

Comment options

fpliger
May 24, 2023
Maintainer Author

Ok... Trying to move this discussion forward to a point that we can actually agree on something and turn that into action items.

From the conversations, I feel like there is overall convergence towards:

  • a collective that maintains and curates a set of examples and a curated list of external examples is a good thing 👍
  • we don't want to keep the current examples tests in the same "core" tests suite
  • we don't want to keep and maintain most [if not all] of the examples in core
  • we still want to be able to run examples tests before we release, for overall visibility on how a release may impact users code, but we don't want to keep it as part of the process of merging every PR. A nightly or before-release cadence and possibly as part of some automation outside of the core codebase should do

In addition to these, I'd also like to propose the following (not necessarily discussed before, so I'm separating these in their own list):

  • we create a "PyScript Collective" account on pyscript.com that can be used to share and manage all the examples curated by the collective (directly tied into the first item of the list above)
  • We automate the process of updating projects on pyscript.com once they have been updated on the pyscript-collective Github Repo via a GH action and the pyscript.com CLI
  • we change the examples page on pyscript.net/examples to point directly to the pyscript.com examples mentioned in the item above. (alternatively, if pyscript.com is advance enough to support it, we can also just point to the "PyScript Collective" profile page and replace the OSS Examples page completely
You must be logged in to vote
0 replies
Comment options

FYI, create a new repo as a container for community examples, maybe is a good idea, community examples can be used as a reference and maintained by the author; I think there are only a few examples available now.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /