Skip to content
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

Adds samples #319

Closed
wants to merge 3 commits into from
Closed

Adds samples #319

wants to merge 3 commits into from

Conversation

stebbi
Copy link
Contributor

@stebbi stebbi commented May 21, 2020

Hi there, I picked one of your issues as an example for me to familiarize myself with the Github pull requests workflow, perhaps these samples can be useful for someone. Thanks for the library - I've used if a fair bit and it is very nice. Cheers - Stefan

@ajoberstar ajoberstar changed the base branch from master to main September 19, 2020 18:52
@ajoberstar
Copy link
Owner

Again, sorry for the delay and thanks for the interest in contributing. I'm still pondering this one, since I'm not sure how I want to support samples. Main issue being ensuring they still work as changes are made to the library. As a manual step, there's a likelihood I'll forget to run them again.

@ajoberstar ajoberstar changed the title Closes #204 Adds samples Sep 19, 2020
@stebbi
Copy link
Contributor Author

stebbi commented Oct 9, 2020

Hi, yes, understood, I have the same problem in my projects - I tend to like samples as the quickest way to pick up a new tool, so I've dealt with this by extending my builds to finalize the test task by running the samples. I don't know if that would work for you but, I do it roughly like so:

  1. Master build includes a statement similar to test.finalizedBy(':samples:runAll')
  2. Samples directory contains build.gradle with individual GradleBuild tasks for the samples
  3. The samples build file also defines the runAll task with dependencies on the individual sample tasks

I also tend to like to have self-checks in each sample, this can serve as a way to document what exactly the sample is trying to do. Once those are included, the master build effectively checks that the samples still work.

This is only a few lines of code, let me know if you'd like me to add that to the PR. The pattern is a little bit pedestrian maybe, but very simple, and has worked out alright for me.

@rusefillc
Copy link

@stebbi poke :)

@ajoberstar
Copy link
Owner

Apologies for not finding a way to make this work, but given the current state of the project adding samples will just increase the maintenance burden, so I'm going to close this. Thank you for the initial effort!

@ajoberstar ajoberstar closed this Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants