-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Circle CI to GitHub Action
Merge pull request #206 from openfisca/add-github-action
- Loading branch information
Showing
18 changed files
with
602 additions
and
936 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Publish to conda | ||
|
||
There are two ways to publish to conda: | ||
|
||
- A fully automatic in CI that publish to an "openfisca" channel. See below for more information. | ||
- A more complex for Conda-Forge. | ||
|
||
We use both for openfisca-core but only _openfisca channel_ for _OpenFisca-France-Data_. | ||
|
||
## Automatic upload | ||
|
||
The CI automaticaly build the Conda package and publish it when merging on master, see the `.github/workflow.yml`, step `publish-to-conda`. | ||
|
||
## Manual actions made to make it works the first time | ||
|
||
- Create an account on https://anaconda.org. | ||
- Create a token on https://anaconda.org/openfisca/settings/access with _Allow write access to the API site_. Warning, it expire on 2025/01/14. | ||
- Put the token in a CI env variable ANACONDA_TOKEN. | ||
|
||
## Manual actions before CI exist | ||
|
||
To create the package you can do the following in the project root folder: | ||
|
||
- Edit `.conda/meta.yaml` and update it if needed: | ||
- Version number | ||
- Dependencies | ||
|
||
- Install `conda-build` to build the package and [anaconda-client](https://github.com/Anaconda-Platform/anaconda-client) to push the package to anaconda.org: | ||
- `conda install -c anaconda conda-build anaconda-client` | ||
|
||
- Build & Upload package: | ||
- `conda build .conda` | ||
- `anaconda login` | ||
- `anaconda upload openfisca-france-data-<VERSION>-py_0.tar.bz2` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
############################################################################### | ||
## Fichier de description du package pour Anaconda.org | ||
## Le numéro de version est mis à jour automatiquement par BumpVer | ||
############################################################################### | ||
|
||
{% set name = "openfisca-france-data" %} | ||
{% set version = "0.22.0" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
path: .. | ||
|
||
build: | ||
noarch: python | ||
number: 0 | ||
script: "{{ PYTHON }} -m pip install . -vv" | ||
|
||
requirements: | ||
host: | ||
- python | ||
- pip | ||
run: | ||
- python >=3.7,<4.0 | ||
- click >=8.0.0,<9.0.0 | ||
- matplotlib >=3.1.1,<4.0.0 | ||
- multipledispatch >=0.6.0,<1.0.0 | ||
- openFisca-france >=113.0.0,<120.0.0 # Max 120 because of a bug in OF : https://github.com/openfisca/openfisca-france/issues/1996 | ||
- openFisca-survey-manager >=0.44.2,<1.0.0 | ||
- wquantiles >=0.3.0,<1.0.0 | ||
|
||
test: | ||
imports: | ||
- openfisca_france_data | ||
requires: | ||
- pip | ||
commands: | ||
#- pip check # TODO: openfisca-core 35.7.6 requires pytest, which is not installed. !!! | ||
- pip list | ||
|
||
outputs: | ||
- name: openfisca-france-data | ||
|
||
- name: openfisca-france-data-test | ||
build: | ||
noarch: python | ||
requirements: | ||
host: | ||
- python | ||
run: | ||
- autopep8 >=1.4.0,<1.5.0 | ||
- flake8 >=3.7.0,<3.8.0 | ||
- ipython >=7.5.0,<8.0.0 | ||
- mypy >=0.670,<1.0.0 | ||
- pytest >=4.3.0,<5.0.0 | ||
- pytest-cov >=2.6.0,<3.0.0 | ||
- scipy >=1.2.1,<2.0.0 | ||
- toolz >=0.9.0,<1.0.0 | ||
- bumpver | ||
- {{ pin_subpackage('openfisca-france-data', exact=True) }} | ||
|
||
about: | ||
home: https://fr.openfisca.org/ | ||
license_family: AGPL | ||
license: AGPL-3.0-only | ||
license_file: LICENSE | ||
summary: "OpenFisca-France-Data module to work with French survey data" | ||
description: | | ||
OpenFisca is a versatile microsimulation free software. | ||
This repository contains the module to work with French survey data. | ||
doc_url: https://fr.openfisca.org/ | ||
dev_url: https://github.com/openfisca/openfisca-france-data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
12 changes: 6 additions & 6 deletions
12
.circleci/is-version-number-acceptable.sh → .github/is-version-number-acceptable.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#! /usr/bin/env bash | ||
|
||
git tag "$(python setup.py --version)" | ||
git tag `python setup.py --version` | ||
git push --tags # update the repository version |
Oops, something went wrong.