-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into scraper-cleanup-updates
- Loading branch information
Showing
15 changed files
with
408 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @ids-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Indigent Defense Stats | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.12" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with unittest | ||
run: | | ||
SKIP_SLOW=true python -m unittest discover -v -s ./src/tester | ||
- name: Build documentation | ||
run: | | ||
sphinx-build -b html docs build | ||
- uses: actions/upload-pages-artifact@v3.0.1 | ||
with: | ||
path: build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,3 +167,5 @@ data/ | |
.~lock.* | ||
|
||
.DS_Store | ||
|
||
docs/generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sys | ||
import os | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'indigent-defense-stats' | ||
copyright = '2024, Open Austin' | ||
author = 'Open Austin' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
sys.path.insert(0, os.path.abspath('../src')) | ||
|
||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary'] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['src/tester'] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'alabaster' | ||
html_static_path = ['_static'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. indigent-defense-stats documentation master file, created by | ||
sphinx-quickstart on Sun Sep 15 15:44:02 2024. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
indigent-defense-stats documentation | ||
==================================== | ||
|
||
Add your content using ``reStructuredText`` syntax. See the | ||
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_ | ||
documentation for details. | ||
|
||
.. autosummary:: | ||
:toctree: generated | ||
|
||
cleaner | ||
orchestrator | ||
parser | ||
scraper | ||
tools | ||
updater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from . import cleaner | ||
from . import orchestrator | ||
from . import parser | ||
from . import scraper | ||
from . import tools | ||
from . import updater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
## Data Structure of the Cleaned Cases JSON | ||
|
||
```mermaid | ||
graph TB | ||
subgraph CaseInformation[Case Information Summary] | ||
style CaseInformation fill:#d3a8e2,stroke:#333,stroke-width:2px | ||
A1[County: Hays] | ||
A2[Cause Number Hash: dsqn91cn1odmo] | ||
A3[Odyssey ID: Redacted] | ||
A4[Date Filed: 01/01/2015] | ||
A5[Location: 22nd District Court] | ||
A6[Version: 1] | ||
A7[Parsing Date: 2024-01-01] | ||
end | ||
subgraph PartyInformation[Party Information] | ||
style PartyInformation fill:#d3a8e2,stroke:#333,stroke-width:2px | ||
subgraph DefendantInfoBox[Defendant Info] | ||
style DefendantInfoBox fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
D8[Defendant Info: Redacted] | ||
end | ||
subgraph RepresentationInfo[Defense Attorney Info] | ||
style RepresentationInfo fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
B1[Defense Attorney Hash: 9083bb693e33919c] | ||
B2[Appointed or Retained: Court Appointed] | ||
end | ||
end | ||
subgraph Events[Event Information] | ||
style Events fill:#d3a8e2,stroke:#333,stroke-width:2px | ||
subgraph EvidenceofRep[Representation Evidence] | ||
style EvidenceofRep fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
B3[Has Evidence of Representation: No] | ||
end | ||
end | ||
subgraph ChargeInformation[Charge Information] | ||
style ChargeInformation fill:#d3a8e2,stroke:#333,stroke-width:2px | ||
subgraph Charge1[Aggravated Assault with a Deadly Weapon] | ||
style Charge1 fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
C1[Statute: 22.02a2] | ||
C2[Level: Second Degree Felony] | ||
C3[Date: 10/25/2015] | ||
C4[Charge Name: Aggravated Assault with a Deadly Weapon] | ||
C5[Description: Aggravated Assault] | ||
C6[Category: Violent] | ||
C7[UCCS Code: 1200] | ||
end | ||
subgraph Charge2[Resisting Arrest] | ||
style Charge2 fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
C8[Statute: 38.03] | ||
C9[Level: Class A Misdemeanor] | ||
C10[Date: 10/25/2015] | ||
C11[Charge Name: Resisting Arrest] | ||
C12[Description: Resisting Arrest] | ||
end | ||
E3[Charges Dismissed: 1] | ||
end | ||
subgraph TopCharge[Top Charge] | ||
style TopCharge fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
E1[Charge Name: Aggravated Assault with a Deadly Weapon] | ||
E2[Charge Level: Second Degree Felony] | ||
end | ||
subgraph Dispositions[Dispositions] | ||
style Dispositions fill:#d3a8e2,stroke:#333,stroke-width:2px | ||
subgraph Disposition1[Disposition Details] | ||
style Disposition1 fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
D1[Date: 12/06/2016] | ||
D2[Event: Disposition] | ||
D3[Outcome: Deferred Adjudication] | ||
D4[Sentence Length: 1 Year] | ||
end | ||
subgraph Disposition2[Resisting Arrest Disposition] | ||
style Disposition2 fill:#b0d4f1,stroke:#333,stroke-width:2px | ||
D5[Date: 12/06/2016] | ||
D6[Event: Disposition] | ||
D7[Outcome: Dismissed] | ||
end | ||
end | ||
CaseInformation --> PartyInformation | ||
CaseInformation --> ChargeInformation | ||
CaseInformation --> Dispositions | ||
CaseInformation --> Events | ||
ChargeInformation --> TopCharge | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.