Coder Social home page Coder Social logo

Comments (7)

william-silversmith avatar william-silversmith commented on June 9, 2024

Thanks for reporting this Nico. Initially I was torn on this, since it encourages you to fix the provenance file, but it might make more sense to issue a warning.

from cloud-volume.

william-silversmith avatar william-silversmith commented on June 9, 2024

On second thought, the warning should be better, but this should be an irrecoverable error, and not only for motivational purposes. If we continue to allow processing, say using an empty version of the provenance file, it's likely that it will get committed and overwrite the extremely useful but ill formatted notes already existing.

Alternatively, we could ban editing the provenance file from CloudVolume in cases where the JSON is corrupted. What do you think @nkemnitz?

from cloud-volume.

william-silversmith avatar william-silversmith commented on June 9, 2024

I have another idea that I think I'm just going to go with. We should use json5 (http://json5.org/) instead to make it easier to write the provenance files and make them accept things like trailing commas.

from cloud-volume.

nkemnitz avatar nkemnitz commented on June 9, 2024

I am not sure if I understand: Why is the provenance file loaded? I thought that is a human-readable info file with contact information. For running tasks, I should only need the info file, right?

If it is necessary to return an error message, then I would say it should go to the maintainers of the dataset/layer, not to the end-user :P

from cloud-volume.

william-silversmith avatar william-silversmith commented on June 9, 2024

You can also use the provenance file to detail how the dataset is being modified and, yes, send messages to maintainers. I'm including a way to override the provenance file in the constructor in another PR.

from cloud-volume.

nkemnitz avatar nkemnitz commented on June 9, 2024

The json5 solution is definitely a suitable workaround for the specific issue I had - thanks.
But I think it does not fix the underlying design flaw: If someone wants to work with the data alone (e.g. getting cutouts), then there is no need to download and parse the (possibly invalid) provenance file.

from cloud-volume.

william-silversmith avatar william-silversmith commented on June 9, 2024

No one has complained about this since this issue was opened, so I'm going to consider my solution a success. :) Only valid provenance files are written!

from cloud-volume.

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.