azavea / python-omgeo

OMGeocoder - A python geocoding abstraction layer
http://python-omgeo.readthedocs.io/en/latest/
MIT License
36 stars 14 forks source link

Update PyPI Integrations for Release Upload #72

Closed JN-Hernandez closed 5 months ago

JN-Hernandez commented 6 months ago

Overview

The python-omgeo Python packages is published via the Azavea PyPI account, however recent builds of these projects are failing because PyPI has changed from username/password authentication to token based and trusted-publisher based authentication. This PR will address updating the integration.

Closes #71

Demo

The Problem:

Proposed Solution:

Notes

Testing Instructions

TestPyPI Testing - Manual Release:

[!NOTE] Example of successful manual test: GitHub Action Release #6 Note that upload was misspelled in this test run, it has since been corrected.

  • [x] 1. Create a manual test release branch off this one titled release/test with the tags test, then push up
    git checkout -b release/test
    git tag test
    git push --set-upstream origin release/test
    git push --tags
  • [x] 2. Review the GitHub Action generated to see if it completes successfully
  • [x] 3. Remove the tags from origin and the local branch
    git tag -d test
    git push --delete origin test

Checklist

JN-Hernandez commented 6 months ago

CI fails a couple of tests:

test_impatiently_geocode_azavea (omgeo.tests.tests.GeocoderTest) ... ok

======================================================================
FAIL: test_geocode_esri_wgs_senado_mx (omgeo.tests.tests.GeocoderTest)
Attempt to geocode ``Paseo de la Reforma 135, Tabacalera,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/python-omgeo/python-omgeo/omgeo/tests/tests.py", line 183, in test_geocode_esri_wgs_senado_mx
    self.assertEqual(search_text in candidates[0].match_addr, True,
AssertionError: False != True : "Paseo de la Reforma 135" not found in match_addr. Got "Paseo de La Reforma 135, Tabacalera, Ciudad de México, Cuauhtémoc, Ciudad de México, 06030".

======================================================================
FAIL: test_geocode_structured_esri_wgs_senado_mx (omgeo.tests.tests.GeocoderTest)
Attempt to geocode ``Paseo de la Reforma 135, Tabacalera,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/python-omgeo/python-omgeo/omgeo/tests/tests.py", line 196, in test_geocode_structured_esri_wgs_senado_mx
    self.assertEqual(search_text in candidates[0].match_addr, True,
AssertionError: False != True : "Paseo de la Reforma 135" not found in match_addr. Got "Paseo de La Reforma 135, Tabacalera, Ciudad de México, Cuauhtémoc, Ciudad de México, 06030".

----------------------------------------------------------------------
Ran 53 tests in 5.887s

FAILED (failures=2, skipped=14)
Test failed: <unittest.runner.TextTestResult run=53 errors=0 failures=2>
error: Test failed: <unittest.runner.TextTestResult run=53 errors=0 failures=2>
Error: Process completed with exit code 1.

Uncertain if this is because the data being returned has changed or if a function isn't parsing out the data returned correctly. Additional investigation needed.

JN-Hernandez commented 5 months ago

Confirmed with @rajadain that the data being returned changed for the affected tests and that we should simply update the tests to match expected return.