Code Monkey home page Code Monkey logo

Comments (3)

rgerkin avatar rgerkin commented on July 29, 2024

@russelljjarvis
This and some of the code in the few dozen lines above it are still model specific (referring to LEMS_2007One and such). Can this section be made model-independent by having it determine the name of that directory from some other attribute of the model (like the orig_lems_file_path, for example).

from neuronunit.

russelljjarvis avatar russelljjarvis commented on July 29, 2024

The problem in this specific case is that the path self.orig_lems_file_path looks like:

/neuronunit/tests/NeuroML2/LEMS_2007One.xml/x86_64

but we actually just want:

/neuronunit/tests/NeuroML2/x86_64

Maybe instead of using the commands stated below, I can find a command that simply takes an absolute file path and returns just the directory that contains that file, then /x86_64 should be appended to this path.

This is generalizable for different NEURON models generated from NeuroML, xml file paths, but checking for x86_64 obviously won't be helpful for pyNN, NEST, or GENESIS etc.

   sort_file_path, _ = self.orig_lems_file_path.split("/LEMS_2007One")
   sort_file_path, _ = os.path.splitext(sort_file_path)

Alternatively we could check for the x86_64 subdirectory by recursively searching, but I think the above option is better. I

/neuronunit/tests/NeuroML2/LEMS_2007One.xml/x86_64

from neuronunit.

russelljjarvis avatar russelljjarvis commented on July 29, 2024

Just ignore this thread. I think some of my confusion comes from a git merge I completed. There is old code that you wrote that used to find the directory that contains the file, but it got buried somehow. I will check older commits.

from neuronunit.

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.