Skip to content

Commit 6511aad

Browse files
committed
Add file to auto-generate graph objects.
Previously, we generated these *on import*, which is slow and it’s a little sneaky. Users end up using classes that are not actually written *anywhere* in our package. Now that we only update the plot schema in version releases (no longer on import), we can also just programmatically add in all the graph obj classes. Instead of adding them to memory, we literally just print them to the file. This is some serious meta-programming… but, the resulting file will have to be syntactically valid and pass our test suite, so I’m not *too* worried about it.
1 parent f53fb41 commit 6511aad

File tree

4 files changed

+1125
-97
lines changed

4 files changed

+1125
-97
lines changed

makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ update_default_schema :
2525
_json.dump(response.json()['schema'], f, indent=4,\
2626
sort_keys=True, separators=(',', ': '));\
2727
f.close()"
28+
@echo "Auto-generating graph objects based on updated default-schema."
29+
python update_graph_objs.py
2830

2931
install : sync_subs
3032
@echo ""

0 commit comments

Comments
 (0)