Requirements-as-code using Gherkin: Literate-wordle #658
Replies: 1 comment 1 reply
-
Hi Jb, Would it be okay for you to have 1-2 links to your project in our documentation? Thanks again for sharing this. I may come back to this after I had the chance to test your approach with Gherkin. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm Jb, long time fan of requirements-as-code, I keep pushing all my dev colleagues to ditch Word for docs-as-code.
I want to showcase a pet project that occupied my past few months, and while not directly about requirements, features them heavily.
Literate programming Wordle implementation
features/
folderThe idea was to showcase the software development process using BDD/TDD, with Gherkin for requirements gathering. I wanted to demonstrate what I wrote over multiple previous blog posts, using modern Python. I chose Wordle as topic, because it is simple enough to implement, but also needs a couple tricks of design to actually work. The need to narrate the development process led me to use literate programming for spinning a story around code being built.
The particular contribution of sphinx-needs was exporting each gherkin file under the
features/
folder as requirements. The file tracking was done in theconf.py
, homebrewed, with the sister package "sphinx-collections" transforming files detected into jinja2 template expansion of the form:e.g.
So the requirement object contains the code snippets themselves, and all this is automatic (any new file in the right folder would automatically expand into new requirement for that page). See the resulting requirements page matching Gherkin
features/
folder.So, yeah, I got the opportunity to showcase a creative way to bring together requirements-as-code (via sphinx-needs), and Gherkin/BDD, which was tons of fun to me.
Thanks again @danwos for releasing the package, and to useblocks as a whole.
I hope this minor "success story" of mine can help this project get the popularity it deserves.
Beta Was this translation helpful? Give feedback.
All reactions