diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 50c72291..61be604e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -172,99 +172,99 @@ jobs: - name: Publish a git tag run: "${GITHUB_WORKSPACE}/.github/publish-git-tag.sh" - build-conda: - runs-on: "ubuntu-20.04" - needs: [ check-version-and-changelog ] - # Do not build on master, the artifact will be used - if: github.ref != 'refs/heads/master' - steps: - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: "3.9.9" - # Add "conda-forge" for OpenFisca-Core and "openfisca" for openfisca-survey-manager - channels: conda-forge, openfisca - activate-environment: true - - uses: actions/checkout@v3 - - name: Get version - run: echo "PACKAGE_VERSION=$(python3 ./setup.py --version)" >> $GITHUB_ENV - - name: Conda Config - run: | - conda install conda-build anaconda-client - conda info - - name: Build Conda package - run: conda build --croot /tmp/conda .conda - - name: Upload Conda build - uses: actions/upload-artifact@v3 - with: - name: conda-build-${{ env.PACKAGE_VERSION }}-${{ github.sha }} - path: /tmp/conda - retention-days: 30 + # build-conda: + # runs-on: "ubuntu-20.04" + # needs: [ check-version-and-changelog ] + # # Do not build on master, the artifact will be used + # if: github.ref != 'refs/heads/master' + # steps: + # - uses: conda-incubator/setup-miniconda@v2 + # with: + # auto-update-conda: true + # python-version: "3.9.9" + # # Add "conda-forge" for OpenFisca-Core and "openfisca" for openfisca-survey-manager + # channels: conda-forge, openfisca + # activate-environment: true + # - uses: actions/checkout@v3 + # - name: Get version + # run: echo "PACKAGE_VERSION=$(python3 ./setup.py --version)" >> $GITHUB_ENV + # - name: Conda Config + # run: | + # conda install conda-build anaconda-client + # conda info + # - name: Build Conda package + # run: conda build --croot /tmp/conda .conda + # - name: Upload Conda build + # uses: actions/upload-artifact@v3 + # with: + # name: conda-build-${{ env.PACKAGE_VERSION }}-${{ github.sha }} + # path: /tmp/conda + # retention-days: 30 - test-on-windows: - runs-on: "windows-latest" - needs: [ build-conda ] - steps: - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: "3.9.9" - channels: conda-forge, openfisca - activate-environment: true - - uses: actions/checkout@v3 - - name: Get version - run: | - # chcp 65001 #set code page to utf-8 - echo ("PACKAGE_VERSION=" + (python3 ./setup.py --version) ) >> $env:GITHUB_ENV - echo "Version setup.py: ${{ env.PACKAGE_VERSION }}" - - name: Download conda build - uses: actions/download-artifact@v3 - with: - name: conda-build-${{ env.PACKAGE_VERSION }}-${{ github.sha }} - path: conda-build-tmp - - name: Install with conda - run: | - conda install -c ./conda-build-tmp/noarch/openfisca-france-data-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 openfisca-france-data + # test-on-windows: + # runs-on: "windows-latest" + # needs: [ build-conda ] + # steps: + # - uses: conda-incubator/setup-miniconda@v2 + # with: + # auto-update-conda: true + # python-version: "3.9.9" + # channels: conda-forge, openfisca + # activate-environment: true + # - uses: actions/checkout@v3 + # - name: Get version + # run: | + # # chcp 65001 #set code page to utf-8 + # echo ("PACKAGE_VERSION=" + (python3 ./setup.py --version) ) >> $env:GITHUB_ENV + # echo "Version setup.py: ${{ env.PACKAGE_VERSION }}" + # - name: Download conda build + # uses: actions/download-artifact@v3 + # with: + # name: conda-build-${{ env.PACKAGE_VERSION }}-${{ github.sha }} + # path: conda-build-tmp + # - name: Install with conda + # run: | + # conda install -c ./conda-build-tmp/noarch/openfisca-france-data-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 openfisca-france-data - publish-to-conda: - runs-on: "ubuntu-20.04" - needs: [ deploy ] - steps: - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: "3.9.9" - # Add conda-forge for OpenFisca-Core - channels: conda-forge - activate-environment: true - - name: Get source code - uses: actions/checkout@v3 - - name: Get version - run: echo "PACKAGE_VERSION=$(python3 ./setup.py --version)" >> $GITHUB_ENV - # Get the last commit hash on the PR (-2 : before the merge commit) - - uses: actions/github-script@v6 - id: last_pr_commit - with: - script: | - const commits = ${{ toJSON(github.event.commits) }} - return commits.at(-2).id; - result-encoding: string - # Default Download artifact don't see artifact of other workflow - # So we use dawidd6/action-download-artifact@v2 to do it. - - name: Download artifact - id: download-artifact - uses: dawidd6/action-download-artifact@v2 - with: - workflow_conclusion: success - commit: ${{steps.last_pr_commit.outputs.result}} - name: conda-build-${{ env.PACKAGE_VERSION }}-${{steps.last_pr_commit.outputs.result}} - path: conda-build-tmp - event: push # To avoid conflict with PR workflow - if_no_artifact_found: fail - - name: Conda upload - # This shell is made necessary by https://github.com/conda-incubator/setup-miniconda/issues/128 - shell: bash -l {0} - run: | - conda install anaconda-client - conda info - anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u openfisca ./conda-build-tmp/noarch/openfisca-france-data-*-py_0.tar.bz2 --force + # publish-to-conda: + # runs-on: "ubuntu-20.04" + # needs: [ deploy ] + # steps: + # - uses: conda-incubator/setup-miniconda@v2 + # with: + # auto-update-conda: true + # python-version: "3.9.9" + # # Add conda-forge for OpenFisca-Core + # channels: conda-forge + # activate-environment: true + # - name: Get source code + # uses: actions/checkout@v3 + # - name: Get version + # run: echo "PACKAGE_VERSION=$(python3 ./setup.py --version)" >> $GITHUB_ENV + # # Get the last commit hash on the PR (-2 : before the merge commit) + # - uses: actions/github-script@v6 + # id: last_pr_commit + # with: + # script: | + # const commits = ${{ toJSON(github.event.commits) }} + # return commits.at(-2).id; + # result-encoding: string + # # Default Download artifact don't see artifact of other workflow + # # So we use dawidd6/action-download-artifact@v2 to do it. + # - name: Download artifact + # id: download-artifact + # uses: dawidd6/action-download-artifact@v2 + # with: + # workflow_conclusion: success + # commit: ${{steps.last_pr_commit.outputs.result}} + # name: conda-build-${{ env.PACKAGE_VERSION }}-${{steps.last_pr_commit.outputs.result}} + # path: conda-build-tmp + # event: push # To avoid conflict with PR workflow + # if_no_artifact_found: fail + # - name: Conda upload + # # This shell is made necessary by https://github.com/conda-incubator/setup-miniconda/issues/128 + # shell: bash -l {0} + # run: | + # conda install anaconda-client + # conda info + # anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u openfisca ./conda-build-tmp/noarch/openfisca-france-data-*-py_0.tar.bz2 --force diff --git a/CHANGELOG.md b/CHANGELOG.md index 72746a89..9ce16756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 3.7.4 [#268](https://github.com/openfisca/openfisca-france-data/pull/268) + +* Technical changes + - Bump de la version d'openfisca-survey-manager en dépendances et adaptation du code à ce bump + ### 3.7.3 [#269](https://github.com/openfisca/openfisca-france-data/pull/269) * Technical changes diff --git a/openfisca_france_data/erfs_fpr/get_survey_scenario.py b/openfisca_france_data/erfs_fpr/get_survey_scenario.py index ed626143..0fb87ba7 100644 --- a/openfisca_france_data/erfs_fpr/get_survey_scenario.py +++ b/openfisca_france_data/erfs_fpr/get_survey_scenario.py @@ -10,7 +10,7 @@ from openfisca_france_data.erfs_fpr.scenario import ErfsFprSurveyScenario from openfisca_france_data import france_data_tax_benefit_system -from openfisca_survey_manager import default_config_files_directory +from openfisca_survey_manager.paths import default_config_files_directory from openfisca_france_data.model.id_variables import ( idmen_original, diff --git a/openfisca_france_data/pote/input_data_builder/console.py b/openfisca_france_data/pote/input_data_builder/console.py index bfb8d7c7..6aff44b1 100644 --- a/openfisca_france_data/pote/input_data_builder/console.py +++ b/openfisca_france_data/pote/input_data_builder/console.py @@ -11,7 +11,7 @@ from openfisca_france_data.pote.input_data_builder.step_02_b_simulation_credits_reductions import simulation_preparation_credits_reductions from openfisca_france_data.pote.input_data_builder.step_02_c_create_table_foyer_fiscal import create_table_foyer_fiscal from openfisca_france_data.pote.input_data_builder.analyse_variables import liens_variables -from openfisca_survey_manager import default_config_files_directory +from openfisca_survey_manager.paths import default_config_files_directory log = logging.getLogger(__name__) log.setLevel(logging.INFO) diff --git a/setup.py b/setup.py index 647695a2..a46066f6 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = "OpenFisca-France-Data", - version = "3.7.3", + version = "3.7.4", description = "OpenFisca-France-Data module to work with French survey data", long_description = long_description, long_description_content_type="text/markdown", @@ -44,7 +44,7 @@ install_requires = [ "multipledispatch >=0.6.0, <1.0.0", "OpenFisca-France >=169.0.0, <170.0.0", - "openFisca-survey-manager >=2.3.0, <2.4.0", + "OpenFisca-survey-manager >=3.0.0, <4.0.0", ], extras_require = { "test": [ diff --git a/tests/pote/test_pote_survey_scenario.py b/tests/pote/test_pote_survey_scenario.py index b3b3ecf3..5b37de01 100644 --- a/tests/pote/test_pote_survey_scenario.py +++ b/tests/pote/test_pote_survey_scenario.py @@ -1,5 +1,5 @@ from openfisca_france_data.pote.survey_scenario import PoteSurveyScenario -from openfisca_survey_manager import default_config_files_directory +from openfisca_survey_manager.paths import default_config_files_directory def test_pote_survey_scenario(period=2022, config_file_directory=default_config_files_directory): survey_scenario = PoteSurveyScenario(period = period, config_files_directory=config_file_directory)