Skip to content

Commit

Permalink
Logic for '200 thru 300' range of lots
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejcorey committed Jul 19, 2024
1 parent 52c4059 commit 0bc340d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN apt-get install -y python3.9-dev
RUN apt-get install -y python3-pip

# install dependencies
RUN pip install --upgrade pip
# RUN pip install --upgrade pip # With v 24 of pip lots of requirements inside dependencies will break. So don't force upgrade for now.
COPY ./requirements.txt .
RUN pip install --force git+https://github.com/scikit-learn-contrib/hdbscan.git
RUN pip install -r requirements.txt
Expand Down
5 changes: 5 additions & 0 deletions apps/parcel/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def test_lot_range(self):
lots, lots_meta = get_lots("1-20")
self.assertEquals(lots, [str(x) for x in list(range(1,21))])

def test_lot_range_thru(self):
"""Does get_lots render 'LOTS 2525 THRU 2529' as list [2525,2526,...2529]"""
lots, lots_meta = get_lots("LOTS 2525 THRU 2529")
self.assertEquals(lots, ['2525', '2526', '2527', '2528', '2529'])

def test_lot_bad_range_start(self):
"""Does get_lots render 'x1-20' None"""
lots, lots_meta = get_lots("x1-20")
Expand Down
2 changes: 1 addition & 1 deletion apps/parcel/utils/parcel_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_lots(input_str):
if repeated_text_num:
return strip_leading_0s_list([repeated_text_num]), 'repeated_text_num'

num_range = re.search(r'^(\d+)-(\d+)$', input_str)
num_range = re.search(r'^(\d+)(?:-| thru )(\d+)$', input_str)
if num_range:
start = int(num_range.group(1))
end = int(num_range.group(2))
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Deed Machine full workflow
modules/ingesting-hits.rst
modules/uploading-to-zooniverse.rst
modules/uploading-parcel-data.rst
modules/mapping-covenants.rst
modules/downloading-new-results.rst
modules/manual-data-cleaning.rst

Expand Down
31 changes: 30 additions & 1 deletion docs/modules/uploading-parcel-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,33 @@ Uploading modern parcel data for mapping
TK TK TK
---------

TK.
TK.

.. code-block:: bash
python manage.py upload_to_zooniverse --workflow "WI Milwaukee County" -n 200
Optional: Load images to s3 and/or list of plats/additions
----------------------------------------------------------
This helps with autojoin to Parcels and with manual research

.. code-block:: bash
python manage.py upload_plat_images --workflow "WI Milwaukee County"
python manage.py load_plat_records --workflow "WI Milwaukee County"
Optional: Load subdivision spatial layer
----------------------------------------
This helps with autojoin to Parcels and with manual research

.. code-block:: bash
python manage.py load_subdivision_shp --workflow "WI Milwaukee County"
Load modern parcel shapefile(s)
-------------------------------
...with unique fields mapped to unified subset

.. code-block:: bash
python manage.py load_parcel_shp --workflow "WI Milwaukee County"
6 changes: 3 additions & 3 deletions racial_covenants_processor/templates/workflow_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ <h1>{{workflow.workflow_name}} summary</h1>

<h3>Admin links</h3>
<ul>
<li><a href="/admin/zoon/zooniversesubject/?workflow__id__exact={{workflow.id}}">Zooniverse subjects</a></li>
<li><a href="/admin/zoon/manualcovenant/?workflow__id__exact={{workflow.id}}">Manual covenants</a></li>
<li><a href="/admin/deed/deedpage/?workflow__id__exact={{workflow.id}}">Deed pages</a></li>
<li><a href="/admin/zoon/zooniversesubject/?workflow__workflow_name={{workflow.workflow_name}}">Zooniverse subjects</a></li>
<li><a href="/admin/zoon/manualcovenant/?workflow__workflow_name={{workflow.workflow_name}}">Manual covenants</a></li>
<li><a href="/admin/deed/deedpage/?workflow__workflow_name={{workflow.workflow_name}}">Deed pages</a></li>
</ul>

<h3>Download in-progress shapefiles</h3>
Expand Down

0 comments on commit 0bc340d

Please sign in to comment.