Skip to content

Commit

Permalink
add section headings to Holding data guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mscarey committed Dec 7, 2019
1 parent 4892e67 commit fa9c56c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
12 changes: 11 additions & 1 deletion docs/guides/create_holding_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ And also load some legal Codes.
usa.set_code(usc_title_17)
usa.set_code(code_of_federal_regulations_title_37)
Loading Holdings from Existing JSON
-----------------------------------

Now we’re ready to look at the process of describing legal Holdings and
loading that information into AuthoritySpoke. In version 0.3, although
there’s not yet a web interface for loading this data, there is an
Expand Down Expand Up @@ -84,6 +87,9 @@ The ``anchors`` field doesn’t do much yet in AuthoritySpoke version 0.3,
but in future versions it’ll help link each Holding to the relevant
parts of the Opinion.

The Parts of a Holding in JSON
-----------------------------------

Now let’s look at the part of ``holding_oracle.json`` representing that
first holding.

Expand Down Expand Up @@ -305,6 +311,9 @@ There can also be an “enactments_despite” field, which identifies
legislative text that doesn’t need to be present for the Rule to apply,
but that also doesn’t negate the validity of the Rule.

JSON API Specification
-----------------------------------

If you want to view the schema specification, you can view it by
calling :func:`.io.api_spec.make_spec`\. When you read it,
you might be surprised to see that every Holding object contains a Rule,
Expand Down Expand Up @@ -582,7 +591,8 @@ into the Holding object, as shown in the examples above.
openapi: 3.0.2
paths: {}
Exporting AuthoritySpoke Holdings back to JSON
----------------------------------------------

Finally, if you want to convert an AuthoritySpoke object back to JSON or
to a Python dictionary, you can do so with :func:`.io.dump.to_json` or
Expand Down
34 changes: 31 additions & 3 deletions notebooks/create_holding_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@
"usa.set_code(code_of_federal_regulations_title_37)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Loading Holdings from Existing JSON"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -109,15 +116,22 @@
"\n",
"> By statute, a work must be “original” to qualify for copyright protection. 17 U.S.C. § 102(a).\n",
"\n",
"The `anchors` field doesn't do much yet in AuthoritySpoke version 0.3, but in future versions it'll help link each Holding to the relevant parts of the Opinion.\n",
"\n",
"Now let's look at the part of `holding_oracle.json` representing that first holding."
"The `anchors` field doesn't do much yet in AuthoritySpoke version 0.3, but in future versions it'll help link each Holding to the relevant parts of the Opinion."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## The Parts of a Holding in JSON"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let's look at the part of `holding_oracle.json` representing that first holding.\n",
"\n",
"```\n",
"\"holdings\": [\n",
" {\n",
Expand Down Expand Up @@ -386,6 +400,13 @@
"There can also be an \"enactments_despite\" field, which identifies legislative text that doesn't need to be present for the Rule to apply, but that also doesn't negate the validity of the Rule."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## JSON API Specification"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -671,6 +692,13 @@
"print(yaml)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exporting AuthoritySpoke Holdings back to JSON"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit fa9c56c

Please sign in to comment.