EarthSystemCoG / COG

COG source code
BSD 3-Clause "New" or "Revised" License
8 stars 16 forks source link

Import/Export of search facets configuration #1202

Closed LucaCinquini closed 8 years ago

LucaCinquini commented 8 years ago

Who: ESGF Installation Team

It would be good to be able to export a project facet configuration to some file, and reload it from the same location. It would make it easier to share configuration among projects and to move the configuration from a test to a production server.

LucaCinquini commented 8 years ago

This is now done: a project administrator can export the facet configuration (including search groups) to a standard project location: $COG_CONFIG/myprojects/$PROJECT_SHORT_NAME/search.cfg, and re-import it from the same location. This makes it easy to cut-and-paste facet configuration across projects.

LucaCinquini commented 8 years ago

An example of full project facet configuration follows. The format is the standard python configuration files format, with e GLOBAL section for project-wide settings, and a separate section for each facet group.

[GLOBAL] url = http://esgf-node.jpl.nasa.gov/esg-search/search/ constraints = distrib=false&project=obs4MIPs modelMetadataFlag = True replicaSearchFlag = True latestSearchFlag = True localSearchFlag = True

[0=default] 0 = source_id|Instrument 1 = institute|Institute 2 = cf_standard_name|CF Standard Name 3 = experiment|Experiment 4 = time_frequency|Time Frequency 5 = product|Product 6 = realm|Realm 7 = variable|Variable 8 = variable_long_name|Variable Long Name 9 = cmor_table|CMIP Table 10 = experiment_family|Experiment Family

[1=Additional Filtering] 0 = model|Downscaling Method 1 = driving_model|Driving Model 2 = protocol|Protocol 3 = metric_group|Metric Group 4 = region|Region 5 = resolution|Resolution

[2=Standard] 0 = instrument|InstrumentXYZ

[3=Evaluation] 0 = period|Period 1 = variable|Variable / Index 2 = metric|Metric 3 = frequency|Averaging Interval 4 = month|Month 5 = season|Season

murphysj commented 8 years ago

Can this method be used to combine facets in groups ala #635?

On Mon, Jan 11, 2016 at 2:10 PM, Luca Cinquini notifications@github.com wrote:

Assigned #1202 https://github.com/EarthSystemCoG/COG/issues/1202 to @murphysj https://github.com/murphysj.

— Reply to this email directly or view it on GitHub https://github.com/EarthSystemCoG/COG/issues/1202#event-511629752.


Sylvia Murphy NESII/CIRES/NOAA Earth System Research Laboratory 325 Broadway, Boulder CO 80305 Time Zone: U.S. Mountain Web: http://www.esrl.noaa.gov/nesii/ Email: sylvia.murphy@noaa.gov Phone: 303-497-7753

LucaCinquini commented 8 years ago

Yes I updated that ticket as well. L

On Jan 11, 2016, at 2:31 PM, Sylvia Murphy notifications@github.com wrote:

Can this method be used to combine facets in groups ala #635?

On Mon, Jan 11, 2016 at 2:10 PM, Luca Cinquini notifications@github.com wrote:

Assigned #1202 https://github.com/EarthSystemCoG/COG/issues/1202 to @murphysj https://github.com/murphysj.

— Reply to this email directly or view it on GitHub https://github.com/EarthSystemCoG/COG/issues/1202#event-511629752.


Sylvia Murphy NESII/CIRES/NOAA Earth System Research Laboratory 325 Broadway, Boulder CO 80305 Time Zone: U.S. Mountain Web: http://www.esrl.noaa.gov/nesii/ Email: sylvia.murphy@noaa.gov Phone: 303-497-7753 — Reply to this email directly or view it on GitHub.

murphysj commented 8 years ago

Yep, sorry. Did not see that until after I had commented.

On Mon, Jan 11, 2016 at 2:35 PM, Luca Cinquini notifications@github.com wrote:

Yes I updated that ticket as well. L

On Jan 11, 2016, at 2:31 PM, Sylvia Murphy notifications@github.com wrote:

Can this method be used to combine facets in groups ala #635?

On Mon, Jan 11, 2016 at 2:10 PM, Luca Cinquini <notifications@github.com

wrote:

Assigned #1202 https://github.com/EarthSystemCoG/COG/issues/1202 to @murphysj https://github.com/murphysj.

— Reply to this email directly or view it on GitHub https://github.com/EarthSystemCoG/COG/issues/1202#event-511629752.


Sylvia Murphy NESII/CIRES/NOAA Earth System Research Laboratory 325 Broadway, Boulder CO 80305 Time Zone: U.S. Mountain Web: http://www.esrl.noaa.gov/nesii/ Email: sylvia.murphy@noaa.gov Phone: 303-497-7753 — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/EarthSystemCoG/COG/issues/1202#issuecomment-170697906 .


Sylvia Murphy NESII/CIRES/NOAA Earth System Research Laboratory 325 Broadway, Boulder CO 80305 Time Zone: U.S. Mountain Web: http://www.esrl.noaa.gov/nesii/ Email: sylvia.murphy@noaa.gov Phone: 303-497-7753

murphysj commented 8 years ago

@LucaCinquini

Hitting the export search configuration on the obs4mips page on cudev throws a 500 server error.

LucaCinquini commented 8 years ago

It was a permission problem: the web server needs to have access to that directory. As a consequence, I changed the project configuration directory to MEDIA_ROOT/config/$project_short_name where MEDIA_ROOT is defined in cog_settings.cfg

murphysj commented 8 years ago

verified on cu dev closing.