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

Add a dev-envrionment.yml to simplify setting up a dev environment #14

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

ngoldbaum
Copy link
Collaborator

@ngoldbaum ngoldbaum commented Feb 5, 2024

This defines a conda environment suitable for bootstrapping csp development. If we add this and update the build instructions in the wiki to use it, we can get rid of a big chunk of the OS-specific build environment setup instructions.

I successfully built csp and ran the tests on a M3 Macbook Pro and a aarch64 Ubuntu VM running on the same machine and this seems to work on both systems.

To get this to work, you'll need to install anaconda or miniconda, such that conda is visible in your PATH, with the following configuation settings to activate conda-forge:

$ conda config --add channels conda-forge
$ conda config --set channel_priority strict

Then create a new conda environment using this file and activate it:

$ conda env create -n csp -f dev-environment.yml
$ conda activate csp

And then build and install csp into conda's python environment as discussed in the wiki.

Note that users on macs will still need to get gcc from homebrew and manually specify homebrew's g++ in their make build command since conda-forge doesn't provide g++ except on linux.

If this is OK as-is and it can be merged, I'll update the build instructions on the wiki to suggest starting with a conda environment and to use this file. I'll go ahead and leave the OS-specific non-conda instructions as well, but move them to a less prominent place.

@timkpaine
Copy link
Member

lgtm, the g++ dependency hopefully won't exist for a very long time. I would just put conda as an option before Linux on the developer docs as many people (myself included) don't use conda, and there are some major pitfalls of trying to use a conda environment for publishing pypa wheels.

@timkpaine timkpaine merged commit 286e365 into main Feb 6, 2024
10 checks passed
@timkpaine timkpaine deleted the njg/conda-environment-yml branch February 6, 2024 00:29
@timkpaine
Copy link
Member

@ngoldbaum please edit as needed https://github.com/Point72/csp/wiki/99.-Developer#conda

timkpaine added a commit that referenced this pull request Mar 21, 2024
Fix conda build for missing pkg config usage
@timkpaine timkpaine added part: github_actions PRs that update GitHub Actions code tag: internal Issues and PRs for maintainance of the project - not interesting to external users part: build Issues and PRs related to the build process and removed part: github_actions PRs that update GitHub Actions code labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: build Issues and PRs related to the build process tag: internal Issues and PRs for maintainance of the project - not interesting to external users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants