Skip to content

All configuration as options#529

Merged
boegel merged 23 commits intoeasybuilders:developfrom
stdweird:envoptions
Mar 21, 2013
Merged

All configuration as options#529
boegel merged 23 commits intoeasybuilders:developfrom
stdweird:envoptions

Conversation

@stdweird
Copy link
Copy Markdown
Contributor

This add support for all configuration options as generaloption options.

@stdweird
Copy link
Copy Markdown
Contributor Author

@boegel this fails 1 unittest and i have no clue why

======================================================================
FAIL: test_avail_easyconfig_params (easybuild.test.options.CommandLineOptionsTest)
Test listing available easyconfig parameters.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/stdweird/.local/lib/python2.7/site-packages/easybuild_framework-1.3.0dev-py2.7.egg/easybuild/test/options.py", line 360, in test_avail_easyconfig_params
    run_test(custom='EB_foo', extra_params=['foo_extra1', 'foo_extra2'])
  File "/home/stdweird/.local/lib/python2.7/site-packages/easybuild_framework-1.3.0dev-py2.7.egg/easybuild/test/options.py", line 340, in run_test
    (param_type, avail_arg, args, outtxt))
AssertionError: Parameter type build is featured in output of eb -a (args: ['-a', '--unittest-file=/tmp/eb-options-test-nzfyiC.log', '-e', 'EB_foo']): == 2013-03-10 16:40:41,210 suite.EasyBuildOptions.__init__ WARNING basic_options: unable to determine default easyconfig path
== 2013-03-10 16:40:41,219 suite.easyblock.<module> ERROR EasyBuild crashed with an error (at easybuild/framework/easyblock.py:1733 in get_class): Failed to obtain class for EB_foo easyblock (not available?): No module named foo


----------------------------------------------------------------------

@stdweird
Copy link
Copy Markdown
Contributor Author

also missing: unittests

@fgeorgatos
Copy link
Copy Markdown
Contributor

On Sun, Mar 10, 2013 at 5:44 PM, Stijn De Weirdt
[email protected] wrote:

laptop battery critical

So, will this end-up in the v1.3 changelog?

sorry for the noise, just trying to make you smile! ;-)

@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 19, 2013

@stdweird: The unit tests run fine after I pulled in your branch and installed it, see below. How exactly did you run the tests?
The EB_foo easyblock is provided in the test dir, and the test themselves take care of setting PYTHONPATH such that they're found, so I'm also puzzled as to why this would fail on your end.

boegel:easybuild-framework kehoste$ git checkout envoptions
Switched to branch 'envoptions'

boegel:easybuild-framework kehoste$ easy_install --prefix=$HOME/.local .; python -m easybuild.test.suite
Processing .
Running setup.py -q bdist_egg --dist-dir /Users/kehoste/work/easybuild-framework/egg-dist-tmp-rfBMNI
Installing with setuptools.setup...
Installing version 1.3.0dev (API version 1)
zip_safe flag not set; analyzing archive contents...
easybuild.__init__: module references __path__
easybuild.test.modules: module references __file__
easybuild.test.options: module references __file__
easybuild.toolchains.__init__: module references __path__
easybuild.toolchains.compiler.__init__: module references __path__
easybuild.toolchains.fft.__init__: module references __path__
easybuild.toolchains.linalg.__init__: module references __path__
easybuild.toolchains.mpi.__init__: module references __path__
easybuild.tools.config: module references __file__
easybuild.tools.options: module references __path__
easybuild.tools.version: module references __file__
easybuild.tools.toolchain.utilities: module references __file__
vsc.utils.fancylogger: module MAY be using inspect.stack
vsc.utils.generaloption: module MAY be using inspect.stack
easybuild-framework 1.3.0dev is already the active version in easy-install.pth
Installing eb script to /Users/kehoste/.local/bin

Installed /Users/kehoste/.local/lib/python2.7/site-packages/easybuild_framework-1.3.0dev-py2.7.egg
Processing dependencies for easybuild-framework==1.3.0dev
Finished processing dependencies for easybuild-framework==1.3.0dev
WARNING: xmlrunner module not available, falling back to using unittest...

........................................................
----------------------------------------------------------------------
Ran 56 tests in 193.007s

OK

Comment thread easybuild/main.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grrr ;-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for that. i hope to swicth to new IDE soon.

Comment thread easybuild/tools/config.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use _log.deprecated(..., "2.0") here too instead of _log.debug?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, on deprecation , the whole block will be removed

@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 20, 2013

Just a couple more minor remarks, looks fantastic overal.

But, does it work? Do we need to add unit tests as well to be 100% sure?

@stdweird
Copy link
Copy Markdown
Contributor Author

@boegl the backwards compatible stuff works, but unittests are welcome ;)

@stdweird
Copy link
Copy Markdown
Contributor Author

@boegel fixed latest remarks

@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 21, 2013

Phieuw, ok, merging it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants