Esri / military-tools-geoprocessing-toolbox

military-tools-geoprocessing-toolbox is a collection of models, scripts, and tools for use in ArcGIS for Desktop and ArcGIS Pro. This toolbox is one component that is a part of Military Tools.
Apache License 2.0
33 stars 14 forks source link

One toolbox for Military Tools #262

Closed lfunkhouser closed 6 years ago

lfunkhouser commented 6 years ago

Tasks

Per thoughts of working on this as of 25 Apr I feel like these should be the toolsets in the pyt

Dev Tasks

Convert the .tbx tools to .pyt:

Conversion

D&D

Viz

GRG


Add the ability to create grids in desktop products, ArcMap and ArcGIS Pro

GRG tools are maintained currently in this repo, https://github.com/esri/solutions-geoprocessing-toolbox.

GRG tools are incorporated into the MT GP toolbox

Acceptance Criteria: Target release: Military Tools 3.0 One toolbox Tests written and running for tools Toolbox included in the packaged solution Tools documented User documentation complete and published

BobBooth commented 6 years ago

I was going to take this one, but I can't seem to assign it to myself.

lfunkhouser commented 6 years ago

Moving out of Sprint 6 because this is a bigger conversation and needs to be planned as discussed during a previous Planning meeting. The discussion was focused around GRG is .pyt and Military Tools is not. It is not as easy as just moving it.

BobBooth commented 6 years ago

Looks like you can have toolsets in a PYT https://community.esri.com/thread/75524 http://joelmccune.com/toolsets-in-python-toolboxes/

topowright-zz commented 6 years ago

looking into how we start to move the other tools into a pyt.

csmoore commented 6 years ago

I did confirm you could use toolsets:

image

topowright-zz commented 6 years ago

Spent the day understanding exactly how we can tackle this task. I will work with the team to allow them to understand the work that needs to be done. A quick overview will be taking each tool and adding logic to allow it to behave in a way that allows it to be added to the pyt file. There is a ton of work on this issue that all of us can work on without stepping on each others toes, but we will have to work very closely together to make it happen.

csmoore commented 6 years ago

I picked up the "Update the Distance and Direction tools" task above.

Also, this might be a good time to check on the status of the problem of packing .pyt in Pro templates/projects: https://github.com/ArcGIS/solutions-defense/issues/429 - before we get to the template packaging stage with this toolbox - @topowright @dfoll @ACueva @lfunkhouser

topowright-zz commented 6 years ago

I do not see a reason for packaging to be addressed right now based on the thought that we do not package

csmoore commented 6 years ago

OK - I was confused looking at the acceptance criteria "Toolbox included in the packaged solution" - but I now see that probably means the MilitaryTools download zip since these tools aren't used in templates

BobBooth commented 6 years ago

I will take the Utilities. I can't edit the issue, for some reason, nor can I assign myself. Some GitHub permissions issue? I am logged in. @csmoore

BobBooth commented 6 years ago

@csmoore - I'm not seeing the self.category code used in the PYT from your PR. Shouldn't the GRG tools be in a GRG toolset? Obviously, I don't understand something, I'm seeing the GRG Tools toolset when I open the PTY in ArcMap. Maybe it is elsewhere?

csmoore commented 6 years ago

@BobBooth - https://github.com/Esri/military-tools-geoprocessing-toolbox/blob/dev/toolboxes/scripts/GRGTools.py#L53 (large files don't show up in the diff )

BobBooth commented 6 years ago

So that can be in the PY file it calls, not just in the PYT. Got it.

BobBooth commented 6 years ago

Working on creating a VisTools.py file for the PYT to import, to contain the Visibility tools and utilities.

BobBooth commented 6 years ago

I have managed to get a PYT to have a Visibility Tools toolset and to include the Add LLOS Fields tool to that toolset. image Still having some issues getting the tool to run (parameters).

topowright-zz commented 6 years ago

When inputting data types I have found this helpful: http://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/defining-parameter-data-types-in-a-python-toolbox.htm

csmoore commented 6 years ago

Status for D&D Tools -

Pyt-ported RangeRingsFromInterval tool is now working as expected ( in branch ).

I spent most of the time figuring out a few things that needed changed to get Feature Set working from the pyt

  1. Pyt seems to require the FGDB to be in place, the lyr file by itself is not sufficient, it requires the lyr and FGDB
  2. In Pro, you have to manually clear the selection or the last point entered is the only point processed (because Pro editing selects the last point)

Also, I noticed that D&D unit tests don't have tests that test the actual GP tools themselves so these tests should also be written

image

image

BobBooth commented 6 years ago

Working on Add RLOS field. Tool is not showing up in the Visibility group, and tool name appears blank. image.png I thought that: self.label = "Add RLOS Fields" self.description = "Adds Observer fields and values to inputFeatures." self.category = "Visibility" would handle that.

csmoore commented 6 years ago

The remaining 2 D&D tools were added today in branch: https://github.com/Esri/military-tools-geoprocessing-toolbox/tree/csm/%23262-add-grg

This just needs some more testing and the unit tests written/added for these 3 tools and then a PR can be done for that branch/toolset

image

csmoore commented 6 years ago

@BobBooth - you can also get that behavior if your tool fails to load ( gacks on parameters, validation, etc. ) - if you push your branch I can give it a check

topowright-zz commented 6 years ago

I am finishing up the conversion tools. Should have my PR in later tonight.

csmoore commented 6 years ago

To provide a clearer picture of the current status, the original issue has been updated to list the current state of the .tbx-to-.pyt tool conversion for each tool. It looks like 9 / 21 tools have been converted so we still have some ways to go.

topowright-zz commented 6 years ago

@csmoore thanks for updating the issue. I am missing something that I think I now understand based on PR from @dfoll. So I am not in the way I am working on Table to Point. Sorry for the delay, I was pulled away doing other things.

lfunkhouser commented 6 years ago

This issue has been converted to an epic and issues for each toolset created:

BobBooth commented 6 years ago

Updated What's New and Military Tools home page in GitHub to indicate conversion to PYT format and the addition of the GRG toolset, in PR https://github.com/ArcGIS/arcgis-solutions-website/pull/6431

BobBooth commented 6 years ago

Created new GRG toolset page, to match the existing Distance and Direction, Visibility, and Conversion toolset pages (CMS).