diff --git a/infra/helm/meshdb/charts/celery/templates/deployment.yaml b/infra/helm/meshdb/charts/celery/templates/deployment.yaml index bee97a3d..47b16bf8 100644 --- a/infra/helm/meshdb/charts/celery/templates/deployment.yaml +++ b/infra/helm/meshdb/charts/celery/templates/deployment.yaml @@ -39,6 +39,7 @@ spec: {{- toYaml $.Values.resources | nindent 12 }} command: {{ toJson .command }} # TODO (willnilges): Fix this in a later PR + # https://github.com/nycmeshnet/meshdb/issues/519 envFrom: - configMapRef: name: meshdbconfig diff --git a/pyproject.toml b/pyproject.toml index 89eca117..43edadc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,8 @@ version = "0.1" dependencies = [ "celery[redis]==5.3.*", "django==4.2.*", - # We need djangorestframework features that are coming in 3.15.* - # but that release hasn't shipped yet, so grab the commit that is likely to ship. - # This will likely have a small diff with the final 3.15.* release, but is much better - # then pulling their master branch (which changes constantly) - # FIXME: Go back to PyPI once https://github.com/encode/django-rest-framework/pull/8794 is merged + # FIXME: Go back to PyPI once DRF adds support for using Django's read-only permissions + # https://github.com/nycmeshnet/meshdb/issues/524 "djangorestframework@git+https://github.com/encode/django-rest-framework.git@4bbfa8d4556b5847e91ba95f457cc862b7a0f027", "drf-hooks==0.1.3", "psycopg2-binary==2.9.*", @@ -24,15 +21,19 @@ dependencies = [ "django-cors-headers==4.3.*", "nameparser==1.1.*", "inflect==7.0.*", - "fastkml[lxml]==1.0a12", # FIXME: Update me to stable, once 1.0 is released officially + # FIXME: Update me to stable, once 1.0 is released officially + # https://github.com/nycmeshnet/meshdb/issues/525 + "fastkml[lxml]==1.0a12", "drf-spectacular==0.27.*", "djangorestframework-dataclasses==1.3.*", "django-nonrelated-inlines==0.2.*", "django-filter==24.1", - # FIXME: Go back to PyPI when https://github.com/bhch/django-jsonform/pull/162 is merged + # FIXME: Go back to PyPI when https://github.com/bhch/django-jsonform/pull/162 is available on PyPi + # https://github.com/nycmeshnet/meshdb/issues/526 "django-jsonform@git+https://github.com/willnilges/django-jsonform.git@51cbed42ccdaec81a35c97a919d054e2c9ca0207", "faker==24.3.*", # FIXME: Go back to PyPI when https://github.com/jazzband/django-dbbackup/pull/515 or https://github.com/jazzband/django-dbbackup/pull/511 is merged + # https://github.com/nycmeshnet/meshdb/issues/527 "django-dbbackup@git+https://github.com/willnilges/django-dbbackup.git@62048411ff5beac4beac1578f686824214f1f33a", "django-storages==1.14.*", "django-import-export==4.0.*", diff --git a/src/meshapi/management/commands/scramble_members.py b/src/meshapi/management/commands/scramble_members.py index 93e7f8a9..20b4af73 100644 --- a/src/meshapi/management/commands/scramble_members.py +++ b/src/meshapi/management/commands/scramble_members.py @@ -19,8 +19,6 @@ # Uses faker to get fake names, emails, and phone numbers -# TODO: Instead of modifying real data, generate a completely fake database from -# scratch :) class Command(BaseCommand): help = "Updates all members with fake name, email, and phone number. Clears notes." diff --git a/src/meshapi/templates/admin/install_tabular.html b/src/meshapi/templates/admin/install_tabular.html index 0782e96a..7fac631f 100644 --- a/src/meshapi/templates/admin/install_tabular.html +++ b/src/meshapi/templates/admin/install_tabular.html @@ -70,7 +70,6 @@

{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}

