Skip to content

Commit

Permalink
chore(version): bump
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Sep 30, 2024
1 parent c6bb147 commit eb4fc5b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
42 changes: 30 additions & 12 deletions .github/get_minimal_version.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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()
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name = 'OpenFisca-France',
version = '168.1.3',
version = '168.1.4',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [
Expand Down Expand Up @@ -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*',
Expand Down

0 comments on commit eb4fc5b

Please sign in to comment.