From e64ea7b3d1a1d07e01dd78716e838f9651c12dda Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 19 May 2017 00:05:23 +0200 Subject: [PATCH] Move licence in setup.py, fix modelines, module and package doctrings. --- accountant/__init__.py | 16 ++-------------- accountant/models/__init__.py | 16 ++-------------- accountant/models/accounts.py | 16 ++-------------- accountant/models/operations.py | 16 ++-------------- accountant/models/scheduled_operations.py | 16 ++-------------- accountant/models/users.py | 17 ++--------------- accountant/run.py | 2 ++ accountant/views/__init__.py | 16 ++-------------- accountant/views/accounts.py | 16 ++-------------- accountant/views/operations.py | 16 ++-------------- accountant/views/scheduled_operations.py | 16 ++-------------- accountant/views/users.py | 17 ++--------------- setup.py | 12 +++++++++--- 13 files changed, 33 insertions(+), 159 deletions(-) diff --git a/accountant/__init__.py b/accountant/__init__.py index 128a225..6de668f 100644 --- a/accountant/__init__.py +++ b/accountant/__init__.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""The accountant package.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" import click from flask import Flask diff --git a/accountant/models/__init__.py b/accountant/models/__init__.py index 9a4debc..7ce8b46 100644 --- a/accountant/models/__init__.py +++ b/accountant/models/__init__.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Package containing models.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" import pkgutil from flask_sqlalchemy import SQLAlchemy diff --git a/accountant/models/accounts.py b/accountant/models/accounts.py index 42517e5..b592f5f 100644 --- a/accountant/models/accounts.py +++ b/accountant/models/accounts.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing account related models.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" # pylint: disable=no-member,too-few-public-methods from . import db diff --git a/accountant/models/operations.py b/accountant/models/operations.py index e85ae92..ce6cbd9 100644 --- a/accountant/models/operations.py +++ b/accountant/models/operations.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing operation related models.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" from datetime import date import arrow diff --git a/accountant/models/scheduled_operations.py b/accountant/models/scheduled_operations.py index 3528f41..d4bd8f7 100644 --- a/accountant/models/scheduled_operations.py +++ b/accountant/models/scheduled_operations.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing scheduled operation related models.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" from calendar import monthrange import arrow diff --git a/accountant/models/users.py b/accountant/models/users.py index a41b71f..5b180f7 100644 --- a/accountant/models/users.py +++ b/accountant/models/users.py @@ -1,20 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing user related models.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" # vim: set tw=80 ts=4 sw=4 sts=4: + from passlib.hash import sha256_crypt as crypt from itsdangerous import (URLSafeTimedSerializer as Serializer, BadSignature, SignatureExpired) diff --git a/accountant/run.py b/accountant/run.py index 4383b07..d1a4205 100644 --- a/accountant/run.py +++ b/accountant/run.py @@ -1,5 +1,7 @@ """Accountant runner.""" +# vim: set tw=80 ts=4 sw=4 sts=4: + from os import path, getcwd import click diff --git a/accountant/views/__init__.py b/accountant/views/__init__.py index c3b9b6e..34e2550 100644 --- a/accountant/views/__init__.py +++ b/accountant/views/__init__.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Package containing views.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" from flask_cors import CORS from flask_restplus import Api diff --git a/accountant/views/accounts.py b/accountant/views/accounts.py index d774eb2..a355ea6 100644 --- a/accountant/views/accounts.py +++ b/accountant/views/accounts.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing account related views.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" import dateutil.parser from flask_restplus import Namespace, Resource, fields diff --git a/accountant/views/operations.py b/accountant/views/operations.py index 7fc50fc..e1e97bf 100644 --- a/accountant/views/operations.py +++ b/accountant/views/operations.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing operation related views.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" import dateutil.parser from flask_restplus import Namespace, Resource, fields diff --git a/accountant/views/scheduled_operations.py b/accountant/views/scheduled_operations.py index 0d3e078..07cbf81 100644 --- a/accountant/views/scheduled_operations.py +++ b/accountant/views/scheduled_operations.py @@ -1,19 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing scheduled operation related views.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +# vim: set tw=80 ts=4 sw=4 sts=4: - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" from flask_restplus import Namespace, Resource, fields from sqlalchemy import true diff --git a/accountant/views/users.py b/accountant/views/users.py index f63c165..bc8cbf1 100644 --- a/accountant/views/users.py +++ b/accountant/views/users.py @@ -1,20 +1,7 @@ -""" - This file is part of Accountant. +"""Module containing user related views.""" - Accountant is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Accountant is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with Accountant. If not, see . -""" # vim: set tw=80 ts=4 sw=4 sts=4: + from functools import wraps import arrow diff --git a/setup.py b/setup.py index 0852653..dd2b2ce 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,18 @@ -"Distribution setup." +"""Accountant distribution setup.""" + +# vim: set tw=80 ts=4 sw=4 sts=4: + from setuptools import setup, find_packages setup( name='Accountant', version='0.0.1', + licence='AGPL', + author='Alexis Lahouze', + author_email='alexis@lahouze.org', + long_description=__doc__, + packages=find_packages(), include_package_data=True, @@ -35,6 +43,4 @@ setup( 'pytest-cov', 'pytest-mock', ], - author='Alexis Lahouze', - author_email='alexis@lahouze.org', )