-
{% if inline_admin_formset.opts.add_button %} Add {{ inline_admin_formset.opts.verbose_name|capfirst }} diff --git a/src/meshapi/tests/test_uisp_import.py b/src/meshapi/tests/test_uisp_import.py index 5431a367..abf630f4 100644 --- a/src/meshapi/tests/test_uisp_import.py +++ b/src/meshapi/tests/test_uisp_import.py @@ -76,6 +76,7 @@ def test_get_link_type(self): self.assertEqual( # TODO: Once 6 GHz becomes a thing, this will probably need to be tweaked # for now we consider anything < 7 GHz as 5 GHz + # https://github.com/nycmeshnet/meshdb/issues/518 get_link_type({"type": "wireless", "frequency": 6100}), Link.LinkType.FIVE_GHZ, ) diff --git a/src/meshapi/tests/test_update_panos_github.py b/src/meshapi/tests/test_update_panos_github.py index b02b8e52..c3485fb2 100644 --- a/src/meshapi/tests/test_update_panos_github.py +++ b/src/meshapi/tests/test_update_panos_github.py @@ -176,6 +176,7 @@ def test_parse_pano_title(self): result = PanoramaTitle.from_filename(case) self.assertEqual(result, expected, f"Expected: {expected}. Result: {result}.") # TODO: Assert that all the URL functions and stuff work + # https://github.com/nycmeshnet/meshdb/issues/520 # The GitHub does not have a perfectly uniform set of files. def test_parse_pano_bad_title(self): diff --git a/src/meshapi/validation.py b/src/meshapi/validation.py index 8b24b347..ec3f7655 100644 --- a/src/meshapi/validation.py +++ b/src/meshapi/validation.py @@ -92,10 +92,6 @@ def __init__(self, street_address: str, city: str, state: str, zip_code: int): # the closest matching street address it can find, so check that # the ZIP of what we entered matches what we got. - # FIXME (willnilges): Found an edge case where if you enter an address - # that's not in the Zip code, it will print the "not within city limits" - # error. Either the error message needs to be re-worked, or additional - # validation is required to figure out exactly what is wrong. found_zip = int(nyc_planning_resp["features"][0]["properties"]["postalcode"]) if found_zip != zip_code: raise AddressError( @@ -112,9 +108,10 @@ def __init__(self, street_address: str, city: str, state: str, zip_code: int): self.state = addr_props["region_a"] self.zip = int(addr_props["postalcode"]) - # TODO (willnilges): Bail if no BIN. Given that we're guaranteeing this is NYC, if - # there is no BIN, then we've really foweled something up - if int(addr_props["addendum"]["pad"]["bin"]) in INVALID_BIN_NUMBERS: + if ( + not addr_props.get("addendum", {}).get("pad", {}).get("bin") + or int(addr_props["addendum"]["pad"]["bin"]) in INVALID_BIN_NUMBERS + ): raise AddressError( f"(NYC) Could not find address '{street_address}, {city}, {state} {zip_code}'. " f"DOB API returned invalid BIN: {addr_props['addendum']['pad']['bin']}" diff --git a/src/meshapi/views/map.py b/src/meshapi/views/map.py index 1a4c9303..38071209 100644 --- a/src/meshapi/views/map.py +++ b/src/meshapi/views/map.py @@ -182,6 +182,7 @@ class MapDataLinkList(generics.ListAPIView): # TODO: Possibly re-enable the below filters? They make make the map arguably more accurate, # but less consistent with the current one by removing links between devices that are # inactive in UISP + # https://github.com/nycmeshnet/meshdb/issues/521 # .exclude(from_device__status=Device.DeviceStatus.INACTIVE) # .exclude(to_device__status=Device.DeviceStatus.INACTIVE) ) diff --git a/src/meshdb/templates/drf_spectacular/swagger_ui.html b/src/meshdb/templates/drf_spectacular/swagger_ui.html index 40c1f4c7..3f0cdcd6 100644 --- a/src/meshdb/templates/drf_spectacular/swagger_ui.html +++ b/src/meshdb/templates/drf_spectacular/swagger_ui.html @@ -25,6 +25,7 @@ // convention that a closed padlock represents an unlocked endpoint. // Much anger expressed here: https://github.com/swagger-api/swagger-ui/issues/4402 // in the future we should try to get this working + // https://github.com/nycmeshnet/meshdb/issues/523 {#console.log(JSON.stringify(versions));#} {#var lockedIcon = document.querySelector(".svg-assets defs symbol#locked");#} {#var unlockedIcon = document.querySelector(".svg-assets defs symbol#unlocked");#} diff --git a/src/meshdb/utils/spreadsheet_import/parse_building.py b/src/meshdb/utils/spreadsheet_import/parse_building.py index ace6b15e..65977d03 100644 --- a/src/meshdb/utils/spreadsheet_import/parse_building.py +++ b/src/meshdb/utils/spreadsheet_import/parse_building.py @@ -203,13 +203,7 @@ def nop(*args, **kwargs): latitude = row.latitude longitude = row.longitude - altitude = ( - # TODO: Change this to match new DOB ID if changed from spreadsheet? - # Would require another API call - row.altitude - if row.altitude and row.altitude >= 0 - else None - ) + altitude = row.altitude if row.altitude and row.altitude >= 0 else None existing_building = get_existing_building( address_result.discovered_bin or dob_bin, address_result.address, (latitude, longitude) diff --git a/src/meshdb/utils/spreadsheet_import/parse_install.py b/src/meshdb/utils/spreadsheet_import/parse_install.py index 991f1c01..b3873caf 100644 --- a/src/meshdb/utils/spreadsheet_import/parse_install.py +++ b/src/meshdb/utils/spreadsheet_import/parse_install.py @@ -44,7 +44,9 @@ def create_install(row: SpreadsheetRow) -> Optional[models.Install]: install = models.Install( install_number=row.id, status=translate_spreadsheet_status_to_db_status(row.status), - ticket_id=None, # TODO: Figure out if we can export data from OSTicket to back-fill this + ticket_id=None, + # TODO: Figure out if we can export data from OSTicket to back-fill this + # https://github.com/nycmeshnet/meshdb/issues/510 request_date=row.request_date.date(), install_date=row.installDate, abandon_date=row.abandonDate, diff --git a/src/meshdb/utils/spreadsheet_import/parse_link.py b/src/meshdb/utils/spreadsheet_import/parse_link.py index d57b2d10..2c852bcf 100644 --- a/src/meshdb/utils/spreadsheet_import/parse_link.py +++ b/src/meshdb/utils/spreadsheet_import/parse_link.py @@ -258,6 +258,7 @@ def load_links_supplement_with_uisp(spreadsheet_links: List[SpreadsheetLink]): for spreadsheet_link in spreadsheet_links: try: # TODO: this method of node lookup doesn't work for campus links like the vernon APs + # https://github.com/nycmeshnet/meshdb/issues/514 from_node = get_node_from_spreadsheet_id(spreadsheet_link.from_node_id) to_node = get_node_from_spreadsheet_id(spreadsheet_link.to_node_id)