Comments (5)
Can't we just make the logger directing ERROR to stderr instead of stdout?
2015-02-25 19:24 GMT+01:00 Yaroslav Halchenko [email protected]:
now if we run
$> nosetests -s -v datalad/tests/
datalad.tests.test_annexrepo.test_AnnexRepo_instance_brand_new ... ok
datalad.tests.test_annexrepo.test_AnnexRepo_instance_from_clone ... 2015-02-25 13:19:13,261 [ERROR ] 'git clone -v /home/yoh/proj/datalad/datalad/datalad/tests/testrepos/basic/r1 /home/yoh/.tmp/tmptoMerM' returned with exit code 128
| stderr: 'fatal: destination path '/home/yoh/.tmp/tmptoMerM' already exists and is not an empty directory.
| ' (gitrepo.py:59)
ok
...we get them spit out to the screen, which is not proper since they are
intended to error out at that point (right @bpoldrack
https://github.com/bpoldrack ?). so we need to swallow them.
In fail2ban we have a derived TestCase class for that purpose:
https://github.com/fail2ban/fail2ban/blob/HEAD/fail2ban/tests/utils.py#L200
which also allows to analyze those logs for testing (which we would need
to). But here we better come up with a decorator which captures and exposes
within the test the logs. Any takers? ;)—
Reply to this email directly or view it on GitHub
#45.
from datalad.
And what about this brand new idea of having a logger write it's output to a logfile, what you can browse/analyze afterwards?
from datalad.
- Regarding "directing ERROR to stderr instead of stdout" -- good idea in case of stdout (not file) output but not sure if I know/used straight solution for that with the python logger -- we might would need to provide a shim around the two. If interested -- figure it out BUT this is far from being a priority ATM. Just file a new issue so we don't forget
- logging to a file will happen and very simple todo, but also not a priority ATM. We will do it whenever we start working on a datalad config facility probably. But just to make you happy I will do it in a PR shortly
swallowing/suppressing logs is a bit more important atm since they pollute output of running tests
from datalad.
for 2. just accept #46 pull request
from datalad.
was implemented with swallow_logs
context manager in 43e2d72
from datalad.
Related Issues (20)
- datalad update fails randomly with error: "cannot lock ref 'refs/remotes/origin/master'" and ".... git-annex" HOT 1
- Github tarball checksums changed HOT 2
- Different HPC systems and users HOT 2
- Add ability to limit get (and thus install) --recursive installation of subdatasets
- Edge case: Large datalad saves with tight ulimits on many-core machines can fail
- 1-letter shortcut for `--reobtain-data` in datalad-update HOT 1
- `str(GitTransportRI)` broken, and with it `_get_flexible_source_candidates()`
- Boto dependency HOT 1
- Extension command line argument in conflict with `datalad` level argument HOT 3
- "Convert" .travis.yml into a github workflow
- DataLad extensions are not properly registered on Python 3.12 HOT 1
- FOI: "generic" analog to WTF?
- Datalad get can't find URL despite registering via addurls (and I can see the URL with git annex whereis) HOT 21
- `create_sibling_ria` does not release `IO` handler resources properly
- MacOS tests fail to install Python 3.7 (which is EOL anyway) HOT 2
- Unable to get HCP FC datalad data in a pyenv with Python 3.12.2 ["you need 'boto' dependency which seems to be missing"] HOT 3
- Testing of authenticated S3 interactions
- Stop advertising broken `datalad -c :<key>` to unset config HOT 1
- Missing tab completions and linter help for datalad Python API HOT 2
- can deletions trigger automatic removal of downstream files? HOT 2
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 datalad.