Skip to content

Commit 47d447c

Browse files
committed
merge: 'master' into fix-enum-scalar-array-bug
2 parents af3636b + bbf342f commit 47d447c

File tree

274 files changed

+16771
-8131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+16771
-8131
lines changed

.circleci/config.yml

Lines changed: 0 additions & 180 deletions
This file was deleted.

.circleci/get-numpy-version.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

.circleci/publish-git-tag.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

.circleci/publish-python-package.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

.conda/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Publish OpenFisca-Core to conda
2+
3+
We use two systems to publish to conda:
4+
- A fully automatic in OpenFisca-Core CI that publishes to an `openfisca` channel. See below for more information.
5+
- 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.
6+
7+
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.
8+
9+
10+
## Automatic upload
11+
12+
The CI automatically uploads the PyPi package; see the `.github/workflow.yml`, step `publish-to-conda`.
13+
14+
## Manual actions for first time publishing
15+
16+
- Create an account on https://anaconda.org.
17+
- 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.
18+
19+
- Put the token in a CI environment variable named `ANACONDA_TOKEN`.
20+
21+
22+
## Manual actions to test before CI
23+
24+
Everything is done by the CI but if you want to test it locally, here is how to do it.
25+
26+
Do the following in the project root folder:
27+
28+
- Auto-update `.conda/meta.yaml` with last infos from pypi by running:
29+
- `python .github/get_pypi_info.py -p OpenFisca-Core`
30+
31+
- Build package:
32+
- `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)
33+
- `conda build -c conda-forge .conda`
34+
35+
- 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:
36+
- `anaconda login`
37+
- `anaconda upload openfisca-core-<VERSION>-py_0.tar.bz2`
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
numpy:
2+
- 1.24
3+
- 1.25
4+
- 1.26
5+
6+
python:
7+
- 3.9
8+
- 3.10
9+
- 3.11

.conda/openfisca-core/meta.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
###############################################################################
2+
## File for Anaconda.org
3+
## It use Jinja2 templating code to retreive information from setup.py
4+
###############################################################################
5+
6+
{% set name = "OpenFisca-Core" %}
7+
{% set data = load_setup_py_data() %}
8+
{% set version = data.get('version') %}
9+
10+
package:
11+
name: {{ name|lower }}
12+
version: {{ version }}
13+
14+
source:
15+
path: ../..
16+
17+
build:
18+
noarch: python
19+
number: 0
20+
script: "{{ PYTHON }} -m pip install . -vv"
21+
entry_points:
22+
- openfisca = openfisca_core.scripts.openfisca_command:main
23+
- openfisca-run-test = openfisca_core.scripts.openfisca_command:main
24+
25+
requirements:
26+
host:
27+
- numpy
28+
- pip
29+
- python
30+
- setuptools >=61.0
31+
run:
32+
- numpy
33+
- python
34+
{% for req in data['install_requires'] %}
35+
{% if not req.startswith('numpy') %}
36+
- {{ req }}
37+
{% endif %}
38+
{% endfor %}
39+
40+
test:
41+
imports:
42+
- openfisca_core
43+
- openfisca_core.commons
44+
45+
outputs:
46+
- name: openfisca-core
47+
48+
- name: openfisca-core-api
49+
build:
50+
noarch: python
51+
requirements:
52+
host:
53+
- numpy
54+
- python
55+
run:
56+
- numpy
57+
- python
58+
{% for req in data['extras_require']['web-api'] %}
59+
- {{ req }}
60+
{% endfor %}
61+
- {{ pin_subpackage('openfisca-core', exact=True) }}
62+
63+
- name: openfisca-core-dev
64+
build:
65+
noarch: python
66+
requirements:
67+
host:
68+
- numpy
69+
- python
70+
run:
71+
- numpy
72+
- python
73+
{% for req in data['extras_require']['dev'] %}
74+
- {{ req }}
75+
{% endfor %}
76+
- {{ pin_subpackage('openfisca-core-api', exact=True) }}
77+
78+
about:
79+
home: https://openfisca.org
80+
license_family: AGPL
81+
license: AGPL-3.0-only
82+
license_file: LICENSE
83+
summary: "A versatile microsimulation free software"
84+
doc_url: https://openfisca.org
85+
dev_url: https://github.com/openfisca/openfisca-core/
86+
description: This package contains the core features of OpenFisca, which are meant to be used by country packages such as OpenFisca-Country-Template.

0 commit comments

Comments
 (0)