Esri / developer-support

Proof of concept developer code and samples to help be successful with all ArcGIS developer products (Python, NET, JavaScript, Android…). The repository is designed to be an exchange for sharing coding conventions and wisdom to developers at all skill levels.
Apache License 2.0
268 stars 165 forks source link

three AGOL scripts #233

Closed kgerrow closed 8 years ago

kgerrow commented 8 years ago

This is my first try to upload scripts.

Export Item Size Export Users Overwrite preserving editor tracking from a file geodatabase.

nohe427 commented 8 years ago

How many scripts are you attempting to upload? This seems like quite a bit of files to be uploaded.

nohe427 commented 8 years ago

I see what you did. It looks as though you uploaded the entire requests library in this PR.

kgerrow commented 8 years ago

Yes I did! Usually I ship these scripts with the library so they run smoothly quickly, no sure how its done here on the Github

There are three main scripts, I chatted with Artemis and will upload seperately on the next go.

nohe427 commented 8 years ago

We just need the 3 relevant scripts. In your readme we put down the required dependencies and how to install them. Including them in github would unintentionally bloat the repo. Let's see if we can remove the requests library without having to submit a new pull request :smiley:

jgravois commented 8 years ago

i'm with @nohe427 on this one. if you're able to lay down another commit (which removes the supporting files and documents what's necessary to run the samples) and push to the same branch of your fork, the change will automatically be reflected here.

jgravois commented 8 years ago

just to provide a little more clarification, the three scripts you're proposing to include in this repository, along with documentation regarding their usage and purpose, would make a totally welcome addition here. what @nohe427 is pointing out is that its overkill to insert the Python dependencies too.

From Contributing: Guidelines and Conventions

Remove framework files and unnecessary files

the reason we enforce this is because its very common for code samples to have external dependencies and if they were all packaged here the repository size would quickly spin out of control.

If you're looking for a way to provide this sample code in a way thats simple for folks who are unfamiliar with Python and don't want to ask them to install the requests module themselves, i'd suggest zipping up the entire package and creating an ArcGIS Online item. Then, in this repo, you could still provide the individual scripts along with instructions for using them in an overarching doc page with two different categories.

  1. instructions for people which points them at the complete .zip file in ArcGIS Online
  2. instructions for people who are interested in setting up the project locally and installing requests themselves.

let me know if any of that doesn't make sense. the purpose of this code review is to come up with a solution thats agreeable to everyone. afterwards you can make the modifications in your own local copy of the project, commit them (to make another snapshot of the difference between your repo and the one here) and then push that commit to the same branch of your fork thats hosted online so that we'll be able to review them right here in this pull request.

if you need a hand with the actual git/github workflow, i'm more than happy to help with that too.

kgerrow commented 8 years ago

Okay,

Thanks for the help! I think I got this commit cleaned up and added links to the AGOL item. That workflow makes sense to me.

Let me know if this works better

nohe427 commented 8 years ago

One last request, can you delete out the PYC files? These should be generated on the users end when they run the scripts (if I am not mistaken).

kgerrow commented 8 years ago

Alright that is all removed now

jgravois commented 8 years ago

looking for someone/anyone to take a stab at running these sample scripts so that they can be merged?

a python whiz would be fine, but it'd be even better to get feedback from someone thats just getting familiar with it. im specifically curious to know whether there is already enough information in the README for the user to make sense of installing the dependencies which we asked @kgerrow to remove so that they are available locally.

kgerrow commented 8 years ago

As a note, I would suggest not testing the itemCSV on the support organization (ess) as it has a ton of hosted services which may take quite a while to run.

phpmaps commented 8 years ago

@kgerrow @jgravois @nohe427

I reviewed the ItemCounterHelper.py, itemSizeCSV.py, accountHelper.py, create_User_CSV.py and READMEs and see both README's are present. All of those look good and worked for me. However, I see an issue with the OverWriteWIth EditorTracking.py. It started with the space in the name. The file name is a bit stange with capital "I" and space included. However, since you document that this script should be run in an IDE, I guess all is good as a POC.

The bigger issue with OverWriteWIth EditorTracking.py is I get this error. Maybe I am doing something wrong or my service and file geodatabase is not set up properly??

Console messages

{u'services': [{u'encodedServiceURL': u'http://services.arcgis.com/q7zPNeKmTWeh7Aor/arcgis/rest/services/local/FeatureServer', u'jobId': u'6d2d70e5-d855-4e17-9590-7fb5a896a587', u'serviceurl': u'http://services.arcgis.com/q7zPNeKmTWeh7Aor/arcgis/rest/services/local/FeatureServer', u'type': u'Feature Service', u'serviceItemId': u'fbdb8887343145909a9dc8ea93a8ff7d', u'size': 1130496}]}

``` processing

failed

@kgerrow Can you help me understand what might be the issue? Then I can merge this pull request in.