Skip to content

Commit

Permalink
Fix project settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauko Quiroga committed Apr 28, 2019
1 parent ddc6d69 commit 65d84b3
Show file tree
Hide file tree
Showing 44 changed files with 75 additions and 104 deletions.
31 changes: 19 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ jobs:
command: |
mkdir -p /tmp/venv/openfisca-france-data
python -m venv /tmp/venv/openfisca-france-data
echo "source /tmp/venv/openfisca-france-data/bin/activate" >> $BASH_ENV
- run:
name: Activate virtualenv
command: echo "source /tmp/venv/openfisca-france-data/bin/activate" >> $BASH_ENV

- run:
name: Install dependencies
Expand Down Expand Up @@ -75,11 +78,14 @@ jobs:
- restore_cache:
key: v1-py3-venv-{{ .Branch }}-{{ checksum "setup.py" }}

- run:
name: Activate virtualenv
command: echo "source /tmp/venv/openfisca-france-data/bin/activate" >> $BASH_ENV

- run:
name: Submit coverage to Coveralls
command: |
source /tmp/venv/openfisca-france-data/bin/activate
pip install coveralls
pip install --upgrade coveralls
coveralls
- save_cache:
Expand All @@ -102,33 +108,34 @@ jobs:
key: v1-py3-venv-{{ .Branch }}-{{ checksum "setup.py" }}

- run:
name: Check for functional changes
command: if ! .circleci/has-functional-changes.sh ; then circleci step halt ; fi
name: Activate virtualenv
command: echo "source /tmp/venv/openfisca-france-data/bin/activate" >> $BASH_ENV

- run:
name: Upload a Python package to Pypi
command: |
source /tmp/venv/openfisca-france-data/bin/activate
.circleci/publish-python-package.sh
name: Check for functional changes
command: if ! .circleci/has-functional-changes.sh ; then circleci step halt ; fi

- run:
name: Publish a git tag
command: .circleci/publish-git-tag.sh

- run:
name: Upload a Python package to Pypi
command: .circleci/publish-python-package.sh

workflows:
version: 2
build:
jobs:
- run_tests
- check_version
- run_tests
- submit_coverage:
requires:
- run_tests
- deploy:
requires:
# TODO: comment out once tests pass
# - run_tests
- check_version
- run_tests
filters:
branches:
# TODO: change once release/1.0.0 is integrated in master
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
recursive-include openfisca_france_data/parameters *
include CHANGELOG.md
include CONTRIBUTING.md
include LICENSE
include README.md
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ install:

clean:
rm -rf build dist
find . -name '*.mo' -exec rm \{\} \;
find . -name '*.pyc' -exec rm \{\} \;
find . -name '*.mo' | xargs rm -rf
find . -name '*.pyc' | xargs rm -rf
find . -name '__pycache__' | xargs rm -rf

check-syntax-errors:
python -m compileall -q .
Expand All @@ -31,7 +32,7 @@ format-style:
autopep8 `git ls-files | grep "\.py$$"`

test: clean check-syntax-errors
pytest --ignore=openfisca_france_data/tests/erfs_fpr/integration
pytest --ignore=tests/erfs_fpr/integration

