-
Notifications
You must be signed in to change notification settings - Fork 76
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
Publish as conda package #1039
Comments
Thanks @benjello for creating this issue! I also encountered this issue when installing on an M1 setup, and had to fix it with #990.I'm not sure I fully understand what creating a conda package entails, in terms of maintenance, technical consequences, and benefits for reusers. Do we have someone here with enough experience to make a recap? 😃
|
I have never used conda, but a couple of weeks ago I was trying to see how could be deliver Windows, Linux, and universal distributions with each version. SituationI did so because I wrote a C-Extension for OpenFisca and I wanted to see how difficult would it be for reusers and contributors if we decided to ship one. C-Extensions, done properly, could provide a 2-5x performance improvement in costly operations. ComplicationsIt was already hard to make the thing compile in my own local 😄 . When I did, I tried to package the whole thing for Linux and Windows, and this is what I found: you need Linux and Windows… so the CI will do fine for Linux, but I don't know how to package automatically for Windows. Things I've explored so farThe prerequisite for me would be that a solution has to be integrated into the CI workflow:
Hope it helps :) |
I also have never used conda but from the Building conda packages from scratch page, creating a package looks like creating 3 files ( If this description isn't missing some step, the 3 files shouldn't need much maintenance and uploading the package to anaconda.org could be done by one command (+ install of this command + account on Anaconda.org). So, it looks like a step that we can add to the CI (and I agree that it should be integrated to the CI if we are looking for a sustainable solution). As for the benefits for the users/economists on Windows, from what I understand, it would mean bringing openfisca to their usual environment instead of making them adapt the developers way of getting openfisca on another platform with all the mishaps that it comes with. And, from a perspective where installing a new version regularly is already painful and comes before any "real work", having to adapt is even a barrier to consider using openfisca. So, I would say that it's time to find a non exotic solution for users on Windows. ^^' |
I would favor conda over Poetry for the kind of user I target. Having a conda package would definitely ease the first steps. I tried Poetry and I still have problem using it ... |
Hello, In addition, don't having Openfisca on Conda prevent others to push packages that rely on openfisca on conda. I'm a contributor of CodeCarbon where we use github action to push on Conda. I could have a look at this issue. |
I achieve to upload OpenFisca-Core on Anaconda : https://anaconda.org/leximpact/openfisca-core What I've done:
BUT this not the best way to do it. See below. |
The way above publish the package in a specific "channel" (~ repositoruy) of Anaconda, to be on conda-forge, we need to use another procedure:
A chat is available for conda-forge integration at https://gitter.im/conda-forge/conda-forge.github.io The fork is here : https://github.com/openfisca/staged-recipes The documentation on how to do it for OpenFisca is here : https://github.com/openfisca/staged-recipes/blob/main/recipes/openfisca-core/README.md |
…-to-pypi Ce changement mineur permet de publier une archive tar.gz sur PyPi comme c'est le cas pour OpenFisca-Core. Ceci permettra de la réutiliser pour publier OpenFisca-France sur Conda-Forge pour Anaconda. openfisca/openfisca-core#1039
My PR to add openfisca-core is merged, so there is now an openfisca-core teams in Conda-Forge https://github.com/orgs/conda-forge/teams/openfisca-core |
Bad news : OpenFisca-France can't be pushed to conda-forge due to long filename : the Windows CI crash on that. TODO for OF-Core:
|
May be we should look for long file names again. Try to shorten the more complicated first nodes and simplify others. |
I achieve to push openfisca-france to conda: https://anaconda.org/openfisca/openfisca-france |
I've opened an issue to the conda team for long pathname : conda-forge/staged-recipes#17519 And begin a PR to discuss OpenFisca-France CI: openfisca/openfisca-france#1786 |
The first openfisca-core publishing raises a question about the needed
Do you see any other use case? For example, what would be the use cas needing openfisca-core conda .tar.gz? |
Following my issue, the conda-forge team has opened an issue in conda-build for long filename : conda/conda-build#4357, and helped me to find a workaround: conda-forge/staged-recipes#17483 (comment). |
To sum up we have:
I wasn't expecting so much work 😪 But adding new repo of OpenFisca to conda will be much faster now. |
Hi there!
I really enjoy OpenFisca, but I recently encountered an issue.
Here is what I did:
I want to advocate openfisca to non-dev (mainly economists) Windows users relying on (standard) Anaconda for Python stuff.
Here is what I expected to happen:
Install the conda package at least for openfisca-core.
Install using pip breaks because missing windows libraries.
Here is what actually happened:
I solved the problem by installing using conda as much packages (numpy etc) as i could then pip installing the openfisca-core package.
It would be nice to be able to install openfisca-core using conda.
Context
I identify more as a:
The text was updated successfully, but these errors were encountered: