Skip to content

Commit

Permalink
renaming to french
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Dutronc-Postel committed Jul 30, 2024
1 parent 4771193 commit a6bb676
Show file tree
Hide file tree
Showing 47 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inline-quotes = "
multiline-quotes = """
import-order-style = appnexus
no-accept-encodings = true
application-import-names = openfisca_france_firms
application-import-names = openfisca_france_entreprises
application-package-names = openfisca_core
exclude = .git,__pycache__,.venv,.github,.devcontainer,docs

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ Examples:

### Changelog

openfisca_france_firms changes must be understood by users who don't necessarily work on the code. The Changelog must therefore be as explicit as possible.
openfisca_france_entreprises changes must be understood by users who don't necessarily work on the code. The Changelog must therefore be as explicit as possible.

Each change must be documented with the following elements:

- On the first line appears as a title the version number, as well as a link towards the Pull Request introducing the change. The title level must match the incrementation level of the version.


> For instance :
> # 13.0.0 - [#671](git://github.com/pzuldp/openfisca-france-firms.git/pull/671)
> # 13.0.0 - [#671](git://github.com/pzuldp/openfisca-france-entreprises.git/pull/671)
>
> ## 13.2.0 - [#676](git://github.com/pzuldp/openfisca-france-firms.git/pull/676)
> ## 13.2.0 - [#676](git://github.com/pzuldp/openfisca-france-entreprises.git/pull/676)
>
> ### 13.1.5 - [#684](git://github.com/pzuldp/openfisca-france-firms.git/pull/684)
> ### 13.1.5 - [#684](git://github.com/pzuldp/openfisca-france-entreprises.git/pull/684)
- The second line indicates the type of the change. The possible types are:
- `Tax and benefit system evolution`: Calculation improvement, fix, or update. Impacts the users interested in calculations.
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include openfisca_france_firms *
recursive-include openfisca_france_entreprises *
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ deps:

install: deps
@# Install OpenFisca-Extension-Template for development.
@# `make install` installs the editable version of openfisca_france_firms.
@# `make install` installs the editable version of openfisca_france_entreprises.
@# This allows contributors to test as they code.
pip install --editable .[dev] --upgrade --use-deprecated=legacy-resolver

Expand Down Expand Up @@ -41,7 +41,7 @@ check-style:
yamllint `git ls-files | grep "\.yaml$$"`

test: clean check-syntax-errors check-style
openfisca test --country-package openfisca_france_firms openfisca_france_firms/tests
openfisca test --country-package openfisca_france_entreprises openfisca_france_entreprises/tests

serve-local: build
openfisca serve --country-package openfisca_france_firms
openfisca serve --country-package openfisca_france_entreprises
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ The country whose law is modelled here has a very simple tax and benefit system.
- On the first of December, 2015, it introduced a basic income for all its citizens of age who have no income.
- On the first of December, 2016, it removed the income condition, providing all its adult citizens with a basic income.

These elements are described in different folders. All the modelling happens within the `openfisca_france_firms` folder.
These elements are described in different folders. All the modelling happens within the `openfisca_france_entreprises` folder.

- The rates are in the `parameters` folder.
- The formulas are in the `variables` folder.
- This country package comes also with *reforms* in the `reforms` folder. This is optional: your country may exist without defining any reform.
- In this country, there is [a reform project](./openfisca_france_firms/reforms/modify_social_security_taxation.py) aiming to modify the social security taxation, deleting the first bracket, raising the intermediary ones and adding a new bracket with a higher tax rate of `40 %` for people earning more than `40000`. This reform project would apply starting from `2017-01-01`.
- In this country, there is [a reform project](./openfisca_france_entreprises/reforms/modify_social_security_taxation.py) aiming to modify the social security taxation, deleting the first bracket, raising the intermediary ones and adding a new bracket with a higher tax rate of `40 %` for people earning more than `40000`. This reform project would apply starting from `2017-01-01`.

The files that are outside from the `openfisca_france_firms` folder are used to set up the development environment.
The files that are outside from the `openfisca_france_entreprises` folder are used to set up the development environment.

## Packaging your Country Package for Distribution

Expand Down Expand Up @@ -93,7 +93,7 @@ pip --version # should print at least 9.0.
Install the Country Package:

```sh
pip install openfisca_france_firms
pip install openfisca_france_entreprises
```

:warning: Please beware that installing the Country Package with `pip` is dependent on its maintainers publishing said package.
Expand Down Expand Up @@ -131,8 +131,8 @@ python --version # should print "Python 3.9.xx".
Clone this Country Package on your machine:

```sh
git clone git://github.com/pzuldp/openfisca-france-firms.git.git
cd openfisca-france-firms.git
git clone git://github.com/pzuldp/openfisca-france-entreprises.git.git
cd openfisca-france-entreprises.git
pip install --upgrade pip build twine
pip install --editable .[dev] --upgrade
```
Expand All @@ -155,7 +155,7 @@ If you are considering building a web application, you can use the packaged Open
To serve the Openfisca Web API locally, run:

```sh
openfisca serve --port 5000 --country-package openfisca_france_firms
openfisca serve --port 5000 --country-package openfisca_france_entreprises
```

Or use the quick-start Make command:
Expand All @@ -180,6 +180,6 @@ You can test your new Web API by sending it example JSON data located in the `si

```sh
curl -X POST -H "Content-Type: application/json" \
-d @./openfisca_france_firms/situation_examples/couple.json \
-d @./openfisca_france_entreprises/situation_examples/couple.json \
http://localhost:5000/calculate
```
4 changes: 2 additions & 2 deletions openfisca_france_firms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from openfisca_core.taxbenefitsystems import TaxBenefitSystem

from openfisca_france_firms import entities
from openfisca_france_firms.situation_examples import couple
from openfisca_france_entreprises import entities
from openfisca_france_entreprises.situation_examples import couple


COUNTRY_DIR = os.path.dirname(os.path.abspath(__file__))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from openfisca_core.variables import Variable

# Import the Entities specifically defined for this tax and benefit system
from openfisca_france_firms.entities import Etablissement
from openfisca_france_entreprises.entities import Etablissement


def create_dynamic_variable(name, **variable):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from openfisca_core.variables import Variable

# Import the Entities specifically defined for this tax and benefit system
from openfisca_france_firms.entities import Etablissement
from openfisca_france_entreprises.entities import Etablissement


class has_car(Variable):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Note the `reforms: ` key in the below YAML blocks.

- name: We will dynamically add a new variable "is_euets" thanks to a reform
reforms: openfisca_france_firms.reforms.examples.example_add_dynamic_variable.add_dynamic_variable
reforms: openfisca_france_entreprises.reforms.examples.example_add_dynamic_variable.add_dynamic_variable
period: 2017-01
output:
is_euets: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
# Note the `reforms: ` key in the below YAML blocks.

- name: No social security contribution on small example_salaries
reforms: openfisca_france_firms.reforms.examples.example_modify_income_tax.modify_income_tax_progressive
reforms: openfisca_france_entreprises.reforms.examples.example_modify_income_tax.modify_income_tax_progressive
period: 2017-01
input:
example_salary: 2000
output:
example_income_tax_progressive: 0

- name: Increased social security contribution on medium example_salaries
reforms: openfisca_france_firms.reforms.examples.example_modify_income_tax.modify_income_tax_progressive
reforms: openfisca_france_entreprises.reforms.examples.example_modify_income_tax.modify_income_tax_progressive
period: 2017-01
input:
example_salary: 15000
output:
example_income_tax_progressive: 1336

- name: High social security contribution on high example_salaries
reforms: openfisca_france_firms.reforms.examples.example_modify_income_tax.modify_income_tax_progressive
reforms: openfisca_france_entreprises.reforms.examples.example_modify_income_tax.modify_income_tax_progressive
period: 2017-01
input:
example_salary: 50000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Note the `reforms: ` key in the below YAML blocks.

- name: The new tax applies to car-holding people
reforms: openfisca_france_firms.reforms.examples.example_add_new_tax.add_new_tax
reforms: openfisca_france_entreprises.reforms.examples.example_add_new_tax.add_new_tax
period: 2017-01
input:
example_salary: 2000
Expand All @@ -16,7 +16,7 @@
new_tax: 400

- name: The new tax does not apply otherwise
reforms: openfisca_france_firms.reforms.examples.example_add_new_tax.add_new_tax
reforms: openfisca_france_entreprises.reforms.examples.example_add_new_tax.add_new_tax
period: 2017-01
input:
example_salary: 2000
Expand Down
2 changes: 1 addition & 1 deletion openfisca_france_firms/variables/bilan/actif/actif.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class actif_brut(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class matieres_premieres_brutes(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class frais_etablissement_bruts(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class capital_souscrit_non_appele_brut(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class charges_constatees_avance_brutes(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class produit_emissions_titres_participatifs(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class capital_social_individuel(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class produits_constates_avance(Variable):
Expand Down
2 changes: 1 addition & 1 deletion openfisca_france_firms/variables/bilan/passif/dettes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class emprunts_obligatoires_convertibles(Variable):
Expand Down
2 changes: 1 addition & 1 deletion openfisca_france_firms/variables/bilan/passif/passif.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class passif_total_iv(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class provisions_pour_risques(Variable):
Expand Down
2 changes: 1 addition & 1 deletion openfisca_france_firms/variables/bilan/passif/renvois.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale # noqa F401
from openfisca_france_entreprises.entities import UniteLegale # noqa F401


class ecart_reevaluation(Variable):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from openfisca_core.model_api import *

# Import the Entities specifically defined for this tax and benefit system
from openfisca_france_firms.entities import UniteLegale, Etablissement
from openfisca_france_entreprises.entities import UniteLegale, Etablissement


class apet(Variable):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from openfisca_core.model_api import *

# Import the Entities specifically defined for this tax and benefit system
from openfisca_france_firms.entities import UniteLegale, Etablissement
from openfisca_france_entreprises.entities import UniteLegale, Etablissement


class apen(Enum):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class charges_ex_operations_gestion(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class achats_marchandises(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class dotations_financieres_ar(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class benefice_attribue(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class produits_ex_operations_gestion(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class ventes_marchandises_fr(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class produits_participations(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class produits_nets_partiels_operations_lt(Variable):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from openfisca_core.model_api import *
from openfisca_core.periods import MONTH, YEAR
from openfisca_core.variables import Variable
from openfisca_france_firms.entities import UniteLegale, Etablissement # noqa F401
from openfisca_france_entreprises.entities import UniteLegale, Etablissement # noqa F401


class resultat_exploitation(Variable):
Expand Down
Loading

0 comments on commit a6bb676

Please sign in to comment.