Skip to content

fix: pin pandas version in docker image#202

Merged
singjc merged 10 commits intoPyProphet:masterfrom
singjc:master
Mar 26, 2026
Merged

fix: pin pandas version in docker image#202
singjc merged 10 commits intoPyProphet:masterfrom
singjc:master

Conversation

@singjc
Copy link
Copy Markdown
Contributor

@singjc singjc commented Mar 26, 2026

This pull request makes minor improvements to the data preparation logic in pyprophet/scoring/data_handling.py and updates the Python dependencies in the Dockerfile. The main focus is on ensuring the correct data types are used for newly created columns, which improves consistency and prevents potential issues during data processing.

Dependency update:

  • Added pandas==2.2.3 to the list of Python dependencies in the Dockerfile to ensure the required version is installed.

Data type consistency improvements in prepare_data_table:

  • Replaced the generic empty_col (a list of zeros) with more type-appropriate placeholders: empty_bool_col (list of False for boolean columns) and empty_float_col (list of 0.0 for float columns) for new columns in the data table.
  • Updated the assignment of is_top_peak to use empty_bool_col for boolean consistency.
  • Updated the assignment of classifier_score to use empty_float_col for float consistency.

Copilot AI review requested due to automatic review settings March 26, 2026 04:27
Copy link
Copy Markdown
Contributor

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 pins the pandas version in the Docker image build and tweaks data table construction to use dtype-appropriate default values for newly added columns, improving consistency during scoring/analysis.

Changes:

  • Pin pandas==2.2.3 in the Docker image dependency install step.
  • Use boolean/float placeholder columns in prepare_data_table for is_top_peak and classifier_score.
  • Reformat pyprophet/glyco/report.py (mostly style/formatting changes).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pyprophet/scoring/data_handling.py Uses typed placeholder columns (False/0.0) for new dataframe fields to keep dtypes consistent.
pyprophet/glyco/report.py Large reformat (quotes/wrapping); no intentional functional changes apparent, but includes a small typo in a colormap name.
Dockerfile Pins pandas to a specific version during image build.

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

cmap.name + '_transperent',
y, cmap.N
)
return LinearSegmentedColormap.from_list(cmap.name + "_transperent", y, cmap.N)
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The colormap name suffix is spelled "_transperent"; this looks like a typo and can make debugging/plot inspection harder. Consider renaming it to "_transparent" (and update any downstream references if they exist).

Suggested change
return LinearSegmentedColormap.from_list(cmap.name + "_transperent", y, cmap.N)
return LinearSegmentedColormap.from_list(cmap.name + "_transparent", y, cmap.N)

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 7
try:
import matplotlib
matplotlib.use('Agg')

matplotlib.use("Agg")
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d as plt3d
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This PR is described as focusing on pandas pinning and small dtype fixes, but this file also includes a large, mostly formatting-only refactor (quote style, line wrapping, etc.). To reduce review risk and avoid noisy diffs, please either (a) split these formatting changes into a separate PR or (b) explicitly call out the reformat in the PR description.

Copilot uses AI. Check for mistakes.
@singjc singjc merged commit 65205d8 into PyProphet:master Mar 26, 2026
1 check 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.

2 participants