Skip to content

Commit

Permalink
Sync notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 8, 2024
1 parent 8987c2c commit 37bd9c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions notebooks/01_Concepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@
"```python\n",
"my_key = dict(value=key) # whatever you're inserting\n",
"MyTable.insert1(my_key) # error here\n",
"parents = MyTable.parents(as_objects=True) # get the parents as FreeTables\n",
"for parent in parents: # iterate through the parents, with only relevant fields\n",
" parent_key = {k: v for k, v in my_key.items() if k in parent.heading.names}\n",
" print(parent & parent_key) # restricted parent\n",
"parents = MyTable().find_insert_fail(my_key)\n",
"```\n",
"\n",
"If any of the printed tables are empty, you know you need to insert into that\n",
Expand Down
5 changes: 1 addition & 4 deletions notebooks/py_scripts/01_Concepts.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@
# ```python
# my_key = dict(value=key) # whatever you're inserting
# MyTable.insert1(my_key) # error here
# parents = MyTable.parents(as_objects=True) # get the parents as FreeTables
# for parent in parents: # iterate through the parents, with only relevant fields
# parent_key = {k: v for k, v in my_key.items() if k in parent.heading.names}
# print(parent & parent_key) # restricted parent
# parents = MyTable().find_insert_fail(my_key)
# ```
#
# If any of the printed tables are empty, you know you need to insert into that
Expand Down

0 comments on commit 37bd9c3

Please sign in to comment.