Skip to content

Fix hexadecimal parsing and docsbuild failure#169

Merged
wtbarnes merged 7 commits intosunpy:mainfrom
wtbarnes:fix-hex-parsing
Mar 30, 2026
Merged

Fix hexadecimal parsing and docsbuild failure#169
wtbarnes merged 7 commits intosunpy:mainfrom
wtbarnes:fix-hex-parsing

Conversation

@wtbarnes
Copy link
Copy Markdown
Member

@wtbarnes wtbarnes commented Mar 30, 2026

PR Description

Fixes #167

This PR also fixes a failing gallery example and doctest in the tutorial.

AI Assistance Disclosure

AI tools were used for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding
  • No AI tools were used

Regardless of AI use, the human contributor remains fully responsible for correctness, design choices, licensing compatibility, and long-term maintainability.

@wtbarnes wtbarnes changed the title Fix hexadecimal parsing Fix hexadecimal parsing and docsbuild failure Mar 30, 2026
Copy link
Copy Markdown
Member

@samaloney samaloney left a comment

Choose a reason for hiding this comment

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

Looks ok to me

drms/client.py Outdated
k_idx = kdf.columns.get_loc(k)
kdf.loc[idx, kdf.columns[k_idx]] = kdf.loc[idx, kdf.columns[k_idx]].apply(int, base=16)
kdf[k] = kdf[k].astype(object)
kdf.loc[idx, k] = values[idx].apply(lambda x: int(x, base=16))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you need the lambda here? I think recent pandas will pass the arg/kwargs, but maybe it’s clearer this way?

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.apply.html

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good question. The lambda was already there so I kept it.

@wtbarnes wtbarnes merged commit 87f5650 into sunpy:main Mar 30, 2026
22 checks passed
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.

"QUALITY" column always returns NaNs

2 participants