diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..3acfbb3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,25 @@ +Hello hello ! + +Je suis le fan numéro un d'OpenFisca, mais je viens de rencontrer un problème. + +### Qu'ai-je fait ? + + +### À quoi m'attendais-je ? + + +### Que s'est-il passé en réalité ? + + +### Voici des informations qui peuvent aider à reproduire le problème : + + +### Contexte + +Je m'identifie plus en tant que : + +- [ ] Contributeur·e : je contribue à OpenFisca Tunisia. +- [ ] Développeur·e : je crée des outils qui utilisent OpenFisca Tunisia. +- [ ] Économiste : je réalise des simulations avec des données. +- [ ] Mainteneur·e : j'intègre les contributions à OpenFisca Tunisia. +- [ ] Autre : _(ajoutez une description du contexte dans lequel vous utilisez OpenFisca)_. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..088980a --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,31 @@ +Merci de contribuer à OpenFisca ! Effacez cette ligne ainsi que, pour chaque ligne ci-dessous, les cas ne correspondant pas à votre contribution :) + +* Évolution du système socio-fiscal. | Amélioration technique. | Correction d'un crash. | Changement mineur. +* Périodes concernées : toutes. | jusqu'au JJ/MM/AAAA. | à partir du JJ/MM/AAAA. +* Zones impactées : `chemin/vers/le/fichier/contenant/les/variables/impactées`. +* Détails : + - Description de la fonctionnalité ajoutée ou du nouveau comportement adopté. + - Cas dans lesquels une erreur était constatée. + +- - - - + +Ces changements (effacez les lignes ne correspondant pas à votre cas) : + +- Modifient l'API publique d'OpenFisca Tunisia (par exemple renommage ou suppression de variables). +- Ajoutent une fonctionnalité (par exemple ajout d'une variable). +- Corrigent ou améliorent un calcul déjà existant. +- Modifient des éléments non fonctionnels de ce dépôt (par exemple modification du README). + +- - - - + +Quelques conseils à prendre en compte : + +- [ ] Jetez un coup d'œil au [guide de contribution](https://github.com/openfisca/openfisca-tunisia/blob/master/CONTRIBUTING.md). +- [ ] Regardez s'il n'y a pas une [proposition introduisant ces mêmes changements](https://github.com/openfisca/openfisca-tunisia/pulls). +- [ ] Documentez votre contribution avec des références législatives. +- [ ] Mettez à jour ou ajoutez des tests correspondant à votre contribution. +- [ ] Augmentez le [numéro de version](https://speakerdeck.com/mattisg/git-session-2-strategies?slide=81) dans [`setup.py`](https://github.com/openfisca/openfisca-tunisia/blob/master/setup.py). +- [ ] Mettez à jour le [`CHANGELOG.md`](https://github.com/openfisca/openfisca-tunisia/blob/master/CHANGELOG.md). +- [ ] Assurez-vous de bien décrire votre contribution, comme indiqué ci-dessus + +Et surtout, n'hésitez pas à demander de l'aide ! :) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 048d2eb..be536b9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,10 +3,7 @@ updates: - package-ecosystem: pip directory: "/" schedule: - interval: daily - time: "00:00" - timezone: Europe/Paris + interval: weekly + labels: + - kind:dependencies open-pull-requests-limit: 2 - reviewers: - - sandcha - - benjello diff --git a/.github/get_minimal_version.py b/.github/get_minimal_version.py new file mode 100644 index 0000000..79617fe --- /dev/null +++ b/.github/get_minimal_version.py @@ -0,0 +1,9 @@ +import re + +# This script fetches and prints the minimal versions of Openfisca-Core and Openfisca-Tunisia +# dependencies in order to ensure their compatibility during CI testing +with open('./setup.py') as file: + for line in file: + version = re.search(r'(Core|Tunisia)\s*>=\s*([\d\.]*)', line) + if version: + print(f'Openfisca-{version[1]}=={version[2]}') # noqa: T201 <- This is to avoid flake8 print detection. diff --git a/.github/get_pypi_info.py b/.github/get_pypi_info.py new file mode 100644 index 0000000..87522f6 --- /dev/null +++ b/.github/get_pypi_info.py @@ -0,0 +1,51 @@ +import argparse +import requests +import logging + + +logging.basicConfig(level=logging.INFO) + + +def get_info(package_name: str = '') -> dict: + ''' + Get minimal informations needed by .conda/meta.yaml from PyPi JSON API. + ::package_name:: Name of package to get infos from. + ::return:: A dict with last_version, url and sha256 + ''' + if package_name == '': + raise ValueError('Package name not provided.') + resp = requests.get(f'https://pypi.org/pypi/{package_name}/json').json() + version = resp['info']['version'] + for v in resp['releases'][version]: + if v['packagetype'] == 'sdist': # for .tag.gz + return { + 'last_version': version, + 'url': v['url'], + 'sha256': v['digests']['sha256'] + } + + +def replace_in_file(filepath: str, info: dict): + ''' + ::filepath:: Path to meta.yaml, with filename + ::info:: Dict with information to populate + ''' + with open(filepath, 'rt') as fin: + meta = fin.read() + # Replace with info from PyPi + meta = meta.replace('PYPI_VERSION', info['last_version']) + meta = meta.replace('PYPI_URL', info['url']) + meta = meta.replace('PYPI_SHA256', info['sha256']) + with open(filepath, 'wt') as fout: + fout.write(meta) + logging.info(f'File {filepath} has been updated with informations from PyPi.') + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('-p', '--package', type=str, default='', required=True, help='The name of the package') + parser.add_argument('-f', '--filename', type=str, default='.conda/meta.yaml', help='Path to meta.yaml, with filename') + args = parser.parse_args() + info = get_info(args.package) + logging.info(f'Information of the last published PyPi package : {info}') + replace_in_file(args.filename, info) diff --git a/.github/has-functional-changes.sh b/.github/has-functional-changes.sh new file mode 100755 index 0000000..48f9780 --- /dev/null +++ b/.github/has-functional-changes.sh @@ -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 diff --git a/.github/is-version-number-acceptable.sh b/.github/is-version-number-acceptable.sh new file mode 100755 index 0000000..0f704a9 --- /dev/null +++ b/.github/is-version-number-acceptable.sh @@ -0,0 +1,33 @@ +#! /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 + +if ! $(dirname "$BASH_SOURCE")/has-functional-changes.sh | grep --quiet CHANGELOG.md +then + echo "CHANGELOG.md has not been modified, while functional changes were made." + echo "Explain what you changed before merging this branch into master." + echo "Look at the CONTRIBUTING.md file to learn how to write the changelog." + exit 2 +fi diff --git a/.github/lint-changed-python-files.sh b/.github/lint-changed-python-files.sh new file mode 100755 index 0000000..72d8aad --- /dev/null +++ b/.github/lint-changed-python-files.sh @@ -0,0 +1,11 @@ +#! /usr/bin/env bash + +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 ! changes=$(git diff-index --name-only --diff-filter=ACMR --exit-code $last_tagged_commit -- "*.py") +then + echo "Linting the following Python files:" + echo $changes + flake8 $changes +else echo "No changed Python files to lint" +fi diff --git a/.github/lint-changed-yaml-tests.sh b/.github/lint-changed-yaml-tests.sh new file mode 100755 index 0000000..16e9943 --- /dev/null +++ b/.github/lint-changed-yaml-tests.sh @@ -0,0 +1,11 @@ +#! /usr/bin/env bash + +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 ! changes=$(git diff-index --name-only --diff-filter=ACMR --exit-code $last_tagged_commit -- "tests/*.yaml") +then + echo "Linting the following changed YAML tests:" + echo $changes + yamllint $changes +else echo "No changed YAML tests to lint" +fi diff --git a/.github/publish-git-tag.sh b/.github/publish-git-tag.sh new file mode 100755 index 0000000..4450357 --- /dev/null +++ b/.github/publish-git-tag.sh @@ -0,0 +1,4 @@ +#! /usr/bin/env bash + +git tag `python setup.py --version` +git push --tags # update the repository version diff --git a/.github/split_tests.py b/.github/split_tests.py new file mode 100644 index 0000000..11e2b3f --- /dev/null +++ b/.github/split_tests.py @@ -0,0 +1,22 @@ +import sys +from glob import glob + + +def split_tests(number_of_files, CI_NODE_TOTAL, CI_NODE_INDEX, test_files_list): + test_files_sublist = [] + + for file_index in range(number_of_files): + file_number = file_index % CI_NODE_TOTAL + if file_number == CI_NODE_INDEX: + test_files_sublist.append(test_files_list[file_index]) + + tests_to_run_string = ' '.join(test_files_sublist) + + return tests_to_run_string + + +if __name__ == '__main__': + CI_NODE_TOTAL, CI_NODE_INDEX = int(sys.argv[1]), int(sys.argv[2]) + test_files_list = glob('tests/**/*.yaml', recursive=True) + glob('tests/**/*.yml', recursive=True) + number_of_files = len(test_files_list) + sys.stdout.write(split_tests(number_of_files, CI_NODE_TOTAL, CI_NODE_INDEX, test_files_list)) diff --git a/.github/test-api.sh b/.github/test-api.sh new file mode 100755 index 0000000..75c408d --- /dev/null +++ b/.github/test-api.sh @@ -0,0 +1,14 @@ +#! /usr/bin/env bash + +PORT=5000 +ENDPOINT=spec + +openfisca serve --country-package openfisca_tunisia --port $PORT --workers 1 & +server_pid=$! + +curl --retry-connrefused --retry 10 --retry-delay 5 --fail http://127.0.0.1:$PORT/$ENDPOINT | python -m json.tool > /dev/null +result=$? + +kill $server_pid + +exit $? diff --git a/.github/workflows/validate_yaml.yml b/.github/workflows/validate_yaml.yml new file mode 100644 index 0000000..ac97c47 --- /dev/null +++ b/.github/workflows/validate_yaml.yml @@ -0,0 +1,15 @@ +name: Validate YAML + +on: + push: + workflow_dispatch: + pull_request: + types: [opened, reopened] + +jobs: + validate_yaml: + uses: tax-benefit/actions/.github/workflows/validate_yaml.yml@v1 + with: + parameters_path: "openfisca_tunisia/parameters" + secrets: + token: ${{ secrets.CONTROL_CENTER_TOKEN }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..3c667e1 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,326 @@ +name: OpenFisca Tunisia + +on: + push: + pull_request: + types: [opened, reopened] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: ["ubuntu-20.04"] # On peut ajouter "macos-latest" si besoin + python-version: ["3.9.9", "3.10.6"] + openfisca-dependencies: [minimal, maximal] + 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.os }}-${{ 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') }}-${{ matrix.os }} + build-${{ env.pythonLocation }}-${{ matrix.os }} + - 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.os }}-${{ matrix.openfisca-dependencies }} + + lint-files: + runs-on: ubuntu-20.04 + strategy: + matrix: + dependencies-version: [maximal] + needs: [ build ] + 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 }}-ubuntu-20.04-${{ matrix.dependencies-version }} + - run: make check-syntax-errors + - run: make check-style + - name: Lint Python files + run: "${GITHUB_WORKSPACE}/.github/lint-changed-python-files.sh" + - name: Lint YAML tests + run: "${GITHUB_WORKSPACE}/.github/lint-changed-yaml-tests.sh" + test-python: + runs-on: ${{ matrix.os }} + needs: [ build ] + strategy: + fail-fast: true + matrix: + os: [ "ubuntu-20.04" ] # On peut ajouter "macos-latest" si besoin + python-version: ["3.9.9", "3.10.6"] + openfisca-dependencies: [minimal, maximal] + steps: + - 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.os }}-${{ matrix.openfisca-dependencies }} + - run: | + shopt -s globstar + openfisca test tests/**/*.py + if: matrix.openfisca-dependencies != 'minimal' || matrix.python-version != '3.9.9' + + test-path-length: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9.9 + - name: Test max path length + run: make check-path-length + + test-yaml: + runs-on: ubuntu-20.04 + needs: [ build ] + strategy: + fail-fast: false + matrix: + # Set N number of parallel jobs to run tests on. Here we use 10 jobs + # Remember to update ci_node_index below to 0..N-1 + ci_node_total: [ 10 ] + ci_node_index: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ] + openfisca-dependencies: [minimal, maximal] + 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 }}-ubuntu-20.04-${{ matrix.openfisca-dependencies }} + - name: Split YAML tests + id: yaml-test + env: + CI_NODE_TOTAL: ${{ matrix.ci_node_total }} + CI_NODE_INDEX: ${{ matrix.ci_node_index }} + run: | + echo "TEST_FILES_SUBLIST=$(python "${GITHUB_WORKSPACE}/.github/split_tests.py" ${CI_NODE_TOTAL} ${CI_NODE_INDEX})" >> $GITHUB_ENV + - name: Run YAML test + run: | + openfisca test ${TEST_FILES_SUBLIST} + + test-api: + runs-on: ubuntu-20.04 + strategy: + matrix: + dependencies-version: [maximal] + needs: [ build ] + steps: + - 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 }}-ubuntu-20.04-${{ matrix.dependencies-version }} + - name: Test the Web API + run: "${GITHUB_WORKSPACE}/.github/test-api.sh" + + check-version-and-changelog: + runs-on: ubuntu-20.04 + needs: [ lint-files, test-python, test-yaml, test-api ] # 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-and-changelog ] + 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: + dependencies-version: [maximal] + needs: [ check-for-functional-changes ] + if: needs.check-for-functional-changes.outputs.status == 'success' + env: + PYPI_USERNAME: __token__ + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + 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 }}-ubuntu-20.04-${{ matrix.dependencies-version }} + - name: Cache release + id: restore-release + uses: actions/cache@v3 + with: + path: dist + key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-ubuntu-20.04-${{ matrix.dependencies-version }} + - name: Upload a Python package to PyPi + run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_TOKEN + - 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 + channels: openfisca,conda-forge + activate-environment: true + - uses: actions/checkout@v3 + - name: Update meta.yaml + run: | + python3 -m pip install requests argparse + python3 .github/get_pypi_info.py -p OpenFisca-Tunisia + - 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 -c openfisca -c conda-forge --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" + # Add conda-forge for OpenFisca-Core + channels: openfisca,conda-forge + activate-environment: true + - uses: actions/checkout@v3 + - name: Test max path length + run: "python3 openfisca_tunisia/scripts/check_path_length.py" + - 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-tunisia-dev-${{ env.PACKAGE_VERSION }}-py_0.tar.bz2 openfisca-tunisia-dev + - name: openfisca test + run: openfisca test --country-package openfisca_tunisia tests + + 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 + - name: Conda build and upload + # This shell is made necessary by https://github.com/conda-incubator/setup-miniconda/issues/128 + shell: bash -l {0} + run: | + conda install --yes conda-build anaconda-client + conda config --set anaconda_upload yes + conda build --channel conda-forge --channel openfisca --token ${{ secrets.ANACONDA_TOKEN }} --user openfisca .conda diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f843d0c..5bbb16a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ +# Contributing to OpenFisca Tunisia + > This file defines the rules to follow to contribute to your repository. > The rules suggested here are what we generally use for OpenFisca packages. @@ -5,7 +7,6 @@ Thank you for wanting to contribute to OpenFisca! :smiley: TL;DR: [GitHub Flow](https://guides.github.com/introduction/flow/), [SemVer](http://semver.org/). - ## Pull requests We follow the [GitHub Flow](https://guides.github.com/introduction/flow/): all code contributions are submitted via a pull request towards the `master` branch. @@ -24,7 +25,6 @@ In case of breaking changes, you **must** give details about what features were > You must also provide guidelines to help users adapt their code to be compatible with the new version of the package. - ## Advertising changes ### Version number @@ -53,13 +53,12 @@ Each change must be documented with the following elements: - On the first line appears as a title the version number, as well as a link towards the Pull Request introducing the change. The title level must match the incrementation level of the version. - > For instance : - > # 13.0.0 [#671](https://github.com/openfisca/openfisca-france/pull/671) + > # 13.0.0 [#671](https://github.com/openfisca/openfisca-tunisia/pull/671) > - > ## 13.2.0 [#676](https://github.com/openfisca/openfisca-france/pull/676) + > ## 13.2.0 [#676](https://github.com/openfisca/openfisca-tunisia/pull/676) > - > ### 13.1.5 [#684](https://github.com/openfisca/openfisca-france/pull/684) + > ### 13.1.5 [#684](https://github.com/openfisca/openfisca-tunisia/pull/684) - The second line indicates the type of the change. The possible types are: - `Tax and benefit system evolution`: Calculation improvement, fix, or update. Impacts th