gritql icon indicating copy to clipboard operation
gritql copied to clipboard

Watch mode for `grit patterns test`

Open morgante opened this issue 1 year ago • 9 comments

We would like to have a watch mode for grit patterns test --watch.

Watch mode should be similar to other testing/CLI tools that offer a watch mode: when files change, re-run tests.

Acceptance criteria

  • Watch mode should watch for file changes to any patterns in the .grit directory and automatically re-run those tests
  • If a file changes, only the affected patterns should be re-run. Ex. if I edit this file then only that pattern test should re-run.
  • You will also need to account for pattern dependencies. Ex. if https://github.com/getgrit/stdlib/blob/main/.grit/patterns/js/imports.grit is edited then any patterns which use the ensure_import_from pattern should be re-run. Utilities like this can be leveraged for walking the call graph
  • At least 2 tests should be included, including ideally at least one integration test of the final binary like we do here.

morgante avatar Mar 22 '24 03:03 morgante

/bounty $250

morgante avatar Mar 22 '24 03:03 morgante

💎 $250 bounty • Grit

Steps to solve:

  1. Start working: Comment /attempt #51 with your implementation plan
  2. Submit work: Create a pull request including /claim #51 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to getgrit/gritql!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🟢 @el-buku Mar 22, 2024, 12:42:53 PM WIP
🟢 @Sambit003 Mar 25, 2024, 9:57:36 AM WIP
🟢 @Ashu999 Apr 24, 2024, 6:18:34 AM #298

algora-pbc[bot] avatar Mar 22 '24 03:03 algora-pbc[bot]

/attempt 51

Options

el-buku avatar Mar 22 '24 12:03 el-buku

@el-buku any progress. still on this?

webbdays avatar Mar 22 '24 18:03 webbdays

For sure, started earlier I’ll open a draft PR

On Fri, 22 Mar 2024 at 20:58, Kunam Balaram Reddy @.***> wrote:

@el-buku https://github.com/el-buku any progress. still on this?

— Reply to this email directly, view it on GitHub https://github.com/getgrit/gritql/issues/51#issuecomment-2015726954, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMHPFISE5HI5JGNH4CYZ6TYZR5MFAVCNFSM6AAAAABFCTV6FSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVG4ZDMOJVGQ . You are receiving this because you were mentioned.Message ID: @.***>

el-buku avatar Mar 22 '24 19:03 el-buku

/attempt #51

Options

Sambit003 avatar Mar 25 '24 09:03 Sambit003

@Sambit003 @el-buku Hi there fellas,

Are you working on this? If yes, let me know if you interested in working togather. If no, I would like to attempt it.

Hope u have a nice day.

vivasvan1 avatar Apr 19 '24 18:04 vivasvan1

/attempt #51

Options

Ashu999 avatar Apr 24 '24 06:04 Ashu999

💡 @Ashu999 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

algora-pbc[bot] avatar May 01 '24 14:05 algora-pbc[bot]

@morgante Is this issue open to grab? Have some good approach in my mind to add --watcher with less code

varshith257 avatar Jul 08 '24 05:07 varshith257

@varshith257 No, this is already complete and I will award the bounty to @Ashu999. Feel free to open a PR with an improved approach if you have one in mind.

morgante avatar Jul 08 '24 05:07 morgante

@morgante It seems already PR is merged. How my work reflects it and rewarded?

varshith257 avatar Jul 08 '24 06:07 varshith257

@varshith257 You did no work for that PR. Why would you be rewarded for something you made no contributions to?

morgante avatar Jul 08 '24 06:07 morgante

@morgante I think we misunderstood. You said to open a PR with my approach. So that's I am asking for 😅

varshith257 avatar Jul 08 '24 06:07 varshith257

@varshith257 This is an open source repository, under a permissive license. If you have a superior approach, feel free to provide a PR. We will not be paying for every PR.

If you expect every single PR on every repo will be "compensated" you do not understand the ethos of open source.

morgante avatar Jul 08 '24 06:07 morgante

Hey @morgante I got you.There are some orgs bountied for multiple PRs as one the case here. So thought in that way. Ok, I will check @Ashu999 implementation and will propose my improvements 😄

varshith257 avatar Jul 08 '24 06:07 varshith257

PS: I have contributed to different organisations as OS Contributer. But it's now time to upgrade my old Windows 10 PC. So searching some cool bounties which I can get with them and buy it by my birthday on July 25(makes me confident of reaching my target too and get ahead of cracking further goals)

varshith257 avatar Jul 08 '24 06:07 varshith257

Thanks @varshith257, I appreciate your understanding. I'm also happy to awards tips for good contributions and will consider opening more bounties in the future.

morgante avatar Jul 08 '24 06:07 morgante

🎉🎈 @Ashu999 has been awarded $250! 🎈🎊

algora-pbc[bot] avatar Jul 08 '24 21:07 algora-pbc[bot]