Skip to content

Commit

Permalink
Add comments to generated files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Sep 3, 2020
1 parent f5ad3cb commit a6fa705
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/99-appendices/04-entity-table.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
This file is autogenerated based on the src/schema. DO NOT EDIT DIRECTLY.
Follow https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md#updating-the-schema
-->
# Appendix IV: Entity table

This section compiles the entities (key-value pairs) described throughout this
Expand Down
4 changes: 4 additions & 0 deletions src/99-appendices/09-entities.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
This file is autogenerated based on the src/schema. DO NOT EDIT DIRECTLY.
Follow https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md#updating-the-schema
-->
# Appendix IX: Entities

This section compiles the entities (key-value pairs) described throughout this
Expand Down
8 changes: 8 additions & 0 deletions tools/bids_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ def save_entities(schema_path, out_file):
schema = load_schema(schema_path)
entities = schema['entities']
intro_text = """\
<!--
This file is autogenerated based on the src/schema. DO NOT EDIT DIRECTLY.
Follow https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md#updating-the-schema
-->
# Appendix IX: Entities
This section compiles the entities (key-value pairs) described throughout this
Expand Down Expand Up @@ -409,6 +413,10 @@ def save_entity_table(schema_path, out_file, entities_file='09-entities.md'):
tables = make_entity_table_markdown(schema_path)

intro_text = """\
<!--
This file is autogenerated based on the src/schema. DO NOT EDIT DIRECTLY.
Follow https://github.com/bids-standard/bids-specification/blob/master/CONTRIBUTING.md#updating-the-schema
-->
# Appendix IV: Entity table
This section compiles the entities (key-value pairs) described throughout this
Expand Down

1 comment on commit a6fa705

@yarikoptic
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- besides that I would have defined and reused a constant within bids_schema.py -- I dislike duplication ;-)

Please sign in to comment.