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

Generalize Group-By glossary processing. #58

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dgou
Copy link
Contributor

@dgou dgou commented Jul 22, 2023

Follow on to PR #56

Place to have discussion for how the new group-by-step-name functionality can be generalized so that things aren't hard coded in so many places.

Missed this in review of last PR.
@dgou
Copy link
Contributor Author

dgou commented Jul 22, 2023

@mrkaiser I opened this as a draft as a better place to have the discussion about how to generalize the glossary processing.

@dgou
Copy link
Contributor Author

dgou commented Jul 22, 2023

Early morning Saturday pre-coffee brain dribblings...

So my thoughts on this are that the glossary processing is kind of messy right now with parts of it in writer.py and parts in glossary.py
And if we would add another glossary option (such as being able to group by "interesting" words in the step definition, such as, say, could be configured, so I could see all the "login" related steps together regardless of the step type), we'd have to keep more glossary dicts to update in writer and then more in glossary.
That is to say, the way the code evolved, knowledge about the glossary organizational mechanism leaked out.
My thought is to add another class to glossary.py to handle that logic, so that writer.py doesn't have to know how the glossary is being constructed (and also so it doesn't build glossaries that we aren't actually going to use).

To paint a picture in words:

  1. have classes in glossary.py that would encapsulate the logic of how to add a step to themselves. This would encapsulate what is now the logic in writer.py for adding steps.
  2. based on the command line parameters the desired glossary class would be instantiated and passed to whatever functions care about the glossary - this would replace the exported globals from glossary.py
  3. Having '1' means we can even define a glossary class that would permit multiple glossary types to be emited in the same build, so I could have both the 'group by steps' and a 'group by concept' if I wanted to, simply by defining a new class that would contain both of those and forward to them both.

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.

1 participant