Skip to content

Commit

Permalink
Migrate setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Sep 27, 2024
1 parent f2575e8 commit 2878a87
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 37 deletions.
23 changes: 15 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Flake8
; 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
; F403/405: We ignore * imports
; W503/504: We break lines before binary operators (Knuth's style)

[flake8]
hang-closing = true
; E128 continuation line under-indented for visual indent
; E251 unexpected spaces around keyword / parameter equals
; F403:'from openfisca_tunisia.model.base import *' used; unable to detect undefined names
ignore = E128, E251, F403, F405
;max-complexity = 10
max-line-length = 120
ignore = E128,E251,F403,F405,E501,W503
docstring-quotes = single
inline-quotes = single
multiline-quotes = single

[pep8]
hang-closing = true
ignore = E128,E251,F403,F405,E501,W503
in-place = true

[tool:pytest]
addopts = --showlocals --doctest-modules --disable-pytest-warnings
addopts = --showlocals --exitfirst --doctest-modules --disable-pytest-warnings
testpaths = tests
python_files = **/*.py
68 changes: 39 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
#! /usr/bin/env python

"""Tunisia specific model for OpenFisca -- a versatile microsimulation free software"""


from setuptools import setup, find_packages


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

doc_lines = __doc__.split('\n')
from setuptools import setup, find_namespace_packages
from pathlib import Path

# Read the contents of our README file for PyPi
this_directory = Path(__file__).parent
long_description = (this_directory / 'README.md').read_text()

setup(
name = 'OpenFisca-Tunisia',
version = '0.33.3',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
description = doc_lines[0],
keywords = 'benefit microsimulation social tax tunisia',
classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering :: Information Analysis',
],
description = 'Tunisia tax and benefit system for OpenFisca',
keywords = 'benefit tunisia microsimulation social tax',
license = 'http://www.fsf.org/licensing/licenses/agpl-3.0.html',
long_description = '\n'.join(doc_lines[2:]),
license_files = ('LICENSE.AGPL.txt',),
url = 'https://github.com/openfisca/openfisca-tunisia',
long_description=long_description,
long_description_content_type='text/markdown',

data_files = [
('share/openfisca/openfisca-tunisia', ['CHANGELOG.md', 'LICENSE.AGPL.txt', 'README.md']),
'share/openfisca/openfisca-tunisia',
['CHANGELOG.md', 'README.md'],
],
extras_require = dict(
tests = [
'pytest >= 4.0.0, < 8.0.0',
],
notebook = [
extras_require = {
'dev': [
'autopep8 >=2.0.2, <3.0',
'flake8 >=6.0.0, <7.0.0',
'flake8-print >=5.0.0, <6.0.0',
'flake8-quotes >=3.3.2',
'pytest >=7.2.2, <8.0',
'scipy >=1.10.1, <2.0', # Only used to test de_net_a_brut reform
'requests >=2.28.2, <3.0',
'yamllint >=1.30.0, <2.0'
],
'notebook' : [
'ipykernel >= 4.8',
'jupyter-client >= 5.2',
'matplotlib >= 2.2',
'nbconvert >= 5.3',
'nbformat >= 4.4',
'pandas >= 0.22.0',
],
survey = [
'survey' : [
'OpenFisca-Survey-Manager >=0.34,<1.0',
]
),
},
include_package_data = True, # Will read MANIFEST.in
install_requires = [
'OpenFisca-Core >=40.0.1, <42',
'PyYAML >= 3.10',
'scipy >= 0.12',
],
message_extractors = {'openfisca_tunisia': [
('**.py', 'python', None),
]},
packages = find_packages(exclude=['tests*']),
packages = find_namespace_packages(exclude = [
'openfisca_tunisia.tests*',
]),
)

0 comments on commit 2878a87

Please sign in to comment.