Conversation
steveoh
left a comment
There was a problem hiding this comment.
yeah this looks like you're on the right track
…utrans-attribute-rules into feat/road-name-calculation i realign local with remote
|
i made a few changes based on your suggestions. should i mark it as 'ready for review'? |
|
Can you send me or better yet commit the xml schema doc so I can load in the db and test this? |
The schema imported but when I tried to append data to some of the datasets so the rules will function the schema's didn't match and it failed. I ended up having to delete and then copy in the data. Let's do a schema export with data to eliminate these steps. |
this might not be the expected behavior
steveoh
left a comment
There was a problem hiding this comment.
This seems to be in a draft state still but going in the right direction.
There are quite a few issues that are frustrating for a reviewer and I will list them so we can have more productive reviews in the future.
- The pr text is a bit light. It says you're hoping to be going in the right direction but don't really state the known issues or things you are working out.
- You don't mention what the full name calculation is expected to do. We don't have tests yet so some text on expectations would be very helpful.
- The
ar.pywasn't able to run and add the rules for testing. - The pro project was missing with the connection sde file.
- The
roads_editfc was not able to have attribute rules added to it since it is missing global ids.
Otherwise yes it looks like you aren't in the weeds making timely mistakes.
|
thanks for the useful feedback and for the work you put into this pr to get it up and running. all good points - and noted on my end. I'll pull this branch to my local repo. then...
Does that sound right? thanks again. once i get this set up, i feel as though I'll be able to make more timely progress on the project - doing local testing and a more focused pr. should i do my local testing using the pro project you added to the repo? |
|
You bet. This branch should already exist in your local repo unless you did all the work in the github.com ui which I doubt. So you can most likely just checkout feat/road-name-calculation if you're not already on it and git pull.
Yes we should align on that pro project. There might be some broken items, i'm thinking paths etc but we should work that out so we are working on identical items. |
|
k, perfect. yup, i pulled your changes to my local branch. i'm trying to work out the pro project now. working on how to use the shared sde connection file. is that possible? it looks like you used os auth. is there a way we can use a common Instance name or should i just use my local connection string and just work on sharing the pro project? (if that makes sense) |
|
let's try to go with the local style as that will work for anyone with a local sql server and won't have any username/passwords in it. |
this is now working in arcgis pro testing
this is now working in arcgis pro testing
and set triggers to update; also rename ar rules to reflect the associated field name
|
all of the calculation rules appear to be working in arcgis pro during my manual testing. the next step is to now write some testing in test_roads.py. i put some time aside next week to do so (beginning Monday). also, currently, we have one constrain rule that we've created (predir_domain_constraint) but there are no domains in the db. how should we handle that? i guess they didn't carry over in the XML schema. i can export the existing domains in utrans (the 'real' utrans) to tables and then we can add them to the local utrans db. does that work? |
steveoh
left a comment
There was a problem hiding this comment.
looks like you're on the right track!
| @@ -0,0 +1,18 @@ | |||
| table = "Roads_Edit" | |||
There was a problem hiding this comment.
chore: add this file to the .gitignore please
|
|
||
| ```sh | ||
| conda create --clone arcgispro-py3 --name utrans | ||
| conda create --name utrans |
| sde = os.path.join(os.path.dirname(__file__), '..', 'pro-project', 'localhost@utrans.sde') | ||
| TABLE = os.path.join(sde, table_name) |
There was a problem hiding this comment.
nitpick: we should switch this to use the newer pathlib which is the recommended library for the future.
something like the following should suffice
| sde = os.path.join(os.path.dirname(__file__), '..', 'pro-project', 'localhost@utrans.sde') | |
| TABLE = os.path.join(sde, table_name) | |
| from pathlib import Path | |
| sde = Path(__file__).parent / '..' / 'pro-project', 'localhost@utrans.sde' | |
| TABLE = str(sde / table_name) |
| with arcpy.da.UpdateCursor(TABLE, ['OID@'], where_clause="FacilityName IN ('0', '1')") as cursor: | ||
| for _ in cursor: | ||
| cursor.deleteRow() | ||
| #arcpy.management.TruncateTable(TABLE) |
There was a problem hiding this comment.
chore: we need to figure out the reset issue otherwise the subsequent tests will fail



just getting things going, so i wanted to check in before i got too far.