GithubHelp home page GithubHelp logo

Comments (14)

jasmainak avatar jasmainak commented on August 17, 2024 1

okay I see, sure. Either solution works then :)

from ephypype.

dmalt avatar dmalt commented on August 17, 2024

@annapasca After running pytest I get a bunch of leftover files inside the ephypype dir
image

Also if I run pytest twice one of the tests fails to overwrite these files

from ephypype.

jasmainak avatar jasmainak commented on August 17, 2024

from ephypype.

dmalt avatar dmalt commented on August 17, 2024

For test_cli.py I've been using a tool from click which is called 'isolated filesystem'. It creates a folder with random name in /tmp each time it runs.

from ephypype.

annapasca avatar annapasca commented on August 17, 2024

Hi @dmalt thks to highlight this issue.

I have to add also in test_power and test_preproc the tmp dir as in test_fif2ts

I'l wait for the merge of #49 and fix it. Thks!

from ephypype.

jasmainak avatar jasmainak commented on August 17, 2024

You could also use _Tempdir from mne ...

from ephypype.

annapasca avatar annapasca commented on August 17, 2024

You could also use _Tempdir from mne ...

I see...it's a class that also uses tempfile
Do u think it's better to use the _Tempdir class of mne?

from ephypype.

jasmainak avatar jasmainak commented on August 17, 2024

The "isolated filesystem" seems to change the current directory. Not sure if that fixes your problem. Neuropycon should really not write to the working directory. It should write to a path that is specified by the user ...

from ephypype.

dmalt avatar dmalt commented on August 17, 2024

What's the problem with changing CWD to a folder in tmp? You can write there and then it will automatically change back after you're out of the with statement. Explicit path for writing is at hand with os.getcwd(). It's actually quite convenient since it also does the cleaning for you.

from ephypype.

jasmainak avatar jasmainak commented on August 17, 2024

I'm just a worried that by default neuropycon writes to the current directory. This is a problem not just for tests but for users, no? Using the "isolated filesystem" will hide the issue then.

from ephypype.

dmalt avatar dmalt commented on August 17, 2024

Are you talking about the command line utility neuropycon or the whole thing?

from ephypype.

jasmainak avatar jasmainak commented on August 17, 2024

I mean the whole thing, not just the command line utility ...

from ephypype.

dmalt avatar dmalt commented on August 17, 2024

I don't think the whole thing is really related to the unit tests case because if you're a user you specify where to save the results when you create the workflow. At this stage the workflow root is created. Then each node creates its own folder inside root and every function is working inside its separate dir inside this root/node, so it's supposed to save to cwd I think.

from ephypype.

jasmainak avatar jasmainak commented on August 17, 2024

closed by #55

from ephypype.

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.