From eb4fc5b88b44115d2edf012020518c137ffef229 Mon Sep 17 00:00:00 2001 From: Mauko Quiroga Date: Fri, 27 Sep 2024 00:10:49 +0200 Subject: [PATCH] chore(version): bump --- .github/get_minimal_version.py | 42 ++++++++++++++++++++++++---------- CHANGELOG.md | 6 +++++ Makefile | 2 +- setup.py | 4 ++-- 4 files changed, 39 insertions(+), 15 deletions(-) mode change 100644 => 100755 .github/get_minimal_version.py diff --git a/.github/get_minimal_version.py b/.github/get_minimal_version.py old mode 100644 new mode 100755 index ed9736852e..c2f5dce79b --- a/.github/get_minimal_version.py +++ b/.github/get_minimal_version.py @@ -1,17 +1,35 @@ +#!/usr/bin/env python + +"""Fetch and print the minimal versions of Openfisca. + +This script fetches and prints the minimal versions of Openfisca-Core and +Openfisca-France dependencies in order to ensure their compatibility during CI +testing. + +""" + import re -# This script fetches and prints the minimal versions of Openfisca-Core and Openfisca-France -# dependencies in order to ensure their compatibility during CI testing -with open('./setup.py') as file: - for line in file: - #: Check for released versions. - version = re.search(r'(Core|France)\s*>=\s*([\d\.]*)', line) - #: Check for pre-release versions. - pre = re.search(r'(Core|France)\s@\s(.*)\'\,$', line) +def fetch_versions_from_setup(): + """Fetch the versions from the setup.py file.""" + with open('./setup.py') as file: + for line in file: + check_and_print_released(line) + check_and_print_pre(line) + + +def check_and_print_released(line): + """Check for released versions.""" + if version := re.search(r'(Core|France)\s*>=\s*([\d.]*)', line): + print(f'OpenFisca-{version[1]}=={version[2]}') # noqa: T201 <- This is to avoid flake8 print detection. + + +def check_and_print_pre(line): + """Check for pre-release versions.""" + if pre := re.search(r'(Core|France)\s@\s(.*)\',$', line): + print(f'{pre[2]}') # noqa: T201 <- The same as supra. - if version: - print(f'OpenFisca-{version[1]}=={version[2]}') # noqa: T201 <- This is to avoid flake8 print detection. - if pre: - print(f'{pre[2]}') # noqa: T201 <- The same as supra. +if __name__ == '__main__': + fetch_versions_from_setup() diff --git a/CHANGELOG.md b/CHANGELOG.md index 121f6f988a..b455a0f930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 168.1.4 [2357](https://github.com/openfisca/openfisca-france/pull/2357) + +* Changement mineur. +* Détails : + - MàJ d'OpenFisca-Core + ### 168.1.3 [2354](https://github.com/openfisca/openfisca-france/pull/2354) * Changement mineur. diff --git a/Makefile b/Makefile index 706fc2fee7..a55a929d97 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: test uninstall: - pip freeze | grep -v "^-e" | xargs pip uninstall -y + pip freeze | grep -v "^-e" | sed "s/@.*//" | xargs pip uninstall -y clean: rm -rf build dist diff --git a/setup.py b/setup.py index b8b453abed..e0c649115d 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name = 'OpenFisca-France', - version = '168.1.3', + version = '168.1.4', author = 'OpenFisca Team', author_email = 'contact@openfisca.fr', classifiers = [ @@ -65,7 +65,7 @@ }, include_package_data = True, # Will read MANIFEST.in install_requires = [ - 'OpenFisca-Core @ https://github.com/openfisca/openfisca-core/archive/fix-mypy-checks-periods.zip', + 'OpenFisca-Core >=42.0.0, <43.0', ], packages = find_namespace_packages(exclude = [ 'openfisca_france.tests*',