Scripts and functions used by other modules
Project metadata/configuration
Metadata and configuration for the project are stored in the .kicad_helpers_config
directory (including KiBot config files for producting manufacturing outputs via continuous integration). Additional metadata (e.g., project summary, website, and manufacturing details) is stored in the project's kitspace.yaml
file which makes it easy for other people to manufacture boards using https://kitspace.org/.
get_gitignore_list(root)
get_board_metadata(root)
get_board_metadata(root)
original_metadata = get_board_metadata(root)
# Test setting new metadata
new_metadata = {"title": '"new title"',
"date": '"new date"',
"rev": '"new rev"',
"company": '"new company"'
}
update_board_metadata(new_metadata, root)
assert get_board_metadata(root) == new_metadata
# Restore original metadata
update_board_metadata(original_metadata, root)
assert get_board_metadata(root) == original_metadata
get_schematic_metadata(root)
get_schematic_metadata(root, filename="switches_0-19.sch")
original_metadata = get_schematic_metadata(root)
original_metadata
new_metadata = {"Title": '"new title"',
"Date": '"new date"',
"Rev": '"new rev"',
"Comp": '"new company"'
}
update_schematic_metadata(new_metadata, root, all_sheets=True)
assert get_schematic_metadata(root) == new_metadata
assert get_schematic_metadata(root, "switches_0-19.sch") == new_metadata
# Restore original metadata
update_schematic_metadata(original_metadata, root, all_sheets=True)
assert get_schematic_metadata(root) == original_metadata
assert get_schematic_metadata(root, "switches_0-19.sch") == original_metadata