Giter Club home page Giter Club logo

Comments (9)

csmoore avatar csmoore commented on June 9, 2024

Not sure if this has changed from the original repo here:
https://github.com/Esri/patrol-data-capture-toolbox

But that one did have some basic tests (might be able to borrow the readme, test data, etc., too):
https://github.com/Esri/patrol-data-capture-toolbox/tree/master/source/test

from solutions-geoprocessing-toolbox.

csmoore avatar csmoore commented on June 9, 2024

Also - just might want to add some description to readme about how this version of Patrol Data Capture differs from that other one -or- are we just marking the other repo as "deprecated" like was done with a few others

from solutions-geoprocessing-toolbox.

conklinbd avatar conklinbd commented on June 9, 2024

@mfunk, @jrweakland and I did not remember that this repo existed. Since I was the bonehead that should have searched before pulling this in I will pull all the other updates from that location and overwrite the recent addition.

from solutions-geoprocessing-toolbox.

jrweakland avatar jrweakland commented on June 9, 2024

@conklinbd What is the current status of this issue?

from solutions-geoprocessing-toolbox.

mfunk avatar mfunk commented on June 9, 2024

@conklinbd @jrweakland This repo has tests for Patrol Data Capture Tools.tbx:

  • test_gpx2layer
  • test_remove_duplicates
  • test_distinguish_trackts
  • test_despike_gps

And all run OK at Desktop 10.3. However there are 9 tools in the toolbox and I'm pretty sure that the 4 tests do not cover them.

If I take a look at the tools and compare them to the tests:

  • test_gpx2layer uses 'GPX to Layer'
  • test_remove_duplicates uses 'Remove Duplicate GPS Data'
  • test_distinguish_tracks uses 'Distinguish Tracks'
  • test_despike_gps uses ' Despike GPS Log'

So the following 5 tools do NOT have tests:

  • Append Tracks to DB
  • Import Patrol Rpt --- Not a great tool name
  • Make Track Lines
  • Recalculate Delta Times
  • Rejoin Track Parts

from solutions-geoprocessing-toolbox.

csmoore avatar csmoore commented on June 9, 2024

Just a follow up :

You can remove these 3 from the list of those needing tests:

  • Make Track Lines
  • Recalculate Delta Times
  • Rejoin Track Parts

test_distinguish_tracks - calls "Distinguish Tracks" which calls "Make Track Lines" and "Recalculate Delta Times"
Rejoin Track Parts - requires user input and a user selection so doesn't really make sense in an automated test

Also - it wasn't possible to readily rename "Import Patrol Rpt" because there is already a "Import Patrol Report(.py)" in the toolbox

from solutions-geoprocessing-toolbox.

mfunk avatar mfunk commented on June 9, 2024

Just an update on this one. I've added test for Rejoin Track Parts and Import Patrol Report. I renamed Import Patrol Rpt to Import Patrol Report, in the process. But currently i'm having issues getting the test to work. Unfortunately the tool is failing with an Invalid field type error that is proving difficult to locate.

test_import_patrol_rpt:
     [exec] Starting Test: TestImportPatrolRpt
     [exec] Setting up inputs and environment...
     [exec] Number of rows in Patrol Report Table before: 0
     [exec] Number of rows in Enemy Sightings Table before: 0
     [exec] Selecting track OBJECTID = 2 for report...
     [exec] Executing RejoinTrackParts_pdc...
     [exec] ERROR: Executing: ImportPatrolReport inputLinesFC_layer TrackGUID C:\Users\matt2542\Documents\GitHub\solutions-geoprocessing-toolbox\data_management\data\PatrolDataCapture\PatrolReport017.xml C:\Users\matt254
2\Documents\GitHub\solutions-geoprocessing-toolbox\data_management\data\geodatabases\test_patrol_data_capture_inputs.gdb\PatrolReport C:\Users\matt2542\Documents\GitHub\solutions-geoprocessing-toolbox\data_management\dat
a\geodatabases\test_patrol_data_capture_inputs.gdb\EnemySightings
     [exec] Start Time: Fri Aug 14 09:01:08 2015
     [exec] Failed to execute. Parameters are not valid.
     [exec] ERROR 000308: Invalid field type
     [exec] Failed to execute (ImportPatrolReport).
     [exec] Failed at Fri Aug 14 09:01:08 2015 (Elapsed Time: 0.01 seconds)

If you use the same inputs in a model, or directly in the tool in ArcMap it works just fine. But inside a script it fails. Still working on this.

from solutions-geoprocessing-toolbox.

pshowalter avatar pshowalter commented on June 9, 2024

I have seen scripts that run fine on laptop using Python 32, wont run on a server, that defaults to Python 64. In this case it was differing of the handling of path to a FC.

from solutions-geoprocessing-toolbox.

mfunk avatar mfunk commented on June 9, 2024

Thanks @pshowalter but it was something in the model tool that was being tested. I converted it to a script and got it working as it should have been.

To this point the tests are made and running.

from solutions-geoprocessing-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.