SAME-Project / same-project

https://sameproject.ml/
Apache License 2.0
20 stars 8 forks source link

ignore markdown cells #67

Closed lukemarsden closed 2 years ago

lukemarsden commented 2 years ago

we currently blow up on markdown cells!

Traceback (most recent call last):
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/bin/same", line 5, in <module>
    main()
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/luke/Library/Caches/pypoetry/virtualenvs/sameproject-1mItenER-py3.10/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/luke/ps/same-project/sameproject/program/commands.py", line 130, in run
    compiled_same_file, root_module_name = nbproc.compile(same_file, target, secret_dict, aml_dict)
  File "/Users/luke/ps/same-project/sameproject/program/compile/notebook_processing.py", line 199, in compile
    all_steps = get_steps(notebook_dict)
  File "/Users/luke/ps/same-project/sameproject/program/compile/notebook_processing.py", line 104, in get_steps
    return_steps[k].packages_to_install = parse_code_block_for_imports(all_code)
  File "/Users/luke/ps/same-project/sameproject/program/compile/notebook_processing.py", line 142, in parse_code_block_for_imports
    raise exc
  File "/Users/luke/ps/same-project/sameproject/program/compile/notebook_processing.py", line 128, in parse_code_block_for_imports
    tree = ast.parse(code)
  File "/opt/homebrew/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 173
    Note that this model _must_ be supplied urlsafe base64. You can convert regular base64 to urlsafe using Python's [`base64` module](https://docs.python.org/3.7/library/base64.html).
                                                                                                                  ^
SyntaxError: unterminated string literal (detected at line 173)
lukemarsden commented 2 years ago

at least multi-line ones