Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qiita_test_install #805

Merged
merged 20 commits into from
Feb 3, 2015
Merged

Conversation

antgonza
Copy link
Member

Initial commit for discussion during meeting.

option_parser, opts, args = parse_command_line_parameters(**script_info)

if opts.haiku:
print "Qiita provides insight\nmicrobial in nature\nto ecology"
Copy link
Contributor

Choose a reason for hiding this comment

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

6-7-5, should be 5-7-5 🗼

Copy link
Contributor

Choose a reason for hiding this comment

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

A haiku doesn't actually have an enforced syllabic structure, but the
abused English form does. It is 5-7-5 though for that form though
On Jan 20, 2015 9:21 PM, "Joshua Shorenstein" notifications@github.com
wrote:

In scripts/qiita_test_install
#805 (diff):

  • test.assertTrue(exists(fp), "%s set to an invalid file path: %s" %
  •                (variable, fp))
    
  • modes = {R_OK: "readable",
  •         W_OK: "writable",
    
  •         X_OK: "executable"}
    
  • test if file readable

  • test.assertTrue(access(fp, access_var),
  •                "%s is not %s: %s" % (variable, modes[access_var], fp))
    
    +def main():
  • option_parser, opts, args = parse_command_line_parameters(**script_info)
  • if opts.haiku:
  •    print "Qiita provides insight\nmicrobial in nature\nto ecology"
    

6-7-6, should be 5-7-5 [image: 🗼]


Reply to this email directly or view it on GitHub
https://github.com/biocore/qiita/pull/805/files#r23252284.

Copy link
Member

Choose a reason for hiding this comment

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

oh noes, the secret feature!

On (Jan-20-15|21:28), Daniel McDonald wrote:

  • test.assertTrue(exists(fp), "%s set to an invalid file path: %s" %
  •                (variable, fp))
    
  • modes = {R_OK: "readable",
  •         W_OK: "writable",
    
  •         X_OK: "executable"}
    
  • test if file readable

  • test.assertTrue(access(fp, access_var),
  •                "%s is not %s: %s" % (variable, modes[access_var], fp))
    
    +def main():
  • option_parser, opts, args = parse_command_line_parameters(**script_info)
  • if opts.haiku:
  •    print "Qiita provides insight\nmicrobial in nature\nto ecology"
    

A haiku doesn't actually have an enforced syllabic structure, but the
abused English form does. It is 5-7-5 though for that form though
On Jan 20, 2015 9:21 PM, "Joshua Shorenstein" notifications@github.com
wrote:

In scripts/qiita_test_install
#805 (diff):

  • test.assertTrue(exists(fp), "%s set to an invalid file path: %s" %
  •                (variable, fp))
    
  • modes = {R_OK: "readable",
  •         W_OK: "writable",
    
  •         X_OK: "executable"}
    
  • test if file readable

  • test.assertTrue(access(fp, access_var),
  •                "%s is not %s: %s" % (variable, modes[access_var], fp))
    
    +def main():
  • option_parser, opts, args = parse_command_line_parameters(**script_info)
  • if opts.haiku:
  •    print "Qiita provides insight\nmicrobial in nature\nto ecology"
    

6-7-6, should be 5-7-5 [image: 🗼]


Reply to this email directly or view it on GitHub
https://github.com/biocore/qiita/pull/805/files#r23252284.


Reply to this email directly or view it on GitHub:
https://github.com/biocore/qiita/pull/805/files#r23278780

@ElDeveloper
Copy link
Member

Would be nice to

  • Whether or not this is a test environment.
  • Check if we can send e-mail with the current config file.
  • Path of the configuration file being used.
  • Postgres is running.
  • Redis is running.
  • IPython clusters are running and submittable.
  • Whether or not there are EBI credentials.
  • Whether or not there are VAMPS credentials.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 78.48% when pulling f9df8db on antgonza:testing-qiita-install into 3c79e6b on biocore:master.

@antgonza antgonza changed the title WIP: initial push for discussion qiita_test_install Jan 22, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 78.48% when pulling 64d8eee on antgonza:testing-qiita-install into 3c79e6b on biocore:master.

@antgonza
Copy link
Member Author

This is ready for review.

# we need to run the test suite from setup.py for coveralls to grab the info
# - coverage run setup.py test
# - coverage report -m
- qiita_test_install
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be moved up to second thing called in the script? That way we have all the info before tests are run, so we can fix things as they error if needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could be, no preference.

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably better, since if anything fails we won't have that information for diagnosis.

