Comments (3)
os.environ.get() works the same in both py2 and py3 and the getattr() approach should as well.
If the aspera_settings.ini file is always going to be ../ from enaDataGet.py
and utils.py
and you wanted to save that full path as a place to check when a specific file isn't provided and env var unset, you could put a line inside utils.py enaBrowserTools_path = os.path.dirname(os.path.dirname(__file__))
then call on the utils module to get it.
Extend this if-statement:
enaBrowserTools/python3/enaDataGet.py
Lines 53 to 55 in c0911de
elif os.environ.get('ENA_ASPERA_INIFILE'):
aspera = True
utils.set_aspera_variables(os.environ.get('ENA_ASPERA_INIFILE'))
elif:
eBT_path = getattr(utils, 'enaBrowserTools_path', '')
if os.path.exists(os.path.join(eBT_path, 'aspera_settings.ini')):
aspera = True
utils.set_aspera_variables(os.path.join(eBT_path, 'aspera_settings.ini'))
from enabrowsertools.
I'l have a look at this. I usually try to avoid environment variables as they can be dangerous. Though given these scripts are run locally I can probably loosen that rule
from enabrowsertools.
Added in v1.4 release.
from enabrowsertools.
Related Issues (20)
- Some SRA accession numbers don't work. HOT 2
- Errors accessing fastq files through enaDataGet HOT 2
- URL sanitizing breaks Aspera downloads HOT 2
- Genome download which files to use
- Error in using enaBrowserTools to download SRR
- No redownload of truncated files
- ssl Internal Error HOT 1
- Ability to only check if files are available for download
- HTTPError after enaGroupGet HOT 2
- Error with retrieving fastq files with enaGroupGet HOT 3
- TimeoutError with whatever I want to download HOT 1
- Error when downloading raw sequencing files from a registered project. HOT 1
- enaDataGet download giving HTTP Error 400 error HOT 10
- Accession not found even though it exists HOT 3
- enaDataGet error HOT 1
- enaDataGet error with FTP transfer HOT 1
- Can't download in parallel HOT 5
- enaGroupGet Portal API URLs return no results HOT 2
- enaDataGet - HTTP error 400 HOT 1
- 425 error - EnaDataGet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enabrowsertools.