-
Notifications
You must be signed in to change notification settings - Fork 127
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
Item templates #376
Item templates #376
Conversation
I am not sure what the diff failures mean in the CI tests? |
The make check failed. You need to run that command, which will run the black formatter and a command to sort the imports. Then check in those format changes. |
Thanks! Of course now that kicked |
I understand module size limits in functional code, but it seems a bit overkill in test files. |
Updated pylint ignores for that test based on the precedence of it being done in the items test suite. |
This looks like a duplication of the custom default values for attributes that was added recently, see #70 and #330. Related is a feature proposal #367. |
While I agree that this is a similar system at first glance, I believe that proposing something wholly owned by doorstop is the most prudent in this situation. Do not dismiss my gratitude for such an edenvenour though as my next conquest was that of the markdown system and how YAML and MD could support a more dynamic and supportive ecosystem. |
Hi, I think I like your way of thinking with the concept of "template", but for now I find it a bit in conflict with the work of #366. |
Sure. The documentation is pretty simple:
This will produce a new item with the next field populated by the contents of Alternatively, place a file called |
The intent is similar, but this is a more dynamic way of doing it. Alternatively moving to something that is more dynamic than just a single .doorstop.yml file would also be appropriate. The problem I am addressing is that different requirements have different fields by default, and being able to create a test requirement vs. a functional requirement with its default layout has more merit than one single default value. |
Any more thoughts on this? |
I don’t know what the others think, but in my opinion there should not be both implementations from 6c91fab and this PR. I personally prefer the way of this PR concerning the management of defaults values. Therefore, my suggestion is to revert 6c91fab in order to replace it by this new implementation. Note that the documentation for this PR should be present in Also note that this replacement would still be compatible with the feature from c8834c8 (reviewed extended attributes). I don’t know if an actual |
The existing support for default attributes is document-specific. I would not remove this feature. I think this commit series should be refactored to better use the infrastructure that is already in place. You can for example apply the command-specific default attributes after the document-specific default attributes with a second call to Item.set_attributes(). For the project-specific default attributes, I would add them to the top level |
With the include support you could simply place this into the settings:
...
attributes: !include template.yml In text: 'Your template text' |
You can find a proof of concept for the include feature here: |
Please check if #403 does what you need. |
Sorry, was away over the weekend. I'll try to get a look at it today. |
Yea that looks good, but I'd highly recommend describing in the documentation what a How does it differ from the defaults in the .doorstop file? It looks like it is functionally the same, but less clear on its usage, which has a been a problem in general with Doorstop documentation that I am getting reported by a number of people in my organization that are evaluating it right now. I'll close this PR for now. |
Intent is to allow for adding new items to pull templated text into the item from template files stored in the root of the project within a directory called
.doorstop
.This includes a default template and a new
--template
parameter todoorstop add
.Rationale: Too lazy to constantly copy and paste in the default template for requirement structure that my organization is using for every requirement (like subheaders for rationale, other requirement information).
Looking for recommendations on how templates should be added, the
.doorstop
directory is just something I came up with on the fly, and seemed reasonable.