Sort notebook violations by cell order, not cell ID#6
Sort notebook violations by cell order, not cell ID#6PiotrCzapla wants to merge 1 commit intomainfrom
Conversation
|
Thanks for the PR! BTW, why are the issues in random order? Do we sort them? It would be nice if we printed them in notebook order. |
|
We sort them by path, line number. But since path has :cell marker we get random order. |
|
Just having them in the notebook order would be enough. The cell numbers I added don't bring much value if the order is preserved. So we could remove them. But I'm thinking we could go a step further and craft a standard id to address content in notebooks. That works in shell and in the browser, and in tools (like view) Here are some ideas (not recommendations): nb:./00_tmp:_df219bee - that makes it clear it is not a file, token wise is not too bad. (ipynb is 3 tokens and nb 1). Works fine in zsh (no quotes needed). The _ in front of id makes it easier to scan for me, (but might be confusing for AI) We could make it work for web by adding endpoint like &go=nb:./00_tmp:_df219bee that would resolve it based on the current dialog so this url would go to the correct place: or even one step further: |
I had a hard time finding my edited cells. The tool reports around 100 issues on lisette/00_core.ipynb, and they are in random order (sorted by random cell id). It is hard to filter them. This is a quick fix that prepends cell idx to cell_id, to let me use the tool on a notebook. How would an ideal marker look like? Do we want to include the tool output in solveit?
Here is how the tool output looks like now. I've added violations to mark the range of cells I've modified:
This brings another issue the tool does not seems report the style violations you seen in the #101 , but I guess the issue was in : _flatmap_call and how it uses match case. Should I try to get this tool to report issues for match/case?