Giter VIP home page Giter VIP logo

Comments (2)

thclark avatar thclark commented on September 25, 2024 1

Ok. So what's happening:

  1. octue/templates/template-python-fractal/twine.json has no output_values
  2. tests/data/twines/valid_schema_twine.json has output_values with required property width
  3. Invoking the full test harness (i.e. reproducing the error) causes test_run_command_works_with_data_dir to run, with
  • TESTS_DIR=/Users/thc29/Source/octue/octue-sdk-python/tests
  • self.TWINE_FILE_PATH=/Users/thc29/Source/octue/octue-sdk-python/tests/data/twines/valid_schema_twine.json
  • console output Hello! The app is running! NB this is the fractal app output
  • result.output=analysis-ebfbb81f-93d3-4a7c-b59b-d151cc691547 ERROR 2020-11-17 10:36:19,305 runner 13523 4518925760 'width'
  1. The value of width is required by the fractal app (but the default in the twine is not used) so supplying configuration values without the width value will pass validation but cause a KeyError (after console logging "the app is running").
  2. This is wrong because of course the incorrect app is being used... And misleading because of the weird way that jsonschema defaults are (not) dealt with.

Conclusion: I'm expecting an issue with AppFrom where the app module is not reloaded on repeat imports. Thus, if another app is loaded first, that'll be used for subsequent analyses.

We may not encounter this condition in real life, but if we do it'll be hella confusing for everybody. So, I propose we fix the issue rather than attempting to kludge a fix of the tests.

from octue-sdk-python.

thclark avatar thclark commented on September 25, 2024

Interestingly I reproduce this behaviour for local tox tests on python 3.8.

But, for locally run tox tests on python 3.6.9 I get 4 errors, not 2, with the additional ones being:

======================================================================
FAIL: test_help (tests.test_cli.RunnerTestCase)
Ensure the help commands works in the CLI.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/thc29/Source/octue/octue-sdk-python/tests/test_cli.py", line 23, in test_help
    assert help_result.output.startswith('Usage')
AssertionError

======================================================================
FAIL: test_version (tests.test_cli.RunnerTestCase)
Ensure the version command works in the CLI.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/thc29/Source/octue/octue-sdk-python/tests/test_cli.py", line 18, in test_version
    assert 'version' in result.output
AssertionError

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

This might be unrelated.

from octue-sdk-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.