Skip to content

Commit 2c44d61

Browse files
authored
Merge pull request #268 from mviewer/develop
Version 4
2 parents 29cce1b + e6b914b commit 2c44d61

File tree

130 files changed

+82617
-4655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+82617
-4655
lines changed

.github/workflows/build.yml

+5-14
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
branches:
44
- master
55
- develop
6-
76
jobs:
87
build_images:
98
timeout-minutes: 10
@@ -14,27 +13,21 @@ jobs:
1413
- name: "Set up Python"
1514
uses: actions/setup-python@v1
1615
with:
17-
python-version: '3.8'
16+
python-version: '3.9'
1817

19-
- name: "python backend - Running unit tests"
18+
- name: "python backend - install requirements"
2019
working-directory: srv/python
2120
run: |
2221
pip install -r requirements.txt -r dev-requirements.txt
2322
pip install -e .
24-
pytest mviewerstudio_backend/test.py
25-
26-
- name: "python backend - Typechecking"
27-
working-directory: srv/python
28-
run: |
29-
mypy --ignore-missing mviewerstudio_backend
3023
3124
- name: "python backend - Checking format"
3225
working-directory: srv/python
3326
run: |
3427
black . --check
3528
3629
- name: "Calculating image tag"
37-
if: github.repository == 'geobretagne/mviewerstudio'
30+
if: github.repository == 'mviewer/mviewerstudio'
3831
id: version
3932
run: |
4033
if [[ $GITHUB_REF == 'refs/heads/master' ]]; then
@@ -54,19 +47,17 @@ jobs:
5447
5548
- name: "Log in to docker hub"
5649
uses: azure/docker-login@v1
57-
if: github.repository == 'geobretagne/mviewerstudio'
50+
if: github.repository == 'mviewer/mviewerstudio'
5851
with:
5952
username: '${{ secrets.DOCKER_HUB_USERNAME }}'
6053
password: '${{ secrets.DOCKER_HUB_PASSWORD }}'
6154

6255
- name: "Retag / push the docker images (not stable)"
63-
if: github.repository == 'geobretagne/mviewerstudio'
56+
if: github.repository == 'mviewer/mviewerstudio'
6457
run: |
6558
docker tag mviewer/mviewerstudio:python-latest mviewer/mviewerstudio:python-${{ steps.version.outputs.VERSION }}
6659
docker tag mviewer/mviewerstudio:php-latest mviewer/mviewerstudio:php-${{ steps.version.outputs.VERSION }}
6760
docker push mviewer/mviewerstudio:python-${{ steps.version.outputs.VERSION }}
6861
docker push mviewer/mviewerstudio:php-${{ steps.version.outputs.VERSION }}
6962
7063
71-
72-

.github/workflows/prettier-check.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Code style checking
2+
on:
3+
pull_request:
4+
push:
5+
branches: [develop]
6+
7+
jobs:
8+
prettier:
9+
name: Prettier checking
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
- run: npm install
17+
- run: npm run prettier-check
18+
19+
- name: Prettier Output
20+
if: ${{ failure() }}
21+
shell: bash
22+
run: |
23+
echo "ERROR - Some files are note formated."
24+
echo "Use 'npm run pretty' to format JS files !"

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ srv/python/mviewerstudio_backend/static
2626
# pyenv
2727
.python-version
2828
?venv/
29+
pydocs*
30+
31+
# store
32+
store/
33+
public/

.prettierignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.min*
2+
*.css
3+
*.mst
4+
**/.git
5+
bootstrap/
6+
bootstrap-table/
7+
bootstrap5-tags/
8+
Font-awesome/
9+
i18njs/
10+
mustache-2.3.0/
11+
openlayers/
12+
moment.js
13+
Sortable.min.js

.prettierrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"printWidth": 90,
8+
"bracketSpacing": true,
9+
"bracketSameLine": true
10+
}

config-sample.json config-php-sample.json

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
{
22
"app_conf": {
33
"studio_title": "GéoBretagne mviewer studio",
4-
"upload_service": "srv/store.php",
5-
"delete_service": "srv/delete.php",
6-
"list_service": "srv/list.php",
7-
"store_style_service": "srv/store/style.php",
4+
"mviewer_version": "3.9",
5+
"mviewerstudio_version": "4",
6+
"is_php": "true",
7+
"php": {
8+
"upload_service": "srv/php/store.php",
9+
"delete_service": "srv/php/delete.php",
10+
"list_service": "srv/php/list.php",
11+
"store_style_service": "srv/php/store/style.php"
12+
},
13+
"api": "api/app",
14+
"store_style_service": "api/style",
815
"mviewer_instance": "http://172.16.10.30/mviewer/",
916
"conf_path_from_mviewer": "apps/store/",
1017
"mviewer_short_url": {
@@ -15,7 +22,7 @@
1522
"used": false,
1623
"url": "https://geobretagne.fr/minicatalog/csv"
1724
},
18-
"user_info": "srv/user_info.php",
25+
"user_info": "api/user",
1926
"export_conf_folder": "/var/www/htdocs/mviewer/apps/store/",
2027
"proxy": "../proxy/?url=",
2128
"user_info_visible": false,
@@ -159,13 +166,8 @@
159166
},
160167
{
161168
"title": "Catalogue de la Région Grand Est",
162-
"url": "https://www.geograndest.fr/geonetwork/srv/fre/csw",
163-
"baseref": "https://www.geograndest.fr/geonetwork/srv/eng/catalog.search?node=srv#/metadata/"
164-
},
165-
{
166-
"title": "Catalogue de la Région Pays de la Loire",
167-
"url": "https://www.geopal.org/geonetwork/srv/fre/csw",
168-
"baseref": "https://www.geopal.org/geonetwork/srv/eng/catalog.search?node=srv#/metadata/"
169+
"url": "https://datagrandest.fr/geonetwork/srv/fre/csw",
170+
"baseref": "https://datagrandest.fr/geonetwork/srv/eng/catalog.search?node=srv#/metadata/"
169171
}
170172
],
171173
"wms": [{
@@ -179,4 +181,4 @@
179181
}
180182
}
181183
}
182-
}
184+
}

config-python-sample.json

+15-19
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
22
"app_conf": {
3-
"studio_title": "Mviewer STudio Megalis",
4-
"upload_service": "srv/store",
5-
"delete_service": "srv/delete",
6-
"list_service": "srv/list",
7-
"store_style_service": "srv/store/style",
8-
"mviewer_instance": "/mviewer/",
3+
"studio_title": "Mviewer Studio",
4+
"mviewer_version": "3.9",
5+
"mviewerstudio_version": "4",
6+
"api": "api/app",
7+
"store_style_service": "api/style",
8+
"mviewer_instance": "http://127.0.0.1:5051/",
9+
"publish_url": "http://127.0.0.1:5051/?config=apps/public/{{config}}.xml",
910
"conf_path_from_mviewer": "apps/store/",
1011
"mviewer_short_url": {
1112
"used": true,
12-
"apps_folder": "store"
13+
"apps_folder": "store",
14+
"public_folder": "public"
1315
},
1416
"external_themes": {
1517
"used": true,
1618
"url": "https://geobretagne.fr/minicatalog/csv"
1719
},
18-
"user_info": "srv/user_info",
19-
"export_conf_folder": "/home/debian/mviewer/apps/store/",
20-
"proxy": "",
21-
"user_info_visible": false,
20+
"user_info": "api/user",
21+
"proxy": "proxy/?url=",
22+
"user_info_visible": true,
2223
"app_form_placeholders": {
2324
"app_title": "Kartenn",
2425
"logo_url": "https://geobretagne.fr/pub/logo/region-bretagne.jpg",
@@ -159,13 +160,8 @@
159160
},
160161
{
161162
"title": "Catalogue de la Région Grand Est",
162-
"url": "https://www.geograndest.fr/geonetwork/srv/fre/csw",
163-
"baseref": "https://www.geograndest.fr/geonetwork/srv/eng/catalog.search?node=srv#/metadata/"
164-
},
165-
{
166-
"title": "Catalogue de la Région Pays de la Loire",
167-
"url": "https://www.geopal.org/geonetwork/srv/fre/csw",
168-
"baseref": "https://www.geopal.org/geonetwork/srv/eng/catalog.search?node=srv#/metadata/"
163+
"url": "https://datagrandest.fr/geonetwork/srv/fre/csw",
164+
"baseref": "https://datagrandest.fr/geonetwork/srv/eng/catalog.search?node=srv#/metadata/"
169165
}
170166
],
171167
"wms": [{
@@ -179,4 +175,4 @@
179175
}
180176
}
181177
}
182-
}
178+
}

0 commit comments

Comments
 (0)