Conversation
| import matplotlib.pyplot as plt | ||
| from .conversions import chirp_mass_eta_to_m1_m2, m1_m2_to_eta_chirp_mass | ||
| from .gpu_utils import xp |
There was a problem hiding this comment.
Do you have the config for lint - format updates? Couldn't find which config generates these changes.
| @@ -1,32 +1,24 @@ | |||
| FROM ubuntu:22.04 | |||
| COPY --from=ghcr.io/prefix-dev/pixi:latest /usr/local/bin/pixi /bin/pixi | |||
There was a problem hiding this comment.
I'd recommend pinning the dependency here.
|
We already discussed the overall purpose - approach with pixi, and I'm okay on that end but I believe this soon-to-be PR is doing a bit too much for a single PR. I created TeamCOMPAS#1490 to start modernizing the lint setup and TeamCOMPAS#1492 to start cleaning - updating CI pipelines; planning to move incrementally when they got merged. Overall, I was thinking of the following work items:
|
I think it's reasonable to break this PR up but I would like to avoid cycling through build tools. Also before we introduce CI we will need to have a discussion with the repo authors - it imposes costs they may or may not be okay with. I tried to avoid linting and formatting code here but I think my IDE got ahead of me - I will revert some of that. |
pixi(https://pixi.prefix.dev/) is a package manager connected to the Anaconda packaging system, written in rust for speed and platform-agnostic features.While working on setting up COMPAS locally, I decided to experiment with this to
The file
pyproject.tomlnow contains dependency specifications for both python-library dependencies and the core C++ COMPAS library's dependencies. The latter are retrieved fromconda-forgeby default, but anycondarepo could theoretically be substituted; and they are managed locally by updating your shell environment, either in another shell (pixi shell) or scoped to a single execution of a command (pixi run) - the latter is typically how I use it. I also designed a few 'Tasks' (basically inline shell scripts) for common build & clean operations, that can be run aspixi run {task_name}:version: prints the version, as retrieved from the changelog (via the python package)build: run the C++ build locally, attempting to set some reasonable limits on parallelism (I was frequently running out of memory with the defaultnprocthreads)clean: runsmake cleanfor the C++ build (nothing to do for python)build-docker: build the docker image - this builds the COMPAS binary in the docker-build environment, and isolates the build cache for easier cleanup laterclean-docker: clean up resources produced while building the docker image - these artifacts can use up disk space quickly, this lets you clean up just those used for COMPAS (in case you want to preserve others)and of course
compas: runs the COMPAS binary with arguments! If the binary can be found on your local path, it uses that; otherwise, it runs using the docker image, whether built locally or pulled from dockerhub.pixiinstallation instructions here