-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add GitHub Codespaces integration #199
base: devel
Are you sure you want to change the base?
Conversation
// TODO: as well as those: libcairo2-dev pkg-config python3-dev // https://pycairo.readthedocs.io/en/latest/getting_started.html | ||
// ffmpeg libsm6 libxext6 to fix ImportError: libGL.so.1: cannot open shared object file: No such file or directory | ||
// openscad: is needed for "pc inspect :test" | ||
"packages": "shellcheck bash-completion cmake libcairo2-dev pkg-config python3-dev ffmpeg libsm6 libxext6 openscad" // shfmt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is "editable" mode. There are couple options for long term:
- Switch to
Dockerfile
based Dev Containers and addRUN apt-get ...
there.- This is a bit more flexible but provisioning slow and not reproducible.
- Build new "base" image for
partcad
development env.- This is a bit less flexible but provisioning fast and reproducible.
"ghcr.io/deep-space-cartel/devcontainers-features/pip:1": { | ||
"packages": "pre-commit poetry", | ||
"location": "/opt/pip" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, probably should go to the new "base" image.
"ghcr.io/deep-space-cartel/devcontainers-features/starship:latest": { | ||
"version": "latest" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started using https://starship.rs/ for my terminal and kinda happy with it, but I saw @openvmp is using something else like tmux
or zsh
. This is very opinionated topic what's the best. Here is the example of my prompt:
Here is another example which in addition to git state shows:
- Current package version.
- Current Python version.
- Current Python environment.
"remoteEnv": { | ||
"PATH": "${containerEnv:PATH}:/opt/pip/bin" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to add pre-commit
and poetry
to $PATH
.
"launch": { | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Current File", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"justMyCode": true | ||
} | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add debugger configuration for poetry
since that glibc dependency was not obvious, as well as configuration to run pc
with debugger.
ocp_vscode_demo.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed.
partcad-cli/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Poetry package requirement, probably should write here something.
[virtualenvs] | ||
create = true | ||
in-project = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows to store .venv
on the host fs which makes starting of Dev Container faster.
requests = "^2.32.3" | ||
aiofiles = "^24.1.0" | ||
aiohttp = "^3.10.10" | ||
google-generativeai = "^0.8.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
google-generativeai
, openai
& etc might become "extras":
license = "Apache" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to define dev
dependencies and put pytest
there.
Changed
.vscode/
folder is replaced with.devcontainer/
.Added
deep-space-cartel/apt
takes care of the host dependencies.pre-commit
takes care of newlines & etc.TODO
NOTES.md
andREADME.md
.100644 → 100755
.ocp_vscode_demo.py
.TIL
Current version of
cadquery-ocp
depends on glibc 2.35 and as result it does not install on Debian11/Bullseye but everything is fine on Debian12/Bookworm. It was main problem withpartcad-cli
& Poetry: python-poetry/poetry#9837