Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove rpy2 #9886

Merged
merged 4 commits into from
May 23, 2024
Merged

Remove rpy2 #9886

merged 4 commits into from
May 23, 2024

Conversation

nwalters512
Copy link
Contributor

@nwalters512 nwalters512 commented May 23, 2024

The last courses that were using rpy2 have transitioned to plain Python, so we can finally remove R and rpy2 from our base image and remove the feature flag!

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.73%. Comparing base (7d9b356) to head (b650106).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9886      +/-   ##
==========================================
- Coverage   66.75%   66.73%   -0.02%     
==========================================
  Files         454      454              
  Lines       71062    71054       -8     
  Branches     5680     5676       -4     
==========================================
- Hits        47435    47420      -15     
- Misses      23203    23210       +7     
  Partials      424      424              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

All images

Image Platform Old Size New Size Change
prairielearn/executor:b6501065aa4f635ac1c3f94c03e566008038abdd null 1642.81 MB 1187.71 MB -27.70%
prairielearn/plbase:b6501065aa4f635ac1c3f94c03e566008038abdd linux/amd64 1444.04 MB 988.95 MB -31.52%
prairielearn/prairielearn:b6501065aa4f635ac1c3f94c03e566008038abdd linux/amd64 1642.99 MB 1187.71 MB -27.71%

@nwalters512 nwalters512 marked this pull request as ready for review May 23, 2024 15:54
@nwalters512 nwalters512 self-assigned this May 23, 2024
Copy link
Member

@jonatanschroeder jonatanschroeder left a comment

Choose a reason for hiding this comment

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

I did some basic tests with this image locally and it seems to work as expected.

Copy link
Member

Choose a reason for hiding this comment

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

We have been withholding tzlocal because of a conflict with rpy2, but I just checked locally and we should be able to update it to 5.2. Do you want to do this in this PR or in our next round of Python updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's wait til the next round of version upgrades.

Comment on lines +48 to 55
# TODO: use standard OS Python installation? The only reason we switched to Conda
# was to support R and `rpy2`, but now that we've removed those, we might not
# get any benefit from Conda.
echo "setting up conda..."
cd /
arch=`uname -m`
curl -LO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-${arch}.sh
bash Miniforge3-Linux-${arch}.sh -b -p /usr/local -f
Copy link
Member

Choose a reason for hiding this comment

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

I don't know enough to form a firm opinion on this, but it seems that conda is not used anywhere else, and the Python grader installs its own version of it, so it should be save to remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussion continued here: #9886 (comment)

We're going to leave this as-is for now.

@@ -45,45 +45,17 @@ echo "setting up postgres..."
mkdir /var/postgres && chown postgres:postgres /var/postgres
su postgres -c "initdb -D /var/postgres"

# TODO: use standard OS Python installation? The only reason we switched to Conda
# was to support R and `rpy2`, but now that we've removed those, we might not
# get any benefit from Conda.
Copy link
Member

Choose a reason for hiding this comment

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

One potential advantage of using conda is that we can more easily control the timing of version upgrades, independent of upgrades to the underlying OS. I'm not sure how valuable this is in practice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AL2023 does support Python 3.11 as a separate package to install: https://docs.aws.amazon.com/linux/al2023/ug/python.html. Of course, I'm happy to stick with Conda for now; I certainly don't want to change that in this PR (since I want to minimize the number of changes here).

@nwalters512 nwalters512 added this pull request to the merge queue May 23, 2024
Merged via the queue into master with commit a831ebe May 23, 2024
9 checks passed
@nwalters512 nwalters512 deleted the remove-rpy2 branch May 23, 2024 18:30
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.

None yet

3 participants