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

Update versions and switch build system #23

Merged
merged 9 commits into from
Apr 23, 2024
Merged

Update versions and switch build system #23

merged 9 commits into from
Apr 23, 2024

Conversation

cjbattey
Copy link
Collaborator

@cjbattey cjbattey commented Apr 3, 2024

This PR updates python, all dependency versions, the build system, and installation instructions to address #22. This setup worked for a fresh install on an M3 MacBook, using mamba for the virtual environment. There are no changes to analytical code.

Sorry about the size of the PR -- it's mostly build stuff and black reformatting the code. The relevant changes for installation are switching setup.py to pyproject.toml, README updates, and some minor refactors of plotvae.py to work with a newer version of bokeh.

Changes:

  • switch from setuptools to hatchling for package builds
  • switch from setup.py to pyproject.toml
  • swith from python setup.py install to pip install ./ for package installation
  • upgrade tensorflow and keras to v2.15 and python to 3.10 (surprisingly this involved no changes to the network code, phew)
  • update README with new installation instructions

I tried to get this working with smaller tweaks I think five separate times and kept getting sucked in to more and more confusing dependency issues. But python 3.7 and tensorflow 1 are old enough to be dropping off pip, so have to update. I think (hope) this one will work.

@andrewkern , any chance you or someone in the lab could give this a shot and see if they can install and run the test data?

@cjbattey cjbattey requested a review from andrewkern April 3, 2024 04:08
@cjbattey cjbattey changed the title Dev Update versions and switch build system Apr 3, 2024
@andrewkern
Copy link
Member

yo @cjbattey! thanks for doing this. I'll definitely look through it in the next day or so. seems like a lot of code moved here-- mostly auto-reformatting?

@cjbattey
Copy link
Collaborator Author

cjbattey commented Apr 3, 2024

Thanks! Yes, almost all black reformat and build stuff. popvae.py also moved to the top level directory to work with the new build system. But there were no changes in popvae.py code other than import commands to work with a newer Keras version.

Copy link
Member

@andrewkern andrewkern left a comment

Choose a reason for hiding this comment

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

I hit an error running the test example using the --seed flag. I think it's a simple enough fix @cjbattey

popvae.py Outdated Show resolved Hide resolved
@cjbattey
Copy link
Collaborator Author

cjbattey commented Apr 9, 2024

@andrewkern oops, sorry about that. Fixed now, and I added a --test function. Please pull and give it another shot with python popvae.py --test (shouldn't need to reinstall).

@cjbattey cjbattey requested a review from andrewkern April 9, 2024 06:09
@cjbattey cjbattey merged commit 79ab1f5 into master Apr 23, 2024
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.

2 participants