TheEvergreenStateCollege / upper-division-cs-23-24

A Course in Data Structures & Algorithms, Purposeful Web Engineering, Software Construction
https://theevergreenstatecollege.github.io/upper-division-cs/
MIT License
9 stars 4 forks source link

GitPod prebuilds, ignore submodules, add tools for AI projects #1394

Open learner-long-life opened 4 months ago

learner-long-life commented 4 months ago

We can suppress submodule changes from git status of the parent module by

git config diff.ignoreSubmodules all

This needs to be run on every new workspace start, perhaps using GitPod pre-builds.

learner-long-life commented 4 months ago

@crowllx can you add this Python package / install command to the GitPod Dockerfile

pip3 install html2text

With this added to our path

export PATH=${PATH}:/home/gitpod/.local/bin

We also need to build and install the pdftotext utility from xpdf source code.

https://www.xpdfreader.com/download.html

Thanks.

crowllx commented 4 months ago

Yeah I can do that. @learner-long-life Is installing poppler-utils not enough for getting pdftotext? what other uses does xpdf have that we need? I was able to get access to pdftotext in gitpod by install poppler via apt.

learner-long-life commented 4 months ago

poppler-utils is fine 

Sent from Yahoo Mail for iPhone

On Wednesday, May 8, 2024, 1:39 PM, crowllx @.***> wrote:

Yeah I can do that. Is installing poppler-utils not enough for getting pdftotext? what other uses does xpdf have that we need? I was able to get access to pdftotext in gitpod by install poppler via apt.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

learner-long-life commented 3 months ago

Adding this line to the .gitpod.Dockerfile

# Remove spurious warnings about changes to submodules when in parent module
RUN cd /workspace/upper-division-cs; git config diff.ignoreSubmodules all

results in

Step 42/49 : RUN cd /workspace/upper-division-cs; git config diff.ignoreSubmodules all
 ---> Running in c2d5a6e79e24
/bin/sh: 1: cd: can't cd to /workspace/upper-division-cs
fatal: not in a git directory
The command '/bin/sh -c cd /workspace/upper-division-cs; git config diff.ignoreSubmodules all' returned a non-zero code: 128
Image Build Failed

I suspect that the Dockerfile is run before the git repo is cloned, and that this might be the difference between Dockerfile steps and Gitpod pre-builds.

I'll re-assign to myself and keep working on it

crowllx commented 3 months ago

I think we want to modify the gitpod.yml file in order to set git config settings as part of the workspace build. https://www.gitpod.io/docs/references/gitpod-yml. I'll try it out later.