Giter Site home page Giter Site logo

Comments (12)

edpaget avatar edpaget commented on August 15, 2024

I have Paper Trail setup for the workflow and project content models, but as I looked into starting work on #122 I don't think it's the best solution.

Since these are just going to be json blob, it seems like it work make more sense to just create a Versions model and store the entire old json blob in it along with a timestamp and a reference to the old resource.

We'd expose these as a nested version endpoint under the main resource endpoint, so /project_contents/1/versions, /subjects/2/versions, /workflow_contents/2/versions. @brian-c let me know if you don't think we should break the previous flat api for versioning. To me the above routes make more sense than /project_content_versions?project_content_id=1, but it doesn't matter too much to me.

from panoptes.

brian-c avatar brian-c commented on August 15, 2024

Looks good to me. They'll be listed in the top-level links anyway, right?

from panoptes.

edpaget avatar edpaget commented on August 15, 2024

Yes.

from panoptes.

camallen avatar camallen commented on August 15, 2024

This sounds fine if we're just showing old versions. If we want the funky diffs / restore functionality we can get this for free with paper trail (not saying we can't make it but this gem is pretty stable for this).

from panoptes.

edpaget avatar edpaget commented on August 15, 2024

That's fair. I think it should be pretty simple to a basic diff a json object client-side, I wasn't sure if how paper trail's diff interact with json field (or the jsonb fields when we can move to them) in postgres. I thought it did a diff at the model attribute level as opposed to to within the values of the attributes.

from panoptes.

brian-c avatar brian-c commented on August 15, 2024

Is this truly truly a concern for version 1?

Is there anywhere on the front end you're planning on exposing it? I imagine it's a footnote in the reduction.

from panoptes.

edpaget avatar edpaget commented on August 15, 2024

I think it'd be around and exposed for doing translations since that's what we do now. I'd prefer not to take a step back in terms of supporting other languages.

from panoptes.

camallen avatar camallen commented on August 15, 2024

@aliburchard - thoughts?

from panoptes.

camallen avatar camallen commented on August 15, 2024

Best to extract the paper trail / custom versioning to it's own issue. This issue will depend on that funcationatliy though.

from panoptes.

edpaget avatar edpaget commented on August 15, 2024

Opened #188

from panoptes.

aliburchard avatar aliburchard commented on August 15, 2024

I'm not totally sure I follow, but I can see two types of use cases for tracking updated metadata.

  1. Workflow depends on subject metadata. Say the decision tree options or tasks depend on subject location or time of day. Science team might upload subjects with certain metadata, then realize that they have made some mistake that they failed to catch before launching. I'm not sure what fixing that looks like -- either updating metadata for certain subject IDs or essentially deleting those subjects and re-uploading them.

  2. Workflow doesn't depend on subject metadata, but metadata is displayed on the interface and publicly available for other science teams (which is an eventual outcome we've bounced around). In this case, updating metadata isn't critical to the app producing useable data, but tracking those changes and displaying updated metadata would improve the user experience (if it's displayed) and ensure that the data being made publicly available is the "correct" data.

from panoptes.

aliburchard avatar aliburchard commented on August 15, 2024

and, @brian-c @camallen, I do think it's important that metadata be incorporated into version 1. I think that not building in some sort of metadata handling and tracking will limit the types of projects that can use panoptes. For example, even though the Snapshot Serengeti interface doesn't ask different questions based on the subject metadata, images are grouped and presented in those groups based on metadata...

from panoptes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.