DONT_MERGE: GSOC26: Add beginner-friendly examples for nesting and .eval()#461
DONT_MERGE: GSOC26: Add beginner-friendly examples for nesting and .eval()#461het1803 wants to merge 5 commits intolincc-frameworks:mainfrom
Conversation
|
@het1803 thanks for the submission. I've tried to copy, paste, and run the code, and it failed. Could you please fix it? |
|
Hi @hombit , I apologize for the inconvenience. I am looking into the indentation of the code snippets right now and will push a fix in a few minutes. Thanks for the quick feedback! |
|
Hi @hombit , I have updated the documentation to include the beginner-friendly .eval() examples as requested.I also checked and corrected the documentation issues.I noticed that the automated build failed with an error, but looking at the logs, it seems to be a transient network issue during the git clone step (Error while cloning the repository...).Let me know if any further tweaks are needed. |
|
@het1803 Yes, there is some issue with GitHub right now. I've manually re-run the ReadTheDocs pipeline, and it builds now. However, the code example you put there still doesn't work. |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Hi @hombit, thank you for the feedback. I have updated the PR with the following changes: Location: Moved the .eval() examples from the index page (tutorials.rst) to the end of the docs/tutorials/data_manipulation.ipynb notebook, as it is a more appropriate place for these examples. Code Fix: I verified the previous code was failing because DataFrameGroupBy does not support the .nested accessor for packing in this version. I have updated the example to use npd.NestedFrame.from_flat(), which works correctly. Variable Injection: Replaced the @variable syntax with a Python f-string to properly pass the local variable into the .eval() method. I have tested these snippets locally, and they generate the expected nested structures without any errors. Let me know if everything looks good now! |
|
@het1803 It runs now, thank you! Let's change "brightness" to more astronomical terminology, e.g., "magnitude"? |
|
Hi @hombit, I've updated the notebook to use astronomical terminology (mag instead of brightness) and ensured all examples use the from_flat method and f-strings for consistency. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #461 +/- ##
=======================================
Coverage 97.30% 97.30%
=======================================
Files 19 19
Lines 2156 2156
=======================================
Hits 2098 2098
Misses 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Click here to view all benchmarks. |
|
@het1803 thank you! Could you please fix the pre-commit CI failure? |
|
@hombit, I have fixed the pre-commit CI failures locally by clearing the notebook outputs and formatting the code using ruff. I'm pushing the clean version now. Thanks for pointing it out! |
|
@het1803 thanks, I consider this PR as finished! |
|
Thank you @hombit! Happy to see this PR finalized. Since I'm very interested in the project, I'd love to contribute further. Are there any other high-priority issues, hidden bugs, or areas in the documentation (like more complex .eval() or .query() examples) that you’d like me to look into? I'm also open to helping with any refactoring or unit tests if needed! |
|
Hi @hombit, I have marked the PR as Ready for Review. Please let me know if there's anything else needed before merging! |
|
@het1803 we are not merging any of the PRs until the end of the GSoC proposal period. We will keep it as a draft and unmerged until then. You are welcome to submit other PRs without "GSOC26" in the title, only the first one (this one) will be considered during the GSoC contributor selection. |
I am Het and I've updated the documentation to address Issue #153.
I noticed that while the library has powerful features like .eval() and nested packing, the tutorials were missing simple, relatable examples for beginners.
In this PR, I have added:
This should make the library much more accessible to new users.