Skip to content

Commit

Permalink
update to sphinx bugfix version
Browse files Browse the repository at this point in the history
  • Loading branch information
mscarey committed May 20, 2021
1 parent 0487c96 commit 14584fa
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/api/opinions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ Opinions
.. autoclass:: authorityspoke.opinions.Opinion
:members:
:special-members:


.. autoclass:: authorityspoke.opinions.AnchoredHoldings
:members:
:special-members:
14 changes: 14 additions & 0 deletions docs/guides/load_yaml_holdings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ citation of the case we want, we'll use the :meth:`~authorityspoke.io.downloads.
>>> print(licensing_case)
United States v. Mazza-Alaluf, 621 F.3d 205 (2010-09-22)

Because we used ``full_case=True``, we have the option to view the full
text of the majority opinion using the command
``licensing_case.majority.text``.


Creating Holdings with Python
-----------------------------
Expand Down Expand Up @@ -571,3 +575,13 @@ Now when we load a file with this YAML, we'll get both Holdings.
>>> client=LEGIS_CLIENT)
>>> len(both_holdings_with_anchors.holdings)
2

Now that we generated this :class:`~authorityspoke.opinions.AnchoredHoldings` object
containing the data from the YAML file, we can use the posit method to link those
:class:`~authorityspoke.holdings.Holding`\s to the judicial :class:`~authorityspoke.decisions.Decision`
we created from the data we downloaded from the CAP API. Then we can verify that
those two Holdings are now considered the two holdings of the Decision.

>>> licensing_case.posit(both_holdings_with_anchors)
>>> len(licensing_case.holdings)
2
41 changes: 38 additions & 3 deletions notebooks/load_yaml_holdings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
"print(licensing_case)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Because we used `full_case=True`, we have the option to view the full text of the majority opinion using the command `licensing_case.majority.text`."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -688,13 +695,41 @@
" client=LEGIS_CLIENT)\n",
"len(both_holdings_with_anchors.holdings)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we generated this `AnchoredHoldings` object containing the data from the YAML file, we can use the `posit` method to link those Holdings to the judicial Decision we created from the data we downloaded from the CAP API. Then we can verify that those two Holdings are now considered the two `holdings` of the Decision."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"licensing_case.posit(both_holdings_with_anchors)\n",
"len(licensing_case.holdings)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "ausvenv",
"display_name": "authorityspoke",
"language": "python",
"name": "ausvenv"
"name": "authorityspoke"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -706,7 +741,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.3"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ nettlesome>=0.5.0
pint>=0.15
python-slugify
requests
sphinx>=2.1.2
sphinx>=4.0.2
sphinx-autodoc-typehints
sphinx-rtd-theme

0 comments on commit 14584fa

Please sign in to comment.