Skip to content

Edit wms datasets#66

Open
chrowe wants to merge 6 commits intomainfrom
edit-wms-datasets
Open

Edit wms datasets#66
chrowe wants to merge 6 commits intomainfrom
edit-wms-datasets

Conversation

@chrowe
Copy link
Member

@chrowe chrowe commented Jun 7, 2023

No description provided.

@chrowe chrowe requested review from AvraSaslow and weiqi-tori June 7, 2023 17:58
@chrowe chrowe force-pushed the edit-wms-datasets branch from df4f688 to 60cb5c7 Compare June 7, 2023 18:25
name = ly['data']['attributes']['name']
print(f'LAYER NAME: {name}')

old_value = ly['data']['attributes']['layerConfig']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should replace ['layerConfig'] with [layer_field]?

def create_headers():
return {
'content-type': "application/json",
'authorization': "{}".format(os.getenv('apiToken')),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the same format as the other update? 'authorization': f'Bearer {API_TOKEN}'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This edit_dataset script is not on the same level as the other edit_layer scripts. It should be the same for WMS/GEE/Carto to update any dataset fields. The differences are in the layer fields. I'm thinking about creating two scripts, one for updating dataset fields (could be used for all datasets), and the other for updating WMS layer fields. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants