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

Move to pyproject.toml installation. #275

Merged
merged 14 commits into from
Feb 25, 2025
Merged

Conversation

ehpor
Copy link
Collaborator

@ehpor ehpor commented Dec 24, 2024

This PR uses Conda to install all C++ dependencies, and performs all installation (including protobuffer compilation) using CMake. This means that there is no more need to download external dependencies. I'm now relying on scikit-build-core to build the library, which removes a lot of the build code for CMake.

@ehpor ehpor added enhancement New feature or request infrastructure Anything concerning CI, testing, linting or repo infrastructure. labels Dec 24, 2024
@ehpor ehpor self-assigned this Dec 24, 2024
@ehpor ehpor force-pushed the feature/cmake_improvements branch 2 times, most recently from d98d2e8 to dc7e1ee Compare December 26, 2024 08:31
@ehpor ehpor marked this pull request as ready for review January 22, 2025 00:21
Copy link
Collaborator

@ivalaginja ivalaginja left a comment

Choose a reason for hiding this comment

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

Hey @ehpor I got curious by this so looked through it. I wanted to make sure I understand, so is it correct that this PR here does not call for immediate updates in the downstream repos, it just changes how catkit2 itself gets installed?

README.md Outdated
@@ -96,8 +88,8 @@ conda env create --file environment.yml
conda activate catkit2
```

Finally install the package using:
Finally install the package using:
```
python setup.py develop
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you want to update this to pip install -e . as well as you're already on this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed in 2f361f4.

pyproject.toml Outdated
Comment on lines 42 to 43
bmc_dm = "catkit2.services.bmc_dm.bmc_dm"
bmc_dm_sim = "catkit2.services.bmc_dm_sim.bmc_dm_sim"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just fyi, I hope to wipe these with #285 today-ish.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed during rebase.

pyproject.toml Outdated
zwo_camera = "catkit2.services.zwo_camera.zwo_camera"

[project.entry-points."catkit2.proxies"]
bmc_dm = "catkit2.testbed.proxies.bmc_dm:BmcDmProxy"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same for the proxy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed during rebase.

@ehpor ehpor force-pushed the feature/cmake_improvements branch from 1f4aa9a to 37acb1b Compare February 25, 2025 00:57
@ehpor
Copy link
Collaborator Author

ehpor commented Feb 25, 2025

@ivalaginja Ready for re-review.

cd extern
./download.sh
cd ..
```
For installation on Apple Silicon with python=3.7, you need to follow these steps:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would you mind sneaking in a "first" at the end of this line, to make things clearer?

conda config --env --set subdir osx-64
conda create --name catkit2
conda activate catkit2
conda config --env --set subdir osx-64
conda env update --file environment.yml
```

Copy link
Collaborator

Choose a reason for hiding this comment

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

And then maybe an "instead" at the end of line 85.

These downloads can be performed on a separate machine with internet connectivity, in case the machine on which the testbed is run does not have an (unfirewalled) internet connection. After downloading, the resulting folders can be copy-pasted in the extern folder on the machine without internet connectivity.

The following will install all downloaded dependencies and create the Conda environment for catkit2.
The following will install all dependencies and create the Conda environment for catkit2.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw, do you want to add the Py3.7 installation exception that's mentioned in the README here too?

Copy link
Collaborator

@ivalaginja ivalaginja left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just left some optional clarification comments for the docs but no need to block the PR with those. If you have a minute though... please? ^^

@ehpor ehpor merged commit 5efa295 into develop Feb 25, 2025
6 checks passed
@ehpor ehpor deleted the feature/cmake_improvements branch February 25, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request infrastructure Anything concerning CI, testing, linting or repo infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants