diff --git a/yaltik_dsl/Makefile b/yaltik_dsl/Makefile new file mode 100644 index 0000000..bec2191 --- /dev/null +++ b/yaltik_dsl/Makefile @@ -0,0 +1,9 @@ +.PHONY: clean +clean: + find . -name '*.pyc' -delete + find . -name '__pycache__' -delete + +.PHONY: test +test: + python2 tests/test_xml_base.py + python2 tests/test_odoo.py diff --git a/yaltik_dsl/__init__.py b/yaltik_dsl/__init__.py index ee86a92..7eb5290 100644 --- a/yaltik_dsl/__init__.py +++ b/yaltik_dsl/__init__.py @@ -15,4 +15,4 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from . import odoo_dsl +from . import src diff --git a/yaltik_dsl/src/__init__.py b/yaltik_dsl/src/__init__.py new file mode 100644 index 0000000..b0fa7d4 --- /dev/null +++ b/yaltik_dsl/src/__init__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# Copyright 2020 Fabien Bourgeois +# +# This program 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. +# +# This program 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 this program. If not, see . + +from . import odoo_dsl diff --git a/yaltik_dsl/odoo_dsl.py b/yaltik_dsl/src/odoo_dsl.py similarity index 99% rename from yaltik_dsl/odoo_dsl.py rename to yaltik_dsl/src/odoo_dsl.py index f47217b..24b4123 100644 --- a/yaltik_dsl/odoo_dsl.py +++ b/yaltik_dsl/src/odoo_dsl.py @@ -17,7 +17,7 @@ """ Odoo XML DSL """ -from xml_base import xmlroot, xmln +from .xml_base import xmlroot, xmln # XML helpers functions and macros diff --git a/yaltik_dsl/xml_base.py b/yaltik_dsl/src/xml_base.py similarity index 100% rename from yaltik_dsl/xml_base.py rename to yaltik_dsl/src/xml_base.py diff --git a/yaltik_dsl/test_odoo.py b/yaltik_dsl/tests/test_odoo.py similarity index 99% rename from yaltik_dsl/test_odoo.py rename to yaltik_dsl/tests/test_odoo.py index 831f15b..cc2ad07 100644 --- a/yaltik_dsl/test_odoo.py +++ b/yaltik_dsl/tests/test_odoo.py @@ -19,8 +19,8 @@ import unittest import xml.etree.ElementTree as ET -from xml_base import XMLDictElement -import odoo_dsl as od +from src.xml_base import XMLDictElement +import src.odoo_dsl as od class TestOdooBase(unittest.TestCase): """ Odoo Helpers tests """ diff --git a/yaltik_dsl/test_xml_base.py b/yaltik_dsl/tests/test_xml_base.py similarity index 98% rename from yaltik_dsl/test_xml_base.py rename to yaltik_dsl/tests/test_xml_base.py index dbfd10b..d605ad9 100644 --- a/yaltik_dsl/test_xml_base.py +++ b/yaltik_dsl/tests/test_xml_base.py @@ -21,7 +21,7 @@ from functools import partial import unittest import xml.etree.ElementTree as ET from os import unlink -from xml_base import xmln, xmlroot, xmlchild, xml_write +from src.xml_base import xmln, xmlroot, xmlchild, xml_write class TestXMLBase(unittest.TestCase):