Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node Metadata Exposed Please #27

Closed
joewheaton opened this issue May 6, 2020 · 16 comments
Closed

Node Metadata Exposed Please #27

joewheaton opened this issue May 6, 2020 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@joewheaton
Copy link
Contributor

A lot of project.rs.xml files have <MetaData> tags within the types. WE already have a useful View Project MetaData right click command for the project.
image

Request

We need to add View Item Metadata at the node level (grayed out if no <MetaData> tags for that node). I would suggest that the dialog title would just be the name of that node + Metadata (e.g. for a Topographic Survey node the title would be Topographic Survey Metadata).

image

Nice Example

I'm playing with the CHaMP one right now and its extremely rich... For example, a topo DEM:

<DEM guid="761144c9-52c9-4857-ab62-4919b7948449" id="DEM">
          <Name>DEM</Name>
          <Path>Topography\TIN0001\DEM.tif</Path>
          <MetaData>
            <Meta name="left">477160.0</Meta>
            <Meta name="top">5123950.0</Meta>
            <Meta name="right">477284.0</Meta>
            <Meta name="bottom">5123756.0</Meta>
            <Meta name="cellsize">0.1</Meta>
          </MetaData>
        </DEM>
@joewheaton joewheaton added the enhancement New feature or request label May 6, 2020
@MattReimer
Copy link
Member

Remember there are 3 different places Metadata can be in a project XML: project-level (top of the file), realization-level and layer-level

@joewheaton
Copy link
Contributor Author

Hey @MattReimer this is the ticket on Metadata. I think it is already there. The Metadata I want I will expose in different tickets (e.g. in #118).

@MattReimer
Copy link
Member

Sure. This ticket is a feature request for having some kind of popup to see metadata on layer nodes.

@philipbaileynar
Copy link
Contributor

  1. Reusing the project metadata form for dataset metadata is easy.
  2. In theory the column on the right is a dumb text column, but we can fake hyperlinks by colouring the text blue and (probably) underline the text.
  3. We can capture clicking on any cell... if the cell contents start with http:// or https:// we can launch the user's default browser at that address.

@philipbaileynar
Copy link
Contributor

I will also say that these Microsoft .net grids are annoying to work with and quite inflexible (see my URL hack above).

Another option would be to replace the grid with a temporary HTML page that only gets generated when the user asks to look at the metadata. This HTML page could be prettier and handle URLs more elegantly. Two ideas for generating the HTML page:

  1. Straight DOM writing in code.
  2. XSL transform that converts the project XML meta into HTML. We did this years ago on GCD or topo toolbar... I can't remember!

The HTML files would only be a few kilobytes each. We generate them fresh every time they are viewed and store them in the users temp folder and forget about them.

@philipbaileynar
Copy link
Contributor

A better idea than the temporary HTML forms...

Do away with the metadata user interface form altogether. When the user right clicks on either the project node, or the node for any data layer, RAVE launches the HTML report for the project at the appropriate section.

This idea requires improving the way HTML anchors are written to the HTML file so that they have known name attributes (and not the automated names that are generated currently).

It also requires beefing up our existing HTML reports to include an appendix with all the appropriate metadata from the project file. This is something that should be done anyway.

@joewheaton
Copy link
Contributor Author

Agreed. This is a great idea. It will encourage us curating those HTML views in the report a little more (both the CSS) and the content.

Dumb question... are those HTML reports pure HTML or can they contain MarkDown? I would like to get our folks authoring some content very soon on that front. It is also where I would like the QA/QC report to get consumed. I'm guessing it has to be just pure html (our Jekyll sites are doing the work of rendering the MD right?). I ask because our folks are more familiar with just MD, but know a little html because we blend it. Not a big deal either way... just curious.

@philipbaileynar
Copy link
Contributor

The reports are all HTML generated via Python during the tool run. @MattReimer abstracted the report generation code into a tidy, easy to use library, so anyone with a modicum of Python skill should be able to extend the reports.

Here's the Python that generates the BRAT report (that uses the library linked above). It's extremely rudimentary.

@MattReimer this raises another wrinkle... The reports are generated during tool run. But the project XML is not enriched with upstream warehouse metadata until the enricher runs after the tool has completed. In other words, the warehouse metadata tags are not present in the project XML at point in time when the report is generated.

@MattReimer
Copy link
Member

Order of operations is always tricky. Maybe the decorator could rerun the report generator? In most cases it's just a single function call that takes like 2 seconds...

@MattReimer
Copy link
Member

@philipbaileynar we have a version of VBET now that has metadata. BRAT, RVD and confinement are on the way but I'm posting this here now in case you want a head start. I'll post the other links as they become availabel

https://northarrowresearchlabs.github.io/riverscapes-staging/#/Anabranch/869d493f-582c-44a2-b701-3936722e6e22

@MattReimer
Copy link
Member

http://northarrowresearchlabs.github.io/riverscapes-staging
On the staging server search for the tag: "NEW_META'

Confinement didn't finish for some reason but the rest are there

@philipbaileynar
Copy link
Contributor

@joewheaton and @MattReimer here is RAVE with the layer metadata and project reference capabilities. Please provide feedback before I release on Monday:

https://youtu.be/L6taQ-3osTU

@MattReimer
Copy link
Member

Looks good to me. This is exactly what I envisioned for the first pass at this stuff

@joewheaton
Copy link
Contributor Author

Fancy @philipbaileynar! Looks great.

@joewheaton
Copy link
Contributor Author

BTW... "View Layer Source Project" is fine. I guess it could be "View Layer's Source Riverscapes Project" so that it is possessive and emphasizing that? BTW, this
image is what we were using on RS Site for project icon... Not that it has to be.

@philipbaileynar
Copy link
Contributor

This is implemented in RAVE 2.1.0.

Nice logo suggested but too much detail at 16x16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants