openfisca / country-template

Start modelling the tax and benefit system of your country in a few minutes.
https://legislation.demo.openfisca.org
GNU Affero General Public License v3.0
33 stars 15 forks source link

Publish to conda #124

Open benoit-cty opened 2 years ago

benoit-cty commented 2 years ago

These changes change non-functional parts of this repository : CI.

benjello commented 1 year ago

@MattiSG @sandcha @benoit-cty : where are we on this PR ?

sandcha commented 11 months ago

Applying rebase on this old PR, with @benoit-cty agreement. 🙂

MattiSG commented 6 months ago

@sandcha @benoit-cty what's left to do for this PR to be merged? At least it should be updated to use pyproj instead of setup.py following https://github.com/openfisca/country-template/pull/139, using knowledge from https://github.com/openfisca/openfisca-france/pull/2298. This template will be used massively next Wednesday, so now is the big opportunity to add Conda publishing to 3 new countries :wink:

benoit-cty commented 6 months ago

I've updated the meta.yaml to support pyproj and check it with :

docker run --volume $PWD:/openfisca -i -t continuumio/anaconda3 /bin/bash
cd /openfisca
# Check meta.yaml
conda-build --check .conda
# Build
conda build -c openfisca -c conda-forge .conda
bonjourmauko commented 1 month ago

I'm curious to see how this works for testing, I'm having troubles in #157

benoit-cty commented 4 weeks ago

I'm curious to see how this works for testing, I'm having troubles in #157

Before a rebase the build was working, after a rebase (badly made I'm afraid seeing the changes now) it fail:

openfisca-core 43.2.0 has requirement numpy<2.0,>=1.24.2, but you have numpy 2.1.2.
WARNING: Tests failed for openfisca-country-template-7.1.6-py_0.tar.bz2 - moving package to /opt/conda/conda-bld/broken
TESTS FAILED: openfisca-country-template-7.1.6-py_0.tar.bz2

Maybe it's because OpenFisca-Core has no pinned dependencies of Numpy in https://github.com/openfisca/openfisca-core/blob/5a131cf39f7f6166d6dd7addaae11e631d2b6422/.conda/openfisca-core/meta.yaml#L55

But there is https://github.com/openfisca/openfisca-core/blob/5a131cf39f7f6166d6dd7addaae11e631d2b6422/.conda/openfisca-core/conda_build_config.yaml#L4 so it may works...

EDIT:

requirements:
  host:
[...]
    - numpy 1.26.4 py310hb13e2d6_0
[...]
  run:
    - PyYAML >=6.0, <7.0
    - StrEnum >=0.4.8, <0.5.0
    - dpath >=2.1.4, <3.0
    - numexpr >=2.10.1, <3.0
    - numpy