Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This submission completes a major refactoring to decouple the core scientific logic from the Streamlit UI, improving the project's structure and maintainability. It addresses all feedback from previous code reviews, including restoring and updating docstrings and fixing a bug in an error return path.


PR created automatically by Jules for task 10253659084248016017 started by @pierfra-rocci

This commit completes a major refactoring to separate the core scientific and utility logic from the Streamlit user interface.

Key changes include:
- A new `src/utils.py` file was created for generic helper functions.
- Core logic modules (`src/astrometry.py`, `src/xmatch_catalogs.py`, `src/tools_pipeline.py`) were refactored to remove all Streamlit (`st.*`) function calls.
- Functions in these modules now return data, figures, log messages, and errors instead of interacting with the UI directly.
- The main application file (`pages/app.py`) was updated to call these refactored functions and handle their output.
- A new helper function, `handle_log_messages`, was added to `src/tools_app.py` to centralize logging display in the UI.
- Docstrings were restored and updated to reflect the new function signatures.
- A bug in the error return of `solve_with_astrometrynet` was fixed.

This refactoring improves the project's structure, modularity, and maintainability, making the codebase cleaner and easier to test in the future.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant