Repository navigation
FIREFLY-2076: Fix period in IDs causing problems for several methods - #81
Open
jaladh-singhal wants to merge 1 commit into
Open
jaladh-singhal wants to merge 1 commit into
jaladh-singhal wants to merge 1 commit into
Conversation
stargaser
reviewed
Oct 23, 2026
stargaser
left a comment
Collaborator
There was a problem hiding this comment.
The code changes work. I was only having trouble with tbl_ids originally, not with plot_ids. If plot_ids with periods don't cause problems, can we have them? In my scripts I use filenames like ztf_20171101229433_907017_zr_c16_o_q3_sciimg_ra338.9963_dec33.9586_asec600.fits so with this PR I'll have to change those all to underscores.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes FIREFLY-2076
A period (
.) in atbl_idpassed toshow_table()caused the table's chart and coverage image not to display. The cause is in Firefly's JS code: some reducers use IDs as lodash string paths (lodashset/gettreat a dot as a nesting separator), somy.tablegets stored undermy → tableinstead of as one key. Rather than fixing every such call in Firefly, the python client now rejects these IDs early with a clear error.validate_id()infc_utils.py, which raises aValueErrorif an ID contains a period (suggesting_instead)tbl_id:show_table,fetch_table(the table's default chart ID is'default-' + tbl_id, which is why the chart disappeared)chartId:show_chart(ChartsCntlr.js)plot_id:show_fits_image/show_fits,show_fits_3color,show_hips,show_image_or_hips(RegionPlot.js,ImageLineBasedFootprint.js: region/footprint layers on the plot can break)Other IDs (
viewer_id,group_id,cell_id,region_layer_id,mask_id, extension IDs) are only used as array paths or plain keys in Firefly, so they're safe.Testing
Install Python package from this branch:
examples/reference-guide.ipynband change anytbl_idorplot_idto contain a period (e.g.cutout_image_plot_id = 'wise.cutout'). That cell should raiseValueError: plot_id 'wise.cutout' must not contain a period ('.'); use another character such as '_' instead, without sending anything to Firefly._or-. The notebook should run as before, with tables showing their default chart and coverage image.