From 94afc848fd06ed9fa6c0f29ff44d7792686a5a9d Mon Sep 17 00:00:00 2001 From: Florian Pagnoux Date: Tue, 20 Nov 2018 17:57:58 -0500 Subject: [PATCH 1/3] Update doc links --- CHANGELOG.md | 2 +- README.md | 2 +- .../reforms/flat_social_security_contribution.py | 2 +- .../reforms/modify_social_security_taxation.py | 2 +- openfisca_country_template/reforms/removal_basic_income.py | 2 +- openfisca_country_template/variables/benefits.py | 6 +++--- openfisca_country_template/variables/demographics.py | 2 +- openfisca_country_template/variables/housing.py | 2 +- openfisca_country_template/variables/income.py | 2 +- openfisca_country_template/variables/stats.py | 2 +- openfisca_country_template/variables/taxes.py | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3edaa1b..4edccd76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -215,7 +215,7 @@ name: Household living in a 40 sq. metres accommodation while being free lodgers #### Python API -When calculating an enum variable in Python, the output will be an [EnumArray](http://openfisca.readthedocs.io/en/latest/enum_array.html#module-openfisca_core.indexed_enums). +When calculating an enum variable in Python, the output will be an [EnumArray](https://openfisca.org/doc/openfisca-python-api/enum_array.html). See more on the OpenFisca-Core [changelog](https://github.com/openfisca/openfisca-core/blob/enums-perfs/CHANGELOG.md#2102-589-600-605). diff --git a/README.md b/README.md index b26d2014..b94ac494 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ To serve the Openfisca Web API locally, run: openfisca serve --port 5000 ``` -To read more about the `openfisca serve` command, check out its [documentation](https://openfisca.readthedocs.io/en/latest/openfisca_serve.html). +To read more about the `openfisca serve` command, check out its [documentation](https://openfisca.org/doc/openfisca-python-api/openfisca_serve.html). You can make sure that your instance of the API is working by requesting: diff --git a/openfisca_country_template/reforms/flat_social_security_contribution.py b/openfisca_country_template/reforms/flat_social_security_contribution.py index 3decb9b6..54f5815d 100644 --- a/openfisca_country_template/reforms/flat_social_security_contribution.py +++ b/openfisca_country_template/reforms/flat_social_security_contribution.py @@ -2,7 +2,7 @@ # This file defines a reform. # A reform is a set of modifications to be applied to a reference tax and benefit system to carry out experiments. -# See https://openfisca.org/doc/reforms.html +# See https://openfisca.org/doc/key-concepts/reforms.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca diff --git a/openfisca_country_template/reforms/modify_social_security_taxation.py b/openfisca_country_template/reforms/modify_social_security_taxation.py index 1db1f2c6..30f96989 100644 --- a/openfisca_country_template/reforms/modify_social_security_taxation.py +++ b/openfisca_country_template/reforms/modify_social_security_taxation.py @@ -2,7 +2,7 @@ # This file defines a reform. # A reform is a set of modifications to be applied to a reference tax and benefit system to carry out experiments. -# See https://openfisca.org/doc/reforms.html +# See https://openfisca.org/doc/key-concepts/reforms.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca diff --git a/openfisca_country_template/reforms/removal_basic_income.py b/openfisca_country_template/reforms/removal_basic_income.py index afd46cab..5ffb3536 100644 --- a/openfisca_country_template/reforms/removal_basic_income.py +++ b/openfisca_country_template/reforms/removal_basic_income.py @@ -2,7 +2,7 @@ # This file defines a reform. # A reform is a set of modifications to be applied to a reference tax and benefit system to carry out experiments. -# See https://openfisca.org/doc/reforms.html +# See https://openfisca.org/doc/key-concepts/reforms.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca diff --git a/openfisca_country_template/variables/benefits.py b/openfisca_country_template/variables/benefits.py index f90d03fb..79f6a620 100644 --- a/openfisca_country_template/variables/benefits.py +++ b/openfisca_country_template/variables/benefits.py @@ -2,7 +2,7 @@ # This file defines variables for the modelled legislation. # A variable is a property of an Entity such as a Person, a Household… -# See https://openfisca.org/doc/variables.html +# See https://openfisca.org/doc/key-concepts/variables.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca from openfisca_core.model_api import * @@ -20,14 +20,14 @@ class basic_income(Variable): # Since Dec 1st 2016, the basic income is provided to any adult, without considering their income. def formula_2016_12(person, period, parameters): age_condition = person('age', period) >= parameters(period).general.age_of_majority - return age_condition * parameters(period).benefits.basic_income # This '*' is a vectorial 'if'. See https://openfisca.org/doc/coding-the-legislation/30_case_disjunction.html#simple-multiplication + return age_condition * parameters(period).benefits.basic_income # This '*' is a vectorial 'if'. See https://openfisca.org/doc/coding-the-legislation/25_vectorial_computing.html#control-structures # From Dec 1st 2015 to Nov 30 2016, the basic income is provided to adults who have no income. # Before Dec 1st 2015, the basic income does not exist in the law, and calculating it returns its default value, which is 0. def formula_2015_12(person, period, parameters): age_condition = person('age', period) >= parameters(period).general.age_of_majority salary_condition = person('salary', period) == 0 - return age_condition * salary_condition * parameters(period).benefits.basic_income # The '*' is also used as a vectorial 'and'. See https://openfisca.org/doc/coding-the-legislation/25_vectorial_computing.html#forbidden-operations-and-alternatives + return age_condition * salary_condition * parameters(period).benefits.basic_income # The '*' is also used as a vectorial 'and'. See https://openfisca.org/doc/coding-the-legislation/25_vectorial_computing.html#boolean-operations class housing_allowance(Variable): diff --git a/openfisca_country_template/variables/demographics.py b/openfisca_country_template/variables/demographics.py index 19c0cf86..41e9e3ea 100644 --- a/openfisca_country_template/variables/demographics.py +++ b/openfisca_country_template/variables/demographics.py @@ -2,7 +2,7 @@ # This file defines variables for the modelled legislation. # A variable is a property of an Entity such as a Person, a Household… -# See https://openfisca.org/doc/variables.html +# See https://openfisca.org/doc/key-concepts/variables.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca from openfisca_core.model_api import * diff --git a/openfisca_country_template/variables/housing.py b/openfisca_country_template/variables/housing.py index 43fc16f9..56e519bb 100644 --- a/openfisca_country_template/variables/housing.py +++ b/openfisca_country_template/variables/housing.py @@ -2,7 +2,7 @@ # This file defines variables for the modelled legislation. # A variable is a property of an Entity such as a Person, a Household… -# See https://openfisca.org/doc/variables.html +# See https://openfisca.org/doc/key-concepts/variables.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca from openfisca_core.model_api import * diff --git a/openfisca_country_template/variables/income.py b/openfisca_country_template/variables/income.py index ee754599..7cb016ef 100644 --- a/openfisca_country_template/variables/income.py +++ b/openfisca_country_template/variables/income.py @@ -2,7 +2,7 @@ # This file defines variables for the modelled legislation. # A variable is a property of an Entity such as a Person, a Household… -# See https://openfisca.org/doc/variables.html +# See https://openfisca.org/doc/key-concepts/variables.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca from openfisca_core.model_api import * diff --git a/openfisca_country_template/variables/stats.py b/openfisca_country_template/variables/stats.py index 11b637f3..34787413 100644 --- a/openfisca_country_template/variables/stats.py +++ b/openfisca_country_template/variables/stats.py @@ -2,7 +2,7 @@ # This file defines variables for the modelled legislation. # A variable is a property of an Entity such as a Person, a Household… -# See https://openfisca.org/doc/variables.html +# See https://openfisca.org/doc/key-concepts/variables.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca from openfisca_core.model_api import * diff --git a/openfisca_country_template/variables/taxes.py b/openfisca_country_template/variables/taxes.py index 6080c7bd..6c83b2d4 100644 --- a/openfisca_country_template/variables/taxes.py +++ b/openfisca_country_template/variables/taxes.py @@ -2,7 +2,7 @@ # This file defines variables for the modelled legislation. # A variable is a property of an Entity such as a Person, a Household… -# See https://openfisca.org/doc/variables.html +# See https://openfisca.org/doc/key-concepts/variables.html # Import from openfisca-core the common Python objects used to code the legislation in OpenFisca from openfisca_core.model_api import * @@ -48,7 +48,7 @@ class housing_tax(Variable): def formula(household, period, parameters): # The housing tax is defined for a year, but depends on the `accommodation_size` and `housing_occupancy_status` on the first month of the year. # Here period is a year. We can get the first month of a year with the following shortcut. - # To build different periods, see https://openfisca.org/doc/coding-the-legislation/35_periods.html#calculating-dependencies-for-a-specific-period + # To build different periods, see https://openfisca.org/doc/coding-the-legislation/35_periods.html#calculate-dependencies-for-a-specific-period january = period.first_month accommodation_size = household('accommodation_size', january) From 7f07e8ba7e57f643919818505dd7345825f2b19b Mon Sep 17 00:00:00 2001 From: Florian Pagnoux Date: Tue, 20 Nov 2018 18:12:58 -0500 Subject: [PATCH 2/3] Bump version number --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4edccd76..100225fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 3.5.4 - [#??](https://github.com/openfisca/country-template/pull/??) + +* Minor change +* Details: + - Update links to the doc + ### 3.5.3 - [#64](https://github.com/openfisca/country-template/pull/64) * Minor change diff --git a/setup.py b/setup.py index 36d64ddc..b7dcf956 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name = "OpenFisca-Country-Template", - version = "3.5.3", + version = "3.5.4", author = "OpenFisca Team", author_email = "contact@openfisca.org", classifiers=[ From 44a12027618fc9a09cdbd98aae8decc3516474a5 Mon Sep 17 00:00:00 2001 From: Florian Pagnoux Date: Tue, 20 Nov 2018 18:14:06 -0500 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 100225fc..cda4160b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -### 3.5.4 - [#??](https://github.com/openfisca/country-template/pull/??) +### 3.5.4 - [#65](https://github.com/openfisca/country-template/pull/65) * Minor change * Details: