Closed lfunkhouser closed 6 years ago
I was going to take this one, but I can't seem to assign it to myself.
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.
Looks like you can have toolsets in a PYT https://community.esri.com/thread/75524 http://joelmccune.com/toolsets-in-python-toolboxes/
looking into how we start to move the other tools into a pyt.
I did confirm you could use toolsets:
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.
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
I do not see a reason for packaging to be addressed right now based on the thought that we do not package
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
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
@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?
@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 )
So that can be in the PY file it calls, not just in the PYT. Got it.
Working on creating a VisTools.py file for the PYT to import, to contain the Visibility tools and utilities.
I have managed to get a PYT to have a Visibility Tools toolset and to include the Add LLOS Fields tool to that toolset. Still having some issues getting the tool to run (parameters).
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
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
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
Working on Add RLOS field. Tool is not showing up in the Visibility group, and tool name appears blank. I thought that: self.label = "Add RLOS Fields" self.description = "Adds Observer fields and values to inputFeatures." self.category = "Visibility" would handle that.
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
@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
I am finishing up the conversion tools. Should have my PR in later tonight.
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.
@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.
This issue has been converted to an epic and issues for each toolset created:
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
Created new GRG toolset page, to match the existing Distance and Direction, Visibility, and Conversion toolset pages (CMS).
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