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

Revue de code de la réintégration de la version 4.0.2 dans msa_master #148

Merged
merged 41 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
28cf153
Met à jour la version d'openfisca-france (#127)
Kout95 Jan 11, 2022
12f222d
Met à jour le setup (#128)
Kout95 Jan 11, 2022
47412a3
mise à jour du package openfisca-france vers la version 103 (#129)
Cugniere Jan 17, 2022
4a20982
Met à jour le setup
Kout95 Jan 19, 2022
2ccf08e
Met à jour le workflow.yml
Kout95 Jan 19, 2022
4b6dd5a
Supprime circle ci
Kout95 Jan 19, 2022
0e9d2ba
Update Makefile
Kout95 Jan 19, 2022
a23c6ad
Evite à la ci de tourner deux fois
Kout95 Jan 20, 2022
030d6fe
Augmente le numéro de version
Kout95 Jan 20, 2022
51b8d0e
fix: rend le script de publication de tag exécutable
Cugniere Jan 20, 2022
2f33bd0
Merge pull request #130 from openfisca/create-build
Cugniere Jan 20, 2022
4857d0b
Met à jour openfisca-france à la version 107 (#131)
Kout95 Feb 4, 2022
53b8da1
Met à jour openfisca-france à la version 111.1 (#132)
Kout95 Feb 21, 2022
923d7f6
Met à jour openfisca-france à la version 116 (#133)
Kout95 Apr 21, 2022
9300184
Met à jour Openfisca-France en version 117
Cugniere Oct 10, 2022
57e94ad
Merge pull request #134 from openfisca/update-openfisca-france-117
Shamzic Oct 10, 2022
3c52c25
update: met à jour Openfisca France en version 136
Cugniere Jan 4, 2023
f8e9cee
fix: utilise la dernière version de Python 3.7 disponible dans Github…
Cugniere Jan 4, 2023
6ec8a43
fix: utilise la dernière version de Python 3.7 disponible dans Github…
Cugniere Jan 4, 2023
bbd6bdb
Merge pull request #136 from openfisca/update-openfisca-france-136
Cugniere Jan 4, 2023
75a9385
Mise à jour OpenFisca-France vers version 142.0.1 (#137)
Allan-CodeWorks Feb 6, 2023
90fea80
Fix dependencies requirements (#138)
Allan-CodeWorks Feb 6, 2023
07f55b4
Fix version minimale de la dépendance openfisca-france #139
Allan-CodeWorks Feb 14, 2023
b17ae32
Met à jour openfisca-france en v145 (#141)
Allan-CodeWorks Apr 3, 2023
633d5bc
Ajout pipeline de test pour la version minimale des dépendance OpenF…
Allan-CodeWorks Apr 4, 2023
159f3d1
Met à jour OpenFisca-france en version 146 (#142)
Allan-CodeWorks Apr 25, 2023
5be64cc
update: met à jour openfisca france en version 147
Cugniere Jun 8, 2023
f617d16
Merge pull request #144 from openfisca/maj-openfisca-france-147
Cugniere Jun 10, 2023
5d2c1ff
Met à jour python et toutes les dépendances (#145)
Allan-CodeWorks Jun 27, 2023
a0e5737
Corrige l'étape deploy de la CI - twine : command not found (#146)
Allan-CodeWorks Jun 27, 2023
47cba79
Met à jours le workflow CI avec les dernières versions des actions gi…
Allan-CodeWorks Jun 27, 2023
d2aad5c
Revalorisation les barèmes Paris Solidaire et CSP à partir du 01/01/2020
mtifarine Dec 20, 2019
660eb76
Fiabilisation de la base ressources Paris CSP handicapé
mtifarine Feb 18, 2020
caeacd4
Corrige lint
mtifarine Mar 4, 2020
2e93b44
Revalorisation de l'aide de logement de Paris
mtifarine Mar 25, 2020
162c043
Fiabilisation de la base ressources aides Paris
Aug 5, 2020
b5d7414
correction des tests
Aug 5, 2020
661b9d6
Modification de la base ressource individu
Aug 10, 2020
492b356
Corrige les conditions de la formule Paris logement
mtifarine Sep 29, 2021
d534676
Renomme les variables TNS par RPNS
mtifarine Dec 12, 2021
1821e01
Màj setup.py pour pouvoir utiliser la version 41.0.0 du core
JoDuGa Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .circleci/config.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/get_minimal_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import re


with open('./setup.py') as file:
for line in file:
version = re.search(r'(Core|France)\s*>=\s*([\d\.]*)', line)
if version:
print(f'Openfisca-{version[1]}=={version[2]}')
12 changes: 12 additions & 0 deletions .github/has-functional-changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /usr/bin/env bash

IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile .gitignore .github/*"

last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` # --first-parent ensures we don't follow tags not published in master through an unlikely intermediary merge commit

if git diff-index --name-only --exit-code $last_tagged_commit -- . `echo " $IGNORE_DIFF_ON" | sed 's/ / :(exclude)/g'` # Check if any file that has not be listed in IGNORE_DIFF_ON has changed since the last tag was published.
then
echo "No functional changes detected."
exit 1
else echo "The functional files above were changed."
fi
25 changes: 25 additions & 0 deletions .github/is-version-number-acceptable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! /usr/bin/env bash

if [[ ${GITHUB_REF#refs/heads/} == master ]]
then
echo "No need for a version check on master."
exit 0
fi

if ! $(dirname "$BASH_SOURCE")/has-functional-changes.sh
then
echo "No need for a version update."
exit 0
fi

current_version=`python setup.py --version`

if git rev-parse --verify --quiet $current_version
then
echo "Version $current_version already exists in commit:"
git --no-pager log -1 $current_version
echo
echo "Update the version number in setup.py before merging this branch into master."
echo "Look at the CONTRIBUTING.md file to learn how the version number should be updated."
exit 1
fi
4 changes: 4 additions & 0 deletions .github/publish-git-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /usr/bin/env bash

git tag `python setup.py --version`
git push --tags # update the repository version
136 changes: 136 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: OpenFisca Paris

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
openfisca-dependencies: [minimal, maximal]
python-version: ["3.9.9", "3.10.6"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.openfisca-dependencies }}
restore-keys: | # in case of a cache miss (systematically unless the same commit is built repeatedly), the keys below will be used to restore dependencies from previous builds, and the cache will be stored at the end of the job, making up-to-date dependencies available for all jobs of the workflow; see more at https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
build-${{ env.pythonLocation }}-
- name: Install test dependancies
run: make install-test
- name: Build package
run: make build
- name: Minimal version
if: matrix.openfisca-dependencies == 'minimal'
run: | # Installs the OpenFisca dependencies minimal version from setup.py
pip install $(python ${GITHUB_WORKSPACE}/.github/get_minimal_version.py)
- name: Cache release
id: restore-release
uses: actions/cache@v3
with:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.openfisca-dependencies }}
test-yaml:
runs-on: ubuntu-20.04
strategy:
matrix:
openfisca-dependencies: [minimal, maximal]
needs: [ build ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9.9
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.openfisca-dependencies }}
- name: Run YAML test
run: |
openfisca test tests --country-package openfisca_france --extensions openfisca_paris

check-version:
runs-on: ubuntu-20.04
needs: [ test-yaml ] # Last job to run
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9.9
- name: Check version number has been properly updated
run: "${GITHUB_WORKSPACE}/.github/is-version-number-acceptable.sh"

# GitHub Actions does not have a halt job option, to stop from deploying if no functional changes were found.
# We build a separate job to substitute the halt option.
# The `deploy` job is dependent on the output of the `check-for-functional-changes` job.
check-for-functional-changes:
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/master' # Only triggered for the `master` branch
needs: [ check-version ]
outputs:
status: ${{ steps.stop-early.outputs.status }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9.9
- id: stop-early
run: if "${GITHUB_WORKSPACE}/.github/has-functional-changes.sh" ; then echo "::set-output name=status::success" ; fi

deploy:
runs-on: ubuntu-20.04
strategy:
matrix:
openfisca-dependencies: [maximal]
needs: [ check-for-functional-changes ]
if: needs.check-for-functional-changes.outputs.status == 'success'
env:
PYPI_USERNAME: openfisca-bot
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9.9
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.openfisca-dependencies }}
- name: Cache release
id: restore-release
uses: actions/cache@v3
with:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.openfisca-dependencies }}
- name: Upload a Python package to PyPi
run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD
- name: Publish a git tag
run: "${GITHUB_WORKSPACE}/.github/publish-git-tag.sh"
25 changes: 22 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ clean:
rm -rf build dist
find . -name '*.pyc' -exec rm \{\} \;

install:
pip install --upgrade pip wheel
pip install --editable .[test] --upgrade
deps:
pip install --upgrade pip build twine

install-test:
pip install --editable ".[test]"

install: deps
@# Install OpenFisca-Paris for development.
@# `make install` installs the editable version of OpenFisca-Paris.
@# This allows contributors to test as they code.
pip install --editable . --upgrade

build: clean deps
@# Install OpenFisca-Paris for deployment and publishing.
@# `make build` allows us to be be sure tests are run against the packaged version
@# of OpenFisca-Paris, the same we put in the hands of users and reusers.
python -m build
pip uninstall --yes openfisca-paris
find dist -name "*.whl" -exec pip install {} \;

test:
openfisca test tests --country-package openfisca_france --extension openfisca_paris

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ values:
value: 1140.0
2015-01-01:
value: 1140.0
2017-01-01:
value: 1160.0
2018-01-01:
value: 1180.0
2019-01-01:
value: 1210.0
2020-01-01:
value: 1220.00
2021-10-01:
value: 1240.00

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
description: plafond des ressources mensuelles pour une personne isolée ou un couple
sans enfant
description: plafond des ressources mensuelles pour une personne isolée
unit: currency
values:
2012-01-01:
Expand All @@ -10,3 +9,5 @@ values:
value: 1180.0
2019-01-01:
value: 1210.0
2020-01-01:
value: 1220.00
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ plafond:
value: 915.0
2019-01-01:
value: 980.0
2020-01-01:
value: 1015.0
en_couple:
unit: currency
values:
Expand All @@ -23,6 +25,8 @@ plafond:
value: 1453.0
2019-01-01:
value: 1553.0
2020-01-01:
value: 1608.0
montant:
unit: currency
values:
Expand Down
6 changes: 5 additions & 1 deletion openfisca_paris/parameters/paris/personnes_agees/psol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ plafond:
value: 945.0
2019-01-01:
value: 980.0
2020-01-01:
value: 1015.0
couple:
unit: currency
values:
Expand All @@ -24,4 +26,6 @@ plafond:
2018-04-01:
value: 1498.0
2019-01-01:
value: 1553.0
value: 1553.0
2020-01-01:
value: 1608.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ plafond:
personne_isolee:
unit: currency
values:
2012-01-01: 965.0
2019-01-01: 965.0
2012-01-01:
value: 965.0
2019-01-01:
value: 965.0
2020-01-01:
value: 1015.0
en_couple:
unit: currency
values:
2012-01-01: 1553.0
2019-01-01: 1553.0
2012-01-01:
value: 1553.0
2019-01-01:
value: 1553.0
2020-01-01:
value: 1608.0
montant:
unit: currency
values:
2012-01-01: 468.0
2019-01-01: 468.0
2012-01-01:
value: 468.0
2019-01-01:
value: 468.0
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ plafond:
value: 915.0
2019-01-01:
value: 965.0
2020-01-01:
value: 1015.0
couple:
unit: currency
values:
Expand All @@ -23,3 +25,5 @@ plafond:
value: 1498.0
2019-01-01:
value: 1553.0
2020-01-01:
value: 1608.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ values:
value: 1180.0
2019-01-01:
value: 1210.0
2020-01-01:
value: 1220.0
Loading
Loading