diff --git a/parkkihubi/settings.py b/parkkihubi/settings.py index eb4037d9..4a39f88b 100644 --- a/parkkihubi/settings.py +++ b/parkkihubi/settings.py @@ -80,7 +80,8 @@ 'parkkihubi', 'parkings', 'sanitized_dump', -] +] + env.list("EXTRA_INSTALLED_APPS", default=['parkkihubi_hel']) + if DEBUG and TIER == 'dev': # shell_plus and other goodies diff --git a/parkkihubi_hel/__init__.py b/parkkihubi_hel/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/parkings/fixtures/parking_terminals.json b/parkkihubi_hel/fixtures/parking_terminals.json similarity index 100% rename from parkings/fixtures/parking_terminals.json rename to parkkihubi_hel/fixtures/parking_terminals.json diff --git a/parkings/importers/__init__.py b/parkkihubi_hel/importers/__init__.py similarity index 100% rename from parkings/importers/__init__.py rename to parkkihubi_hel/importers/__init__.py diff --git a/parkings/importers/parking_areas.py b/parkkihubi_hel/importers/parking_areas.py similarity index 98% rename from parkings/importers/parking_areas.py rename to parkkihubi_hel/importers/parking_areas.py index 675b0cf8..189916ee 100644 --- a/parkings/importers/parking_areas.py +++ b/parkkihubi_hel/importers/parking_areas.py @@ -119,7 +119,7 @@ def _parse_member(self, member): dates start reflecting the individual members update time it would be a good way to see if a member needs updating or not. - There is an example file parkings/tests/parking_area_importer_data.xml + There is an example file tests/parking_area_importer_data.xml :param member: The member XML element. :returns: A dict containing the fields origin_id, capacity_estimate diff --git a/parkings/importers/payment_zones.py b/parkkihubi_hel/importers/payment_zones.py similarity index 100% rename from parkings/importers/payment_zones.py rename to parkkihubi_hel/importers/payment_zones.py diff --git a/parkings/importers/permit_areas.py b/parkkihubi_hel/importers/permit_areas.py similarity index 100% rename from parkings/importers/permit_areas.py rename to parkkihubi_hel/importers/permit_areas.py diff --git a/parkings/importers/regions.py b/parkkihubi_hel/importers/regions.py similarity index 97% rename from parkings/importers/regions.py rename to parkkihubi_hel/importers/regions.py index 450e6dce..24d2b433 100644 --- a/parkings/importers/regions.py +++ b/parkkihubi_hel/importers/regions.py @@ -3,7 +3,7 @@ from django.contrib.gis.gdal import DataSource from django.contrib.gis.utils import LayerMapping -from ..models import Region +from parkings.models import Region class ShapeFileToRegionImporter(object): diff --git a/parkings/importers/wfs_importer.py b/parkkihubi_hel/importers/wfs_importer.py similarity index 100% rename from parkings/importers/wfs_importer.py rename to parkkihubi_hel/importers/wfs_importer.py diff --git a/parkkihubi_hel/management/__init__.py b/parkkihubi_hel/management/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/parkkihubi_hel/management/commands/__init__.py b/parkkihubi_hel/management/commands/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/parkings/management/commands/import_parking_areas.py b/parkkihubi_hel/management/commands/import_parking_areas.py similarity index 92% rename from parkings/management/commands/import_parking_areas.py rename to parkkihubi_hel/management/commands/import_parking_areas.py index 8387fca1..1ca19af0 100755 --- a/parkings/management/commands/import_parking_areas.py +++ b/parkkihubi_hel/management/commands/import_parking_areas.py @@ -1,6 +1,6 @@ from django.core.management.base import BaseCommand -from parkings.importers import ParkingAreaImporter +from ...importers import ParkingAreaImporter class Command(BaseCommand): diff --git a/parkings/management/commands/import_payment_zones.py b/parkkihubi_hel/management/commands/import_payment_zones.py similarity index 82% rename from parkings/management/commands/import_payment_zones.py rename to parkkihubi_hel/management/commands/import_payment_zones.py index 44a1415c..7d52e93f 100644 --- a/parkings/management/commands/import_payment_zones.py +++ b/parkkihubi_hel/management/commands/import_payment_zones.py @@ -1,6 +1,6 @@ from django.core.management.base import BaseCommand -from parkings.importers import PaymentZoneImporter +from ...importers import PaymentZoneImporter class Command(BaseCommand): diff --git a/parkings/management/commands/import_permit_areas.py b/parkkihubi_hel/management/commands/import_permit_areas.py similarity index 82% rename from parkings/management/commands/import_permit_areas.py rename to parkkihubi_hel/management/commands/import_permit_areas.py index 0318efcc..d77ef9ae 100644 --- a/parkings/management/commands/import_permit_areas.py +++ b/parkkihubi_hel/management/commands/import_permit_areas.py @@ -1,6 +1,6 @@ from django.core.management.base import BaseCommand -from parkings.importers import PermitAreaImporter +from ...importers import PermitAreaImporter class Command(BaseCommand): diff --git a/parkings/management/commands/import_regions.py b/parkkihubi_hel/management/commands/import_regions.py similarity index 100% rename from parkings/management/commands/import_regions.py rename to parkkihubi_hel/management/commands/import_regions.py diff --git a/parkkihubi_hel/tests/__init__.py b/parkkihubi_hel/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/parkings/tests/parking_area_importer_data.xml b/parkkihubi_hel/tests/parking_area_importer_data.xml similarity index 100% rename from parkings/tests/parking_area_importer_data.xml rename to parkkihubi_hel/tests/parking_area_importer_data.xml diff --git a/parkings/tests/payment_zone_importer_data.xml b/parkkihubi_hel/tests/payment_zone_importer_data.xml similarity index 100% rename from parkings/tests/payment_zone_importer_data.xml rename to parkkihubi_hel/tests/payment_zone_importer_data.xml diff --git a/parkings/tests/permit_area_importer_data.xml b/parkkihubi_hel/tests/permit_area_importer_data.xml similarity index 100% rename from parkings/tests/permit_area_importer_data.xml rename to parkkihubi_hel/tests/permit_area_importer_data.xml diff --git a/parkings/tests/request_mocking.py b/parkkihubi_hel/tests/request_mocking.py similarity index 100% rename from parkings/tests/request_mocking.py rename to parkkihubi_hel/tests/request_mocking.py diff --git a/parkings/tests/test-features.dbf b/parkkihubi_hel/tests/test-features.dbf similarity index 100% rename from parkings/tests/test-features.dbf rename to parkkihubi_hel/tests/test-features.dbf diff --git a/parkings/tests/test-features.prj b/parkkihubi_hel/tests/test-features.prj similarity index 100% rename from parkings/tests/test-features.prj rename to parkkihubi_hel/tests/test-features.prj diff --git a/parkings/tests/test-features.shp b/parkkihubi_hel/tests/test-features.shp similarity index 100% rename from parkings/tests/test-features.shp rename to parkkihubi_hel/tests/test-features.shp diff --git a/parkings/tests/test-features.shx b/parkkihubi_hel/tests/test-features.shx similarity index 100% rename from parkings/tests/test-features.shx rename to parkkihubi_hel/tests/test-features.shx diff --git a/parkings/tests/test_importing_management_commands.py b/parkkihubi_hel/tests/test_importing_management_commands.py similarity index 94% rename from parkings/tests/test_importing_management_commands.py rename to parkkihubi_hel/tests/test_importing_management_commands.py index 7ddd592b..a4813137 100644 --- a/parkings/tests/test_importing_management_commands.py +++ b/parkkihubi_hel/tests/test_importing_management_commands.py @@ -1,10 +1,10 @@ import pytest from django.core.management import call_command -from parkings.management.commands import ( - import_parking_areas, import_payment_zones, import_permit_areas) from parkings.models import ParkingArea, PaymentZone, PermitArea +from ..management.commands import ( + import_parking_areas, import_payment_zones, import_permit_areas) from .request_mocking import mocked_requests diff --git a/parkings/tests/test_parking_area_importer.py b/parkkihubi_hel/tests/test_parking_area_importer.py similarity index 92% rename from parkings/tests/test_parking_area_importer.py rename to parkkihubi_hel/tests/test_parking_area_importer.py index cb10111a..8caa153f 100644 --- a/parkings/tests/test_parking_area_importer.py +++ b/parkkihubi_hel/tests/test_parking_area_importer.py @@ -1,6 +1,6 @@ import os -from parkings.importers import ParkingAreaImporter +from ..importers import ParkingAreaImporter mydir = os.path.dirname(__file__) sample_xml_file = os.path.join(mydir, 'parking_area_importer_data.xml') diff --git a/parkings/tests/test_payment_zone_importer.py b/parkkihubi_hel/tests/test_payment_zone_importer.py similarity index 92% rename from parkings/tests/test_payment_zone_importer.py rename to parkkihubi_hel/tests/test_payment_zone_importer.py index 97e4f93b..0049d781 100644 --- a/parkings/tests/test_payment_zone_importer.py +++ b/parkkihubi_hel/tests/test_payment_zone_importer.py @@ -1,6 +1,6 @@ import os -from parkings.importers import PaymentZoneImporter +from ..importers import PaymentZoneImporter mydir = os.path.dirname(__file__) diff --git a/parkings/tests/test_permit_area_importer.py b/parkkihubi_hel/tests/test_permit_area_importer.py similarity index 92% rename from parkings/tests/test_permit_area_importer.py rename to parkkihubi_hel/tests/test_permit_area_importer.py index 606c21cf..968423fe 100644 --- a/parkings/tests/test_permit_area_importer.py +++ b/parkkihubi_hel/tests/test_permit_area_importer.py @@ -1,6 +1,6 @@ import os -from parkings.importers import PermitAreaImporter +from ..importers import PermitAreaImporter mydir = os.path.dirname(__file__) diff --git a/parkings/tests/test_region_importer.py b/parkkihubi_hel/tests/test_region_importer.py similarity index 94% rename from parkings/tests/test_region_importer.py rename to parkkihubi_hel/tests/test_region_importer.py index 4bd13136..0f979d73 100644 --- a/parkings/tests/test_region_importer.py +++ b/parkkihubi_hel/tests/test_region_importer.py @@ -2,11 +2,11 @@ import pytest -from parkings.importers.regions import ShapeFileToRegionImporter -from parkings.management.commands import import_regions from parkings.models import Region +from parkings.tests.utils import approx, call_mgmt_cmd_with_output -from .utils import approx, call_mgmt_cmd_with_output +from ..importers.regions import ShapeFileToRegionImporter +from ..management.commands import import_regions directory = os.path.abspath(os.path.dirname(__file__)) diff --git a/parkings/tests/wfs_capabilities_response.xml b/parkkihubi_hel/tests/wfs_capabilities_response.xml similarity index 100% rename from parkings/tests/wfs_capabilities_response.xml rename to parkkihubi_hel/tests/wfs_capabilities_response.xml diff --git a/setup.cfg b/setup.cfg index 92162dc5..deeeae38 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ filterwarnings = [isort] default_section=THIRDPARTY -known_first_party=parkkihubi,parkings +known_first_party=parkkihubi,parkings,parkkihubi_hel line_length=79 multi_line_output=4 not_skip=__init__.py