Giter Club home page Giter Club logo

Comments (5)

thermokarst avatar thermokarst commented on August 10, 2024

This block in the framework looks promising:

https://github.com/qiime2/qiime2/blob/3e053cba101ace49ba52e16cba0bd6966973b0b3/qiime2/plugin/model/directory_format.py#L102-L105

from q2-types.

Oddant1 avatar Oddant1 commented on August 10, 2024

@thermokarst the drive link isn't loading for me.

from q2-types.

thermokarst avatar thermokarst commented on August 10, 2024

Thanks @Oddant1 --- looks like the user stopped sharing their data. No worries.

from q2-types.

Oddant1 avatar Oddant1 commented on August 10, 2024

I took another look at this and it looks like right here in the framework is where the issue is. https://github.com/qiime2/qiime2/blob/81f9bc1e735a1d9c1c852d144b8302ab4c24a3cc/qiime2/plugin/model/directory_format.py#L89-L105

Specifically on line 93 we regex the pathspec against the actual path which allows any path that is a superset of the pathspec to get through. This explains how "MANIFEST.txt" and "metadata.yml.txt" got through. The path we regex against is the path to the file relative to the root directory of the artifact.

It seems like we might be able to just use re.fullmatch instead of re.match? Provided the pathspec is the full file path from the artifact's root (so if the file is nested within another directory inside the artifact's data directory that directory is part of its pathspec) I think this should work.

from q2-types.

thermokarst avatar thermokarst commented on August 10, 2024

Awesome! Can you write up a unittest that recreates the case presented here in this issue? It will fail, until we get the fix merged into the framework. Thanks!

from q2-types.

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.