Skip to content

Commit

Permalink
merge: 'master' into fix-enum-scalar-array-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Oct 4, 2024
2 parents af3636b + bbf342f commit 175efd4
Show file tree
Hide file tree
Showing 274 changed files with 16,764 additions and 8,221 deletions.
180 changes: 0 additions & 180 deletions .circleci/config.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .circleci/get-numpy-version.py

This file was deleted.

4 changes: 0 additions & 4 deletions .circleci/publish-git-tag.sh

This file was deleted.

4 changes: 0 additions & 4 deletions .circleci/publish-python-package.sh

This file was deleted.

37 changes: 37 additions & 0 deletions .conda/README.md
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`
9 changes: 9 additions & 0 deletions .conda/openfisca-core/conda_build_config.yaml
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
86 changes: 86 additions & 0 deletions .conda/openfisca-core/meta.yaml
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.
Loading

0 comments on commit 175efd4

Please sign in to comment.