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

Making CLMM conda instalable #651

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Making CLMM conda instalable #651

wants to merge 16 commits into from

Conversation

eduardojsbarroso
Copy link
Collaborator

Changed the pyproject.toml file so we can publish CLMM to conda and pipy.

@eduardojsbarroso eduardojsbarroso linked an issue Nov 15, 2024 that may be closed by this pull request
@eduardojsbarroso
Copy link
Collaborator Author

Hi @m-aguena and @marina-ricci . As we discussed in the last pipeline meeting, indeed pip install git+https://github.com/LSSTDESC/[email protected] works for CLMM. However I created a new pyproject.toml file and I was able to publish clmm to the PypiTest. I can also publish to Pypi and Conda now. However I would like your aproval. Also, should I publish or one of you guys? Since it will be associated with my account?

@marina-ricci
Copy link
Collaborator

@eduardojsbarroso Michel and I are not familiar with what you proposed. Could you ellaborate?

@eduardojsbarroso
Copy link
Collaborator Author

@eduardojsbarroso Michel and I are not familiar with what you proposed. Could you ellaborate?

What I am proposing is that we publish the clmm git repository to Pipy and conda, so one can simply do pip install clmm or conda install clmm. To so, we need a pyproject.toml file with all the requirements, dependencies and licenses of the repository. After making this file, we can use setuptools I guess or another program to build the files that will be posted in Pypi and conda (I used a program called hatch). Then, after having all the files, we just need to publish them to Pipy and conda. However, you need to have an account at Pipy to publish. I created one, and published clmm in PipyTest, which is just to see if everything is working. Now I can publish to Pipy and conda, but then the package will be associated to my account, so I will be the one to update it when something changes. I can do that no problem, but if you guys prefer to do it since the repository is not mine, feel free to do it. Otherwise I can do it this week. I just noted that there was some problem with the new pyproject.toml file in the test

@coveralls
Copy link

coveralls commented Nov 19, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling e3d00c0 on conda_instal
into b9d4b39 on main.

@m-aguena
Copy link
Collaborator

@eduardojsbarroso I talked to the CCL people, and they said an account for the code was created. So, I will make the same for CLMM and give you access.

@m-aguena
Copy link
Collaborator

@eduardojsbarroso can you add instructions on how to create these installation to the Creating installation via pip and conda section of CONTRIBUTING.md? Thanks

@hsinfan1996
Copy link
Collaborator

Since this PR touched upon the dependencies, can we check if astropy v7.0.0 is compatible, which was just released.

@hsinfan1996
Copy link
Collaborator

Since this PR touched upon the dependencies, can we check if astropy v7.0.0 is compatible, which was just released.

Never mind. It is compatible.

@eduardojsbarroso
Copy link
Collaborator Author

Since this PR touched upon the dependencies, can we check if astropy v7.0.0 is compatible, which was just released.

Never mind. It is compatible.

@eduardojsbarroso
Copy link
Collaborator Author

Thank you for checking @hsinfan1996 . @m-aguena I just updated the documentation and published the version on Pipy . I also created the pull request for Conda

@eduardojsbarroso
Copy link
Collaborator Author

The package is now in the conda-forge repository

@marina-ricci
Copy link
Collaborator

Is there a way to update automatically the version stored in conda-forge and pypi? If we have to manually change the CLMM version to match the one in main it will be complicated.

@eduardojsbarroso
Copy link
Collaborator Author

Is there a way to update automatically the version stored in conda-forge and pypi? If we have to manually change the CLMM version to match the one in main it will be complicated.

I did some research and I think we can do this with Github Action, so whenever we have a new release, it will run the Github Action and publish to Pipy. I need to check if this also runs for small patch updates or only for a new release.

Github Action1

Github Action2

Github Action3

A couple points:

  • I think for this to happen, the setup files I have on this branch (setup.py, pyproject.toml) must be on the master branch. I propose I create a new Pull request from the master branch where I only change these two files and the Instalation documentation, since now we can use conda for CLMM, so we can set it up automatically with GitHub action.
  • If you do not want to change these files on the main branch, I can just go on master, create a new branch from it, and publish it locally with the (setup.py, pyproject.toml) files from the conda_instal branch.

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.

Make CLMM conda instalable
5 participants