GitHub user zyratlo added a comment to the discussion: [Notebook Migration WIP] 
Adding R support

I agree on language as a parameter, that's the plan.

For detection, the tool doesn't really detect anything itself since the import 
modal has a separate tab for each input type (notebook, Python file, Python 
folder), and R will get its own tabs alongside them. You can see the tabs in 
the demo video in #8767. So the user tells us the language and input type up 
front by picking the tab, and the tab's file picker will only accept the 
matching file extension.

After that we run checks on what was uploaded. Right now they are structural: 
the extension has to match, a notebook has to parse with a cells array, a 
script can't be empty, and a folder has to contain source files and stay under 
the size caps. For R I'd probably add a language check on top, specifically for 
notebooks since those can contain both R and Python (like your metadata point). 
If the metadata disagrees with the tab (ex. a Python notebook in the R tab) I'd 
reject with a message. If it's missing entirely I'd trust the user-selected tab.

Does trusting the tab when metadata is missing seem reasonable to you, or do 
you think its better to fail there too?

GitHub link: 
https://github.com/apache/texera/discussions/8866#discussioncomment-18781890

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to