Skip to content

Conversation

@kpuriIpac
Copy link
Contributor

@kpuriIpac kpuriIpac commented Jan 8, 2026

Ticket: FIREFLY-1927

  • ObsCorePackager was becoming too big.
  • Logically split file up into smaller chunks of code (following separation of concern as much as possible) that should be much easier to maintain moving forward.
  • Open to feedback on further improvments!

Testing:

@kpuriIpac kpuriIpac added this to the 2026.1 milestone Jan 8, 2026
@kpuriIpac kpuriIpac self-assigned this Jan 8, 2026
@kpuriIpac kpuriIpac added the Refactor Refactoring or code cleanup label Jan 8, 2026
@kpuriIpac kpuriIpac requested a review from Copilot January 8, 2026 01:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the ObsCorePackager class by splitting it into smaller, more maintainable modules following separation of concerns. The large monolithic class (~630 lines) has been reorganized into a main class and several utility classes.

  • Main class moved from server.query to server.packagedata.obscorepackager package
  • Functionality split into utility modules: DatalinkParser, ServiceDescriptorUtil, ObsCoreUrlUtil, ObsCorePositionUtil, and ObsCoreFilenameUtil
  • Created empty test class stub

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
src/firefly/java/edu/caltech/ipac/firefly/server/query/ObsCorePackager.java Deleted original 630-line class
src/firefly/java/edu/caltech/ipac/firefly/server/packagedata/obscorepackager/ObsCorePackager.java New main class with core orchestration logic and constants
src/firefly/java/edu/caltech/ipac/firefly/server/packagedata/obscorepackager/datalink/DatalinkParser.java Extracted datalink parsing logic
src/firefly/java/edu/caltech/ipac/firefly/server/packagedata/obscorepackager/datalink/ServiceDescriptorUtil.java Extracted service descriptor URL construction logic
src/firefly/java/edu/caltech/ipac/firefly/server/packagedata/obscorepackager/util/ObsCoreUrlUtil.java Extracted URL/extension utility methods
src/firefly/java/edu/caltech/ipac/firefly/server/packagedata/obscorepackager/util/ObsCorePositionUtil.java Extracted position/coordinate handling logic
src/firefly/java/edu/caltech/ipac/firefly/server/packagedata/obscorepackager/util/ObsCoreFilenameUtil.java Extracted filename generation utilities
src/firefly/test/edu/caltech/ipac/firefly/server/packager/ObsCorePackagerTest.java Added empty test class stub

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kpuriIpac kpuriIpac marked this pull request as ready for review January 8, 2026 02:32
@kpuriIpac kpuriIpac requested review from loitly and robyww January 8, 2026 02:32
Copy link
Contributor

@loitly loitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the changes with the developer and suggested a few minor name changes. Other than that, everything looks good.

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

Labels

Refactor Refactoring or code cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants