File tree Expand file tree Collapse file tree 5 files changed +43
-44
lines changed Expand file tree Collapse file tree 5 files changed +43
-44
lines changed Original file line number Diff line number Diff line change 15
15
- name : Checkout
16
16
uses : actions/checkout@v4
17
17
- name : Start containers
18
- run : docker- compose -f "docker-compose-test.yaml" up -d --build
18
+ run : docker compose -f "docker-compose-test.yaml" up -d --build
19
19
- name : Run django entrypoint
20
20
run : docker exec django4importer /bin/sh -c "sh /usr/src/importer/entrypoint_test.sh"
21
21
- name : Run geonode-importer tests
34
34
path : python-coverage-comment-action.txt
35
35
- name : Stop containers
36
36
if : always()
37
- run : docker- compose -f "docker-compose-test.yaml" down
37
+ run : docker compose -f "docker-compose-test.yaml" down
Original file line number Diff line number Diff line change @@ -34,44 +34,7 @@ def run_setup_hooks(*args, **kwargs):
34
34
if import_string (module_path )().supported_file_extension_config
35
35
]
36
36
# injecting the new config required for FE
37
- supported_type = [
38
- {
39
- "id" : "xml" ,
40
- "label" : "XML Metadata File" ,
41
- "format" : "metadata" ,
42
- "ext" : ["xml" ],
43
- "mimeType" : ["application/json" ],
44
- "needsFiles" : [
45
- "shp" ,
46
- "prj" ,
47
- "dbf" ,
48
- "shx" ,
49
- "csv" ,
50
- "tiff" ,
51
- "zip" ,
52
- "sld" ,
53
- "geojson" ,
54
- ],
55
- },
56
- {
57
- "id" : "sld" ,
58
- "label" : "Styled Layer Descriptor (SLD)" ,
59
- "format" : "metadata" ,
60
- "ext" : ["sld" ],
61
- "mimeType" : ["application/json" ],
62
- "needsFiles" : [
63
- "shp" ,
64
- "prj" ,
65
- "dbf" ,
66
- "shx" ,
67
- "csv" ,
68
- "tiff" ,
69
- "zip" ,
70
- "xml" ,
71
- "geojson" ,
72
- ],
73
- },
74
- ]
37
+ supported_type = []
75
38
supported_type .extend (_available_settings )
76
39
if not getattr (settings , "ADDITIONAL_DATASET_FILE_TYPES" , None ):
77
40
setattr (settings , "ADDITIONAL_DATASET_FILE_TYPES" , supported_type )
Original file line number Diff line number Diff line change @@ -35,10 +35,6 @@ def has_serializer(data) -> bool:
35
35
return MetadataFileSerializer
36
36
return False
37
37
38
- @property
39
- def supported_file_extension_config (self ):
40
- return {}
41
-
42
38
@staticmethod
43
39
def extract_params_from_data (_data , action = None ):
44
40
"""
Original file line number Diff line number Diff line change @@ -13,6 +13,26 @@ class SLDFileHandler(MetadataFileHandler):
13
13
Handler to import SLD files into GeoNode data db
14
14
It must provide the task_lists required to comple the upload
15
15
"""
16
+ @property
17
+ def supported_file_extension_config (self ):
18
+ return {
19
+ "id" : "sld" ,
20
+ "label" : "Styled Layer Descriptor (SLD)" ,
21
+ "format" : "metadata" ,
22
+ "ext" : ["sld" ],
23
+ "mimeType" : ["application/json" ],
24
+ "needsFiles" : [
25
+ "shp" ,
26
+ "prj" ,
27
+ "dbf" ,
28
+ "shx" ,
29
+ "csv" ,
30
+ "tiff" ,
31
+ "zip" ,
32
+ "xml" ,
33
+ "geojson" ,
34
+ ],
35
+ }
16
36
17
37
@staticmethod
18
38
def can_handle (_data ) -> bool :
Original file line number Diff line number Diff line change @@ -13,6 +13,26 @@ class XMLFileHandler(MetadataFileHandler):
13
13
Handler to import XML files into GeoNode data db
14
14
It must provide the task_lists required to comple the upload
15
15
"""
16
+ @property
17
+ def supported_file_extension_config (self ):
18
+ return {
19
+ "id" : "xml" ,
20
+ "label" : "XML Metadata File" ,
21
+ "format" : "metadata" ,
22
+ "ext" : ["xml" ],
23
+ "mimeType" : ["application/json" ],
24
+ "needsFiles" : [
25
+ "shp" ,
26
+ "prj" ,
27
+ "dbf" ,
28
+ "shx" ,
29
+ "csv" ,
30
+ "tiff" ,
31
+ "zip" ,
32
+ "sld" ,
33
+ "geojson" ,
34
+ ],
35
+ }
16
36
17
37
@staticmethod
18
38
def can_handle (_data ) -> bool :
You can’t perform that action at this time.
0 commit comments