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

Remove conda #294

Merged
merged 32 commits into from
Jan 17, 2025
Merged

Remove conda #294

merged 32 commits into from
Jan 17, 2025

Conversation

mogres
Copy link
Collaborator

@mogres mogres commented Oct 17, 2024

Problem

Closes #293

Solution

Changed the dependency management platform from conda to pyenv + pdm

with @rugeli

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Change summary:

  • Remove setup.py, setup.cfg, tox.ini and consolidate all configurations into pyproject.toml
  • Add pdm.lock to pin exact versions of dependencies
  • Update and simplify installation instructions
  • Update and simplify github workflows to use pdm for setup with cache
  • Add github workflow to automatically create requirements files

Steps to Verify:

  1. Follow installation instructions in docs/INSTALL.md to install cellPACK using pyenv + pdm.
  2. Run tests using pdm run pytest
  3. Pack a test recipe using pack -r cellpack/tests/recipes/v2/test_spheres.json

Many thanks to Philip Garrison for laying the groundwork for this transition!

Copy link
Contributor

github-actions bot commented Oct 17, 2024

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@mogres mogres force-pushed the feature/remove-conda branch from 110ea0e to 5c690d3 Compare October 18, 2024 18:34
1. Download the installer

```bash
curl -sSLO https://pdm.fming.dev/install-pdm.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my case, this command didn't trigger the installation, I used the one from the instruction (curl -sSL https://pdm-project.org/install-pdm.py | python3 -) instead, and it worked smoothly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This command just downloads the installer. Step 3 in the instructions (python install-pdm.py) runs the downloaded installer and installs pdm. Thanks for checking this!

Copy link
Collaborator

@rugeli rugeli left a comment

Choose a reason for hiding this comment

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

I was able to follow the instructions to install pyenv and pdm, successfully create a virtual environment, and run a packing. Thank you for making these updates, they'll be a great help for our future development!

@mogres mogres requested a review from meganrm October 31, 2024 18:37
@mogres mogres requested review from rugeli and meganrm January 15, 2025 19:34
@mogres
Copy link
Collaborator Author

mogres commented Jan 15, 2025

We are ready to merge and release cellPACK 1.1.1!! Just re-requested review for some minor changes. Let me know if we're good to go ahead :)

Copy link
Collaborator

@rugeli rugeli left a comment

Choose a reason for hiding this comment

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

Thank you for all the hard work! I imagine you ran into plenty of unexpected issues during the transition to the new environment. Just curious: why did we add pdm run to each command? I tested without it and seemed to work fine.

@mogres
Copy link
Collaborator Author

mogres commented Jan 16, 2025

Thank you for all the hard work! I imagine you ran into plenty of unexpected issues during the transition to the new environment. Just curious: why did we add pdm run to each command? I tested without it and seemed to work fine.

pdm run command ensures that the command runs using the python version specified in the (untracked) .pdm-python file. This ensures that the command uses the correct virtual environment even if one isn't activated (using source ./.venv/bin/activate). It's just a matter of convention and not necessary if you activate the environment beforehand!

Copy link
Member

@meganrm meganrm left a comment

Choose a reason for hiding this comment

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

Sorry for the slow response, I was also able to set it up locally and run!

This version includes performance improvements, bug fixes, and
installation updates
@mogres mogres force-pushed the feature/remove-conda branch from 6cac614 to f19f71d Compare January 17, 2025 23:13
@mogres mogres merged commit 22053fb into main Jan 17, 2025
7 checks passed
@mogres mogres deleted the feature/remove-conda branch January 17, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from setup.py to pyproject.toml using PDM
3 participants