-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-poetry
- Loading branch information
Showing
15 changed files
with
941 additions
and
1,255 deletions.
There are no files selected for viewing
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,16 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[Makefile] | ||
indent_size = 4 | ||
indent_style = tab | ||
|
||
[*.{py,pyi,rst,toml}] | ||
indent_size = 4 |
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
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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
recursive-include openfisca_extension_template * | ||
graft openfisca_extension_template | ||
global-exclude *~ *.py[cod] *.so |
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 |
---|---|---|
@@ -1,33 +1,38 @@ | ||
all: test | ||
|
||
uninstall: | ||
pip freeze | grep -v "^-e" | sed "s/@.*//" | xargs pip uninstall -y | ||
@pip freeze | grep -v "^-e" | sed "s/@.*//" | xargs pip uninstall -y | ||
|
||
clean: | ||
rm -rf build dist | ||
find . -name '*.pyc' -exec rm \{\} \; | ||
@rm -rf build dist | ||
@find . -name '*.pyc' -exec rm \{\} \; | ||
@find . -type d -name '__pycache__' -exec rm -r {} + | ||
|
||
install: | ||
@# Install OpenFisca-Extension-Template for development. | ||
@# The editable version of OpenFisca-Extension-Template allows contributors | ||
@# to test as they code. | ||
pip install --upgrade pip | ||
poetry install --sync | ||
|
||
check-syntax-errors: | ||
python -m compileall -q . | ||
@pip install --upgrade pip | ||
@poetry install --sync | ||
|
||
format: | ||
@# Do not analyse .gitignored files. | ||
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764. | ||
poetry run autopep8 `git ls-files | grep "\.py$$"` | ||
@poetry run ruff format `git ls-files | grep "\.py$$"` | ||
@poetry run isort `git ls-files | grep "\.py$$"` | ||
@poetry run black `git ls-files | grep "\.py$$"` | ||
@poetry run pyproject-fmt pyproject.toml | ||
|
||
lint: clean check-syntax-errors | ||
lint: clean | ||
@# Do not analyse .gitignored files. | ||
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764. | ||
poetry run flake8 `git ls-files | grep "\.py$$"` | ||
poetry run pylint `git ls-files | grep "\.py$$"` | ||
poetry run yamllint `git ls-files | grep "\.yaml$$"` | ||
@poetry run ruff check `git ls-files | grep "\.py$$"` | ||
@poetry run isort --check `git ls-files | grep "\.py$$"` | ||
@poetry run black --check `git ls-files | grep "\.py$$"` | ||
|
||
test: clean check-syntax-errors | ||
openfisca test openfisca_extension_template/tests --country-package openfisca_country_template --extensions openfisca_extension_template | ||
test: clean lint | ||
@PYTEST_ADDOPTS="--import-mode importlib" \ | ||
openfisca test \ | ||
--country-package=openfisca_country_template \ | ||
--extensions=openfisca_extension_template \ | ||
openfisca_extension_template/tests |
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
""" | ||
This package defines a country package extension. | ||
"""This package defines a country package extension. | ||
Extensions allow you to define new variables or parameters for a tax and | ||
benefit system, while keeping their code separated from the main country | ||
package. | ||
They are for instance used to code local taxes and benefits. | ||
See https://openfisca.org/doc/contribute/extensions.html | ||
See: | ||
https://openfisca.org/doc/contribute/extensions.html | ||
""" |
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.