@squirrelo
Copy link
Contributor

Traceback (most recent call last):
File "./scripts/qiita_test_install", line 396, in
main()
File "./scripts/qiita_test_install", line 360, in main
_, _, ar = submit_nouser(sum, 1, 2)
ValueError: need more than 2 values to unpack

@antgonza
Copy link
Member Author

How do I reproduce that?

@squirrelo
Copy link
Contributor

I just ran it and that happened.

@antgonza
Copy link
Member Author

Which version of moi are you using?

@squirrelo
Copy link
Contributor

Lets use the script :)

System information
==================

         Platform:  darwin
   Python version:  2.7.6 (default, Sep  9 2014, 15:04:36)  [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
Python executable:  /Users/jshorens/.virtualenvs/qiita/bin/python

Dependency versions
===================

     click library version: 3.3
    future library version: 0.14.3
     numpy library version: 1.9.1
    pandas library version: 0.15.2
   tornado library version: 3.1.1
     redis library version: 2.10.3
    bcrypt library version: 1.0.2
 pyparsing library version: 2.0.3
  networkX library version: 1.9.1
   WTForms library version: 2.0.1
     qiime library version: 1.9.0-rc1, for more info use print_qiime_config.py
      mock library version: 1.0.1
       MOI library version: 0.1.0
      MOI config file path: /Users/jshorens/moi_config.txt
   IPython library version: 2.3.1
  psycopg2 library version: 2.5.4 (dt dec pq3 ext)
Qiita core library version: 0.0.1-dev
  Qiita db library version: 0.0.1-dev
 Qiita pet library version: 0.0.1-dev
Qiita ware library version: 0.0.1-dev
Traceback (most recent call last):
  File "./scripts/qiita_test_install", line 396, in <module>
    main()
  File "./scripts/qiita_test_install", line 360, in main
    _, _, ar = submit_nouser(sum, 1, 2)
ValueError: need more than 2 values to unpack

print "%*s:\t%s" % (max_len, v[0], v[1])

qiita_config = ConfigurationManager()
try:
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs an exists test after the try-except to make sure the file actually exists at the path given

else:
ipython_running = False
except e:
print e
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs something better here than just a print of the error, for user information sake. This is what I am getting with the paste in the main discussion thread.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, that was left by mistake.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 78.55% when pulling 6cef34d on antgonza:testing-qiita-install into 01225be on biocore:master.

@antgonza
Copy link
Member Author

@squirrelo @ElDeveloper any other comments? Is this ready for merge?

ipython_running = True
else:
ipython_running = False
except e:
Copy link
Contributor

Choose a reason for hiding this comment

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

Line 365 is still thorwing a traceback and not showing the rest on my computer. Perhaps this should be

except Exception as e:

or just

except:

since we don't actually need e.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 78.56% when pulling 9c0c45c on antgonza:testing-qiita-install into 01225be on biocore:master.

josenavas added a commit that referenced this pull request Feb 3, 2015
@josenavas josenavas merged commit c8d3767 into qiita-spots:master Feb 3, 2015
missing_deps_errors = []
missing_deps_warnings = []

try:
Copy link
Member

Choose a reason for hiding this comment

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

I know exec is usually frowned upon, but what about replacing these few lines with something like this:

for dependency in ['wtforms', 'networkx']:
    try:
        exec 'from {0} import __version__ as {0}_lib_version'.format(dependency)  
    except ImportError:
        missing_deps_warnings.append((e, 'Some message'))
        exec "{0}_lib_version = 'Not Installed'"    

Copy link
Contributor

Choose a reason for hiding this comment

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

what about using importlib?

Copy link
Member

Choose a reason for hiding this comment

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

That would have also worked, though note that this PR is now merged, so
we may want to open a separate issue about this.

On (Feb-03-15|13:06), Daniel McDonald wrote:

+extra_info = (core_dependency_missing_msg + '. It is also possible that you '

  •          'have an old version of this package, if so, please update to '
    
  •          'the latest.')
    
    +dependency_missing_msg = (
  • '"%s" is missing but this is not a core requirement, for more '
  • 'information see the Qiita Installation Guide: '
  • 'https://github.com/biocore/qiita/blob/master/INSTALL.md')

+missing_deps_errors = []
+missing_deps_warnings = []
+
+try:

what about using importlib?


Reply to this email directly or view it on GitHub:
https://github.com/biocore/qiita/pull/805/files#r24039719

@ElDeveloper
Copy link
Member

Oh ... ok ;l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants