clandininlab / brainsss Goto Github PK
View Code? Open in Web Editor NEWPreprocessing of volumetric neural data on sherlock (motion correction, zscoring, etc)
Preprocessing of volumetric neural data on sherlock (motion correction, zscoring, etc)
I checked on this with my development team and got several comments and suggestions:
I see two issues. The first is that it will violate expectations of CLI tools, which is fine if your documentation is good and users aren't picky. The second is that it's expecting the entire JSON to be a single string, so quotes are going to have to be carefully escaped and painful to debug. If I were to do this, I would probably make all of these --flag ARG arguments and then add in a special --json PATH argument that would allow you to pass in a file instead. I would not do JSON as a single positional argument.
The shell script is using the traditonal --flag styling, I'd recommend using a library like click (to help set the boolean flags etc) in python and then argv can be passed directly through the shell script without that inital switch statement.
or put everything in json files like [@Markiewicz] said, then your configuration is saved to some place other than the history file.
If you’re refactoring, I don’t really see a benefit of checking the args in the bash file - I think it’s more beneficial to have an argument parser in the python script (gives you type validation, help generation). Then you can remove L10-82 in the submission script and just replace with ARGS=($@)
I would probably just go with the third suggestion as I think it's simplest, though it will require some rework because args will be an argparse object rather than a dict, though it could be easily converted for backwards compatibilty. I will try these out and see.
Easy fix, maybe. I think the script being referenced in the main page documentation on Github is likely "preprocess.sh" within the brainsss/scripts folder. Likely just a typo.
wildcard imports (import *) are problematic - e.g. https://rules.sonarsource.com/python/RSPEC-2208
they can be particularly confusing within init.py because they make it challenging to figure out where a particular function is coming from and many people don't think to look there to figure out what's going on.
since I found it, I'm happy to fix it, but it will require breaking changes throughout the code so wanted to first check on what you think about this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.