-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: 'master' into fix-enum-scalar-array-bug
- Loading branch information
Showing
274 changed files
with
16,764 additions
and
8,221 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 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,37 @@ | ||
# Publish OpenFisca-Core to conda | ||
|
||
We use two systems to publish to conda: | ||
- A fully automatic in OpenFisca-Core CI that publishes to an `openfisca` channel. See below for more information. | ||
- A more complex in Conda-Forge CI, that publishes to [Conda-Forge](https://conda-forge.org). See this [YouTube video](https://www.youtube.com/watch?v=N2XwK9BkJpA) as an introduction to Conda-Forge, and [openfisca-core-feedstock repository](https://github.com/openfisca/openfisca-core-feedstock) for the project publishing process on Conda-Forge. | ||
|
||
We use both channels. With conda-forge users get an easier way to install and use openfisca-core: conda-forge is the default channel in Anaconda and it allows for publishing packages that depend on openfisca-core to conda-forge. | ||
|
||
|
||
## Automatic upload | ||
|
||
The CI automatically uploads the PyPi package; see the `.github/workflow.yml`, step `publish-to-conda`. | ||
|
||
## Manual actions for first time publishing | ||
|
||
- 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 expires on 2023/01/13. | ||
|
||
- Put the token in a CI environment variable named `ANACONDA_TOKEN`. | ||
|
||
|
||
## Manual actions to test before CI | ||
|
||
Everything is done by the CI but if you want to test it locally, here is how to do it. | ||
|
||
Do the following in the project root folder: | ||
|
||
- Auto-update `.conda/meta.yaml` with last infos from pypi by running: | ||
- `python .github/get_pypi_info.py -p OpenFisca-Core` | ||
|
||
- Build package: | ||
- `conda install -c anaconda conda-build anaconda-client` (`conda-build` to build the package and [anaconda-client](https://github.com/Anaconda-Platform/anaconda-client) to push the package to anaconda.org) | ||
- `conda build -c conda-forge .conda` | ||
|
||
- Upload the package to Anaconda.org, but DON'T do it if you don't want to publish your locally built package as official openfisca-core library: | ||
- `anaconda login` | ||
- `anaconda upload openfisca-core-<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,9 @@ | ||
numpy: | ||
- 1.24 | ||
- 1.25 | ||
- 1.26 | ||
|
||
python: | ||
- 3.9 | ||
- 3.10 | ||
- 3.11 |
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,86 @@ | ||
############################################################################### | ||
## File for Anaconda.org | ||
## It use Jinja2 templating code to retreive information from setup.py | ||
############################################################################### | ||
|
||
{% set name = "OpenFisca-Core" %} | ||
{% set data = load_setup_py_data() %} | ||
{% set version = data.get('version') %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../.. | ||
|
||
build: | ||
noarch: python | ||
number: 0 | ||
script: "{{ PYTHON }} -m pip install . -vv" | ||
entry_points: | ||
- openfisca = openfisca_core.scripts.openfisca_command:main | ||
- openfisca-run-test = openfisca_core.scripts.openfisca_command:main | ||
|
||
requirements: | ||
host: | ||
- numpy | ||
- pip | ||
- python | ||
- setuptools >=61.0 | ||
run: | ||
- numpy | ||
- python | ||
{% for req in data['install_requires'] %} | ||
{% if not req.startswith('numpy') %} | ||
- {{ req }} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
test: | ||
imports: | ||
- openfisca_core | ||
- openfisca_core.commons | ||
|
||
outputs: | ||
- name: openfisca-core | ||
|
||
- name: openfisca-core-api | ||
build: | ||
noarch: python | ||
requirements: | ||
host: | ||
- numpy | ||
- python | ||
run: | ||
- numpy | ||
- python | ||
{% for req in data['extras_require']['web-api'] %} | ||
- {{ req }} | ||
{% endfor %} | ||
- {{ pin_subpackage('openfisca-core', exact=True) }} | ||
|
||
- name: openfisca-core-dev | ||
build: | ||
noarch: python | ||
requirements: | ||
host: | ||
- numpy | ||
- python | ||
run: | ||
- numpy | ||
- python | ||
{% for req in data['extras_require']['dev'] %} | ||
- {{ req }} | ||
{% endfor %} | ||
- {{ pin_subpackage('openfisca-core-api', exact=True) }} | ||
|
||
about: | ||
home: https://openfisca.org | ||
license_family: AGPL | ||
license: AGPL-3.0-only | ||
license_file: LICENSE | ||
summary: "A versatile microsimulation free software" | ||
doc_url: https://openfisca.org | ||
dev_url: https://github.com/openfisca/openfisca-core/ | ||
description: This package contains the core features of OpenFisca, which are meant to be used by country packages such as OpenFisca-Country-Template. |
Oops, something went wrong.