Skip to content

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Nov 4, 2024
1 parent a87f3e7 commit 2d6e65f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions podaac/forge_py/forge.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Python footprint generator"""
# pylint: disable=unused-argument

import json
import numpy as np
import alphashape
Expand Down
2 changes: 1 addition & 1 deletion podaac/forge_py/open_cv_footprint.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Script with algorithm to generate a wkt footprint for netcdf file using open cv"""
# pylint: disable=no-member, broad-exception-raised
# pylint: disable=no-member, broad-exception-raised, unused-argument

import uuid
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion tests/footprint_result.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
POLYGON ((-151.2104797363281250 -88.2968597412109375, -146.6898803710937500 -71.9666976928710938, -146.9627075195312500 -67.0487823486328125, -148.8228149414062500 -53.9575462341308594, -152.6814575195312500 -29.3333301544189453, -155.9255371093750000 -11.2372579574584961, -159.0004577636718750 3.4932057857513428, -160.5667114257812500 10.0457916259765625, -162.7549133300781250 18.1727218627929688, -165.8325805664062500 27.8044605255126953, -167.6470031738281250 32.5893592834472656, -169.7060241699218750 37.3485832214355469, -172.0648193359375000 42.0401306152343750, -173.8546142578125000 45.1170806884765625, -176.9651489257812500 49.6869544982910156, -179.3780517578125000 52.6638336181640625, -179.8807983398437500 54.1418342590332031, -179.9264526367187500 55.6057548522949219, -179.6596679687500000 60.0465316772460938, -179.6708374023437500 64.5465545654296875, -179.9419555664062500 70.4827651977539062, -179.9095458984375000 82.3355789184570312, -177.8653564453125000 89.7059631347656250, -166.0711669921875000 88.1707382202148438, -152.2864685058593750 87.9815750122070312, -139.2052307128906250 89.6023025512695312, -151.4800415039062500 61.8177337646484375, -150.9622192382812500 56.9010696411132812, -147.3717651367187500 33.9308509826660156, -143.9154663085937500 14.1914930343627930, -140.9187927246093750 -0.5796530246734619, -137.7738647460937500 -13.6449108123779297, -134.4238281250000000 -24.9682922363281250, -132.7376098632812500 -29.7647552490234375, -130.8479614257812500 -34.5291404724121094, -128.6877746582031250 -39.2499504089355469, -127.0664978027343750 -42.3698081970214844, -125.2562255859375000 -45.4631385803222656, -123.2278442382812500 -48.5195960998535156, -120.9327392578125000 -51.5249176025390625, -118.3114624023437500 -54.4703941345214844, -113.5754394531250000 -58.7614440917968750, -109.7403564453125000 -61.4858703613281250, -107.5493774414062500 -62.8036499023437500, -102.5085449218750000 -65.3349075317382812, -99.6486206054687500 -66.5140380859375000, -96.4772338867187500 -67.6518402099609375, -89.4114990234375000 -69.7861557006835938, -85.0591735839843750 -70.5865783691406250, -75.8378906250000000 -72.1521301269531250, -70.6167602539062500 -72.6972961425781250, -63.8655700683593750 -72.9300918579101562, -53.4152526855468750 -71.8521118164062500, -48.6948547363281250 -71.1196517944335938, -40.3469543457031250 -69.3359985351562500, -33.5735168457031250 -67.1357574462890625, -30.5319519042968750 -65.9727783203125000, -25.2752685546875000 -63.5059127807617188, -22.9532470703125000 -62.1973953247070312, -18.9284057617187500 -59.4941139221191406, -15.5173339843750000 -56.6898612976074219, -12.5948486328125000 -53.7992286682128906, -10.0539550781250000 -50.8299636840820312, -7.8292236328125000 -47.8063011169433594, -5.8537597656250000 -44.7387046813964844, -3.2876586914062500 -40.0875167846679688, -0.4007568359375000 -33.7977104187011719, 2.0287170410156250 -27.4189243316650391, 4.1312561035156250 -20.9794998168945312, 6.4173126220703125 -12.8814315795898438, 8.8009185791015625 -3.0907928943634033, 10.8644866943359375 6.7316312789916992, 15.6606292724609375 33.0472908020019531, 18.8435363769531250 54.3887901306152344, 19.7572021484375000 59.3136787414550781, 20.2351684570312500 64.2194366455078125, 21.7008361816406250 75.6718063354492188, 18.8710632324218750 88.7421798706054688, 43.4420928955078125 88.3234252929687500, 56.7317504882812500 87.7287139892578125, 66.0375366210937500 86.8327941894531250, 70.0971069335937500 86.1279449462890625, 72.8826904296875000 85.4092025756835938, 93.7043151855468750 87.0166625976562500, 95.6429443359375000 87.7592773437500000, 99.4361877441406250 88.4969024658203125, 104.9508972167968750 88.9807128906250000, 110.2164306640625000 89.2158737182617188, 140.2797851562500000 89.6276473999023438, 148.7131652832031250 87.9681930541992188, 178.1130981445312500 88.2358093261718750, 179.9314575195312500 80.8574905395507812, 179.8384399414062500 77.8973922729492188, 179.9939575195312500 71.9666976928710938, 179.7409057617187500 64.5438385009765625, 179.9887695312500000 57.0913047790527344, 179.7272338867187500 54.1207962036132812, 179.2839660644531250 54.1299514770507812, 176.2764892578125000 57.0230636596679688, 172.8004760742187500 59.8066520690917969, 168.8144531250000000 62.5504608154296875, 163.8950805664062500 65.0891876220703125, 161.0746765136718750 66.2879638671875000, 154.5780029296875000 68.5054397583007812, 146.7719726562500000 70.4163208007812500, 142.3344116210937500 71.2271423339843750, 132.4080200195312500 72.4927902221679688, 121.3414306640625000 73.1987304687500000, 109.7662048339843750 73.2741851806640625, 98.5125732421875000 72.7109603881835938, 88.2824096679687500 71.5672988891601562, 79.4317626953125000 69.9418869018554688, 71.9920196533203125 67.9405288696289062, 65.8112182617187500 65.6551895141601562, 63.1269836425781250 64.4292526245117188, 58.4389038085937500 61.8466529846191406, 56.3873596191406250 60.5012550354003906, 52.7664489746093750 57.7244148254394531, 49.6766204833984375 54.8550262451171875, 47.0099639892578125 51.9133605957031250, 44.6830139160156250 48.9143333435058594, 42.6312866210937500 45.8690605163574219, 39.1636199951171875 39.6714286804199219, 37.6773681640625000 36.5306129455566406, 35.6852111816406250 31.7785549163818359, 33.9222564697265625 26.9865760803222656, 30.4560852050781250 15.6907081604003906, 27.2405548095703125 2.6503238677978516, 23.9036712646484375 -13.7545051574707031, 20.1670989990234375 -35.1338806152343750, 16.4237365722656250 -59.7453498840332031, 16.2044982910156250 -61.3958396911621094, 27.3181915283203125 -89.1526870727539062, -0.1909790039062500 -88.9410247802734375, -16.1531982421875000 -88.5781402587890625, -25.1988525390625000 -88.1509170532226562, -30.7503051757812500 -87.6948242187500000, -34.4333801269531250 -87.2240066528320312, -38.0587158203125000 -86.5031814575195312, -54.3814392089843750 -86.8669433593750000, -76.1993713378906250 -88.4333724975585938, -81.0914611816406250 -88.2332153320312500, -105.5535888671875000 -88.5470581054687500, -125.4259033203125000 -88.5661087036132812, -151.2104797363281250 -88.2968597412109375))
POLYGON ((113.4470520019531250 85.8597259521484375, 118.7549743652343750 86.5208892822265625, 126.4224243164062500 87.1393127441406250, 137.9349975585937500 87.6808013916015625, 148.7131652832031250 87.9681930541992188, 156.9276123046875000 86.5157928466796875, 177.9259033203125000 86.7629547119140625, 179.9314575195312500 80.8574905395507812, 179.8384399414062500 77.8973922729492188, 179.9939575195312500 71.9666976928710938, 179.7409057617187500 64.5438385009765625, 179.9887695312500000 57.0913047790527344, 179.7272338867187500 54.1207962036132812, 179.2839660644531250 54.1299514770507812, 176.2764892578125000 57.0230636596679688, 172.8004760742187500 59.8066520690917969, 168.8144531250000000 62.5504608154296875, 163.8950805664062500 65.0891876220703125, 157.9780273437500000 67.4297103881835938, 150.8494262695312500 69.5048370361328125, 142.3344116210937500 71.2271423339843750, 132.4080200195312500 72.4927902221679688, 121.3414306640625000 73.1987304687500000, 109.7662048339843750 73.2741851806640625, 98.5125732421875000 72.7109603881835938, 88.2824096679687500 71.5672988891601562, 79.4317626953125000 69.9418869018554688, 71.9920196533203125 67.9405288696289062, 68.7571105957031250 66.8283920288085938, 63.1269836425781250 64.4292526245117188, 58.4389038085937500 61.8466529846191406, 56.3873596191406250 60.5012550354003906, 52.7664489746093750 57.7244148254394531, 49.6766204833984375 54.8550262451171875, 45.8084411621093750 50.4202499389648438, 42.6312866210937500 45.8690605163574219, 39.1636199951171875 39.6714286804199219, 36.3210449218750000 33.3674621582031250, 33.9222564697265625 26.9865760803222656, 31.3703308105468750 18.9316177368164062, 28.7705841064453125 9.1837167739868164, 25.8337554931640625 -3.9023163318634033, 22.7120666503906250 -20.3309764862060547, 19.6391906738281250 -38.4250221252441406, 15.7462463378906250 -64.6512374877929688, 15.0222473144531250 -72.8388137817382812, 17.3964233398437500 -87.5390625000000000, -0.8558959960937500 -87.0336914062500000, -15.2192382812500000 -86.1230468750000000, -28.2814636230468750 -87.9253234863281250, -34.4333801269531250 -87.2240066528320312, -38.0587158203125000 -86.5031814575195312, -54.3814392089843750 -86.8669433593750000, -59.2214965820312500 -87.3012466430664062, -70.4432983398437500 -87.9682159423828125, -82.0128784179687500 -86.4384002685546875, -97.2589721679687500 -86.9109420776367188, -116.1100769042968750 -87.1056823730468750, -130.7213134765625000 -87.0337066650390625, -147.7274169921875000 -86.6704025268554688, -146.3738098144531250 -75.2366867065429688, -146.9627075195312500 -67.0487823486328125, -150.0597229003906250 -45.7582931518554688, -153.2390441894531250 -26.0362567901611328, -155.9255371093750000 -11.2372579574584961, -159.0004577636718750 3.4932057857513428, -160.9778442382812500 11.6505651473999023, -163.2219543457031250 19.7616443634033203, -165.8325805664062500 27.8044605255126953, -168.3089904785156250 34.1961898803710938, -170.4546203613281250 38.9106216430664062, -172.9320678710937500 43.5788078308105469, -175.8471679687500000 48.1567649841308594, -179.3780517578125000 52.6638336181640625, -179.8807983398437500 54.1418342590332031, -179.9264526367187500 55.6057548522949219, -179.6596679687500000 60.0465316772460938, -179.6708374023437500 64.5465545654296875, -179.9419555664062500 70.4827651977539062, -179.9095458984375000 82.3355789184570312, -179.5983276367187500 83.8119812011718750, -178.9868469238281250 85.2862091064453125, -177.6591796875000000 86.7571105957031250, -160.8666381835937500 86.5503845214843750, -152.2864685058593750 87.9815750122070312, -153.3746337890625000 76.5437774658203125, -151.2503051757812500 60.1797256469726562, -150.9622192382812500 56.9010696411132812, -146.2690429687500000 27.3435554504394531, -143.9154663085937500 14.1914930343627930, -141.6276855468750000 2.6977546215057373, -139.8079223632812500 -5.4898490905761719, -137.7738647460937500 -13.6449108123779297, -135.4375000000000000 -21.8043308258056641, -133.3219604492187500 -28.1650352478027344, -130.8479614257812500 -34.5291404724121094, -128.6877746582031250 -39.2499504089355469, -126.1777343750000000 -43.9361534118652344, -123.2278442382812500 -48.5195960998535156, -120.9327392578125000 -51.5249176025390625, -118.3114624023437500 -54.4703941345214844, -113.5754394531250000 -58.7614440917968750, -109.7403564453125000 -61.4858703613281250, -107.5493774414062500 -62.8036499023437500, -102.5085449218750000 -65.3349075317382812, -99.6486206054687500 -66.5140380859375000, -96.4772338867187500 -67.6518402099609375, -89.4114990234375000 -69.7861557006835938, -85.0591735839843750 -70.5865783691406250, -75.8378906250000000 -72.1521301269531250, -70.6167602539062500 -72.6972961425781250, -63.8655700683593750 -72.9300918579101562, -53.4152526855468750 -71.8521118164062500, -48.6948547363281250 -71.1196517944335938, -40.3469543457031250 -69.3359985351562500, -33.5735168457031250 -67.1357574462890625, -30.5319519042968750 -65.9727783203125000, -25.2752685546875000 -63.5059127807617188, -22.9532470703125000 -62.1973953247070312, -18.9284057617187500 -59.4941139221191406, -15.5173339843750000 -56.6898612976074219, -12.5948486328125000 -53.7992286682128906, -10.0539550781250000 -50.8299636840820312, -7.8292236328125000 -47.8063011169433594, -5.8537597656250000 -44.7387046813964844, -4.1026611328125000 -41.6494712829589844, -0.4007568359375000 -33.7977104187011719, 1.4538879394531250 -29.0161972045898438, 3.6318969726562500 -22.5938739776611328, 5.5438385009765625 -16.1272029876708984, 7.2477416992187500 -9.6219358444213867, 8.8009185791015625 -3.0907928943634033, 10.8644866943359375 6.7316312789916992, 15.6606292724609375 33.0472908020019531, 18.8435363769531250 54.3887901306152344, 19.7572021484375000 59.3136787414550781, 22.0383758544921875 78.9413528442382812, 21.5531921386718750 87.1110610961914062, 33.6062927246093750 86.7356262207031250, 42.8457946777343750 86.2465820312500000, 53.1632385253906250 87.9380264282226562, 64.2499237060546875 87.0629348754882812, 68.9209747314453125 86.3648376464843750, 72.8826904296875000 85.4092025756835938, 93.7043151855468750 87.0166625976562500, 95.6429443359375000 87.7592773437500000, 112.0354003906250000 85.6331710815429688, 113.4470520019531250 85.8597259521484375))
1 change: 0 additions & 1 deletion tests/test_footprint_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ def test_forge_py():
wkt_alphashape = forge.generate_footprint(
lon_data, lat_data, strategy=strategy, **footprint_params
)
print(wkt_alphashape)
assert compare_shapes_similarity(wkt_alphashape, polygon_shape)

def test_forge_py_open_cv():
Expand Down

0 comments on commit 2d6e65f

Please sign in to comment.