test-local: clean check-syntax-errors
pytest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[OpenFisca](https://openfisca.org/doc/) is a versatile microsimulation libre software. Check the [online documentation](https://openfisca.org/doc/) for more details.

This package contains the France-Data module, allows you to work with French survey data (ERFS, ERFS-FPR, etc.) and [OpenFisca-France](https://github.com/openfisca/openfisca-france).
OpenFisca-France-Data is an [OpenFisca-France](https://github.com/openfisca/openfisca-france) module to work with French survey data (ERFS and ERFS-FPR).

## Environment

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion openfisca_france_data/surveys.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pandas as pd

from openfisca_core import periods, simulations # type: ignore
from openfisca_france_data.tests import base # type: ignore
from openfisca_france_data import base_survey as base # type: ignore
from openfisca_survey_manager.scenarios import AbstractSurveyScenario # type: ignore

log = logging.getLogger(__name__)
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
29 changes: 1 addition & 28 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
# Babel configuration

[compile_catalog]
domain = openfisca-france-data
directory = openfisca_france_data/i18n
statistics = true

[extract_messages]
add_comments = TRANSLATORS:
copyright_holder = OpenFisca Team
msgid-bugs-address = contact@openfisca.fr
output_file = openfisca_france_data/i18n/openfisca-france-data.pot
width = 80

[init_catalog]
domain = openfisca-france-data
input_file = openfisca_france_data/i18n/openfisca-france-data.pot
output_dir = openfisca_france_data/i18n

[update_catalog]
domain = openfisca-france-data
input_file = openfisca_france_data/i18n/openfisca-france-data.pot
output_dir = openfisca_france_data/i18n
previous = true

# Checks

; E128/133: We prefer hang-closing visual indents
; E251: We prefer `function(x = 1)` over `function(x=1)`
; E501: We do not enforce a maximum line length
Expand All @@ -42,5 +15,5 @@ in-place = true

[tool:pytest]
addopts = --showlocals --doctest-modules --disable-pytest-warnings
testpaths = openfisca_france_data/tests
testpaths = tests
python_files = **/*.py
89 changes: 38 additions & 51 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,65 +1,52 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-


"""OpenFisca -- a versatile microsimulation free software
OpenFisca includes a framework to simulate any tax and social system.
"""


from setuptools import setup, find_packages

with open('README.md') as file:
long_description = file.read()

classifiers = """\
Development Status :: 2 - Pre-Alpha
License :: OSI Approved :: GNU Affero General Public License v3
Operating System :: POSIX
Programming Language :: Python
Programming Language :: Python :: 3.7
Topic :: Scientific/Engineering :: Information Analysis
"""

doc_lines = __doc__.split('\n')

with open('LICENSE') as file:
license = file.read()

setup(
name = 'OpenFisca-France-Data',
version = '0.8.2',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.fr',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
description = doc_lines[0],
keywords = 'benefit microsimulation social tax',
license = 'http://www.fsf.org/licensing/licenses/agpl-3.0.html',
long_description = '\n'.join(doc_lines[2:]),
url = 'https://github.com/openfisca/openfisca-france-data',
data_files = [
# ('share/locale/fr/LC_MESSAGES', ['openfisca_france_data/i18n/fr/LC_MESSAGES/openfisca-france-data.mo']),
name = "OpenFisca-France-Data",
version = "0.8.2",
description = "OpenFisca-France module to work with French survey data (ERFS and ERFS-FPR)",
long_description = long_description,
author = "OpenFisca Team",
author_email = "contact@openfisca.fr",
url = "https://github.com/openfisca/openfisca-france-data",
license = license,
keywords = "tax benefit social survey data microsimulation",
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Topic :: Scientific/Engineering :: Information Analysis",
],
include_package_data = True,
extras_require = {
'test': [
'autopep8 >= 1.4.0, < 1.5.0',
'flake8 >= 3.7.0, < 3.8.0',
'mypy >= 0.670, < 1.0.0',
'pytest >= 4.3.0, < 5.0.0',
'pytest-cov >= 2.6.0, < 3.0.0',
],
},
python_requires = ">= 3.7",
install_requires = [
'multipledispatch >= 0.6.0, < 1.0.0',
'OpenFisca-France >= 34.0.0, < 35.0.0',
'OpenFisca-Survey-Manager[calmar] >= 0.11.0',
'pandas >= 0.20.3',
'tables', # Needed by pandas.HDFStore
'wquantiles >= 0.3' # To compute weighted quantiles
"multipledispatch >= 0.6.0, < 1.0.0",
"openfisca-core >= 25.2.2, < 30.0.0",
"openFisca-france >= 39.0.0, < 40.0.0",
"openFisca-survey-manager >= 0.19.1, < 1.0.0",
"numexpr == 2.6.8",
"pandas >= 0.20.3, < 1.0.0",
"tables >= 3.0.0, < 4.0.0", # Needed by pandas.HDFStore
"wquantiles >= 0.3.0, < 1.0.0" # To compute weighted quantiles
],
message_extractors = {
'openfisca_france_data': [
('**.py', 'python', None),
extras_require = {
"test": [
"autopep8 >= 1.4.0, < 1.5.0",
"flake8 >= 3.7.0, < 3.8.0",
"ipython >= 7.5.0, < 8.0.0",
"mypy >= 0.670, < 1.0.0",
"pytest >= 4.3.0, < 5.0.0",
"pytest-cov >= 2.6.0, < 3.0.0",
],
},
packages = find_packages(),
zip_safe = False,
packages = find_packages(exclude = ("docs", "tests")),
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np


from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey
from openfisca_france_data.erfs_fpr.get_survey_scenario import get_survey_scenario
from openfisca_france_data.aggregates import Aggregates

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np


from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey
from openfisca_france_data.erfs_fpr.get_survey_scenario import get_survey_scenario
from openfisca_france_data.aggregates import Aggregates

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from openfisca_core.model_api import *
from openfisca_france.entities import Famille, Individu
from openfisca_france_data.erfs_fpr.scenario import ErfsFprSurveyScenario
from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey


log = logging.getLogger(__name__)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-


from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey


def test_reform_combination():
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest

from openfisca_france_data.erfs_fpr.get_survey_scenario import get_survey_scenario
from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey


@pytest.mark.skip(reason = "configparser.NoOptionError: No option 'openfisca_erfs_fpr' in section: 'collections'")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from openfisca_france_data.erfs_fpr.get_survey_scenario import get_survey_scenario as erfs_fpr_get_survey_scenario
from openfisca_france_data.erfs.scenario import ErfsSurveyScenario
from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey


@pytest.mark.skip(reason = "configparser.NoOptionError: No option 'openfisca_erfs_fpr' in section: 'collections'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from openfisca_france_data.erfs_fpr.scenario import ErfsFprSurveyScenario
from openfisca_france_data.erfs_fpr.get_survey_scenario import get_survey_scenario

from openfisca_france_data.tests import base as base_survey
from openfisca_france_data import base_survey


@pytest.fixture
Expand Down

0 comments on commit 65d84b3

Please sign in to comment.