From 1814edcf41525785469b9c017eeeef919ef3276f Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Tue, 10 Oct 2023 12:58:05 +0100 Subject: [PATCH 1/8] ci: add automatic pr labelling --- .github/labeler.yml | 19 +++++++++++++++++++ .github/workflows/pr_label.yml | 14 ++++++++++++++ .github/workflows/{pr.yml => pr_test.yml} | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/pr_label.yml rename .github/workflows/{pr.yml => pr_test.yml} (96%) diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..49da022fe3 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,19 @@ +"frontend": + - "src/frontend/**/*" +"backend": + - "src/backend/**/*" +"devops": + - ".github/**/*" + - "scripts/**/*" + - "docker-*.yml" + - "**/Dockerfile" + - "**/*.dockerfile" + - "josm/**/*" +"documentation": + - "docs/**/*" + - "images/**/*" + - "mkdocs.yml" + - "README.md" + - "INSTALL.md" +"ODK": + - "odkcentral/**/*" diff --git a/.github/workflows/pr_label.yml b/.github/workflows/pr_label.yml new file mode 100644 index 0000000000..61f1a571e1 --- /dev/null +++ b/.github/workflows/pr_label.yml @@ -0,0 +1,14 @@ +name: PR Label + +on: + pull_request: + +jobs: + pr-label: + runs-on: ubuntu-latest + + steps: + - uses: actions/labeler@v3 + # Uses .github/labeler.yml definitions + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr_test.yml similarity index 96% rename from .github/workflows/pr.yml rename to .github/workflows/pr_test.yml index 2423749925..a35ba134c7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr_test.yml @@ -1,4 +1,4 @@ -name: PR +name: PR Tests on: pull_request: From a38701e5ee79b05e8d24527a9b8478dcbfc24569 Mon Sep 17 00:00:00 2001 From: Sam <78538841+spwoodcock@users.noreply.github.com> Date: Tue, 10 Oct 2023 12:59:47 +0100 Subject: [PATCH 2/8] refactor: remove make_data_extract replace with osm-rawdata (#891) --- src/backend/app/projects/project_crud.py | 2 +- src/backend/app/tasks/tasks_crud.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/app/projects/project_crud.py b/src/backend/app/projects/project_crud.py index 751e61e0d4..693eadea73 100644 --- a/src/backend/app/projects/project_crud.py +++ b/src/backend/app/projects/project_crud.py @@ -2119,7 +2119,7 @@ async def update_project_form( db.commit() # OSM Extracts for whole project - pg = PostgresClient(settings.UNDERPASS_API_URL, "underpass") + pg = PostgresClient("underpass") outfile = ( f"/tmp/{project_title}_{category}.geojson" # This file will store osm extracts ) diff --git a/src/backend/app/tasks/tasks_crud.py b/src/backend/app/tasks/tasks_crud.py index 3bd1db2d36..467e73c86a 100644 --- a/src/backend/app/tasks/tasks_crud.py +++ b/src/backend/app/tasks/tasks_crud.py @@ -22,14 +22,12 @@ from geoalchemy2.shape import from_shape from geojson import dump from loguru import logger as log -from osm_fieldwork.make_data_extract import PostgresClient +from osm_rawdata.postgres import PostgresClient from shapely.geometry import shape from sqlalchemy import column, select, table from sqlalchemy.orm import Session from sqlalchemy.sql import text -from app.config import settings - from ..central import central_crud from ..db import db_models from ..db.postgis_utils import geometry_to_geojson @@ -332,7 +330,7 @@ async def update_task_files( task_polygons = f"/tmp/{project_name}_{category}_{task_id}.geojson" # Update data extracts in the odk central - pg = PostgresClient(settings.UNDERPASS_API_URL, "underpass") + pg = PostgresClient("underpass") category = "buildings" From 8105a56759976c562fd88b928a025fc8d51addf3 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Tue, 10 Oct 2023 13:18:25 +0100 Subject: [PATCH 3/8] ci: add migrations label to auto-label workflow --- .github/labeler.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 49da022fe3..90d3afaeeb 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -8,7 +8,10 @@ - "docker-*.yml" - "**/Dockerfile" - "**/*.dockerfile" + - "**/*entrypoint.sh" - "josm/**/*" +"migration": + - "src/backend/migrations/**/*" "documentation": - "docs/**/*" - "images/**/*" From ed4b5a1f1508430332536aeb1264b75969bb9c30 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 17:58:12 +0100 Subject: [PATCH 4/8] docs: add JoltCode as a contributor for code (#898) * docs: update README.md * docs: update .all-contributorsrc --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .all-contributorsrc | 83 +++++++++++++++++++++++++++++++++++++-------- README.md | 16 ++++----- 2 files changed, 74 insertions(+), 25 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 5fc041cb79..259f911273 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,7 +3,9 @@ "projectOwner": "hotosm", "repoType": "github", "repoHost": "https://github.com", - "files": ["README.md"], + "files": [ + "README.md" + ], "imageSize": 100, "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/HOTOSM-Thanks%20for%20contributing!-red/github/all-contributors/hotosm/FMTM?color=red&style=flat-square)](#contributors)", "commit": true, @@ -14,93 +16,144 @@ "name": "Ivan Gayton", "avatar_url": "https://avatars.githubusercontent.com/u/5991943?v=4", "profile": "http://ivangayton.net", - "contributions": ["projectManagement", "code", "review", "ideas"] + "contributions": [ + "projectManagement", + "code", + "review", + "ideas" + ] }, { "login": "robsavoye", "name": "Rob Savoye", "avatar_url": "https://avatars.githubusercontent.com/u/71342768?v=4", "profile": "https://www.hotosm.org", - "contributions": ["maintenance", "mentoring", "code", "review", "ideas"] + "contributions": [ + "maintenance", + "mentoring", + "code", + "review", + "ideas" + ] }, { "login": "krtonga", "name": "krtonga", "avatar_url": "https://avatars.githubusercontent.com/u/7307817?v=4", "profile": "https://github.com/krtonga", - "contributions": ["code", "doc", "tool", "ideas"] + "contributions": [ + "code", + "doc", + "tool", + "ideas" + ] }, { "login": "spwoodcock", "name": "Sam", "avatar_url": "https://avatars.githubusercontent.com/u/78538841?v=4", "profile": "https://github.com/spwoodcock", - "contributions": ["code", "review", "infra", "ideas"] + "contributions": [ + "code", + "review", + "infra", + "ideas" + ] }, { "login": "petya-kangalova", "name": "Petya ", "avatar_url": "https://avatars.githubusercontent.com/u/98902727?v=4", "profile": "https://www.hotosm.org/people/petya-kangalova/", - "contributions": ["doc", "eventOrganizing", "ideas"] + "contributions": [ + "doc", + "eventOrganizing", + "ideas" + ] }, { "login": "Mudi-business", "name": "Mohamed Bakari Mohamed", "avatar_url": "https://avatars.githubusercontent.com/u/52991565?v=4", "profile": "http://zanrevenue.org", - "contributions": ["code"] + "contributions": [ + "code" + ] }, { "login": "biomassives", "name": "G. Willson", "avatar_url": "https://avatars.githubusercontent.com/u/4379874?v=4", "profile": "https://www.scdhub.org", - "contributions": ["code"] + "contributions": [ + "code" + ] }, { "login": "Ndacyayisenga-droid", "name": "Tayebwa Noah", "avatar_url": "https://avatars.githubusercontent.com/u/58124613?v=4", "profile": "https://github.com/Ndacyayisenga-droid", - "contributions": ["doc"] + "contributions": [ + "doc" + ] }, { "login": "mohammadareeb95", "name": "Mohammad Areeb", "avatar_url": "https://avatars.githubusercontent.com/u/77102111?v=4", "profile": "https://github.com/mohammadareeb95", - "contributions": ["doc"] + "contributions": [ + "doc" + ] }, { "login": "AugustHottie", "name": "AugustHottie", "avatar_url": "https://avatars.githubusercontent.com/u/96122635?v=4", "profile": "https://github.com/AugustHottie", - "contributions": ["doc"] + "contributions": [ + "doc" + ] }, { "login": "Balofire", "name": "Ahmeed Etti-Balogun", "avatar_url": "https://avatars.githubusercontent.com/u/102294666?v=4", "profile": "https://github.com/Balofire", - "contributions": ["doc"] + "contributions": [ + "doc" + ] }, { "login": "Roseford", "name": "Uju", "avatar_url": "https://avatars.githubusercontent.com/u/75838716?v=4", "profile": "https://github.com/Roseford", - "contributions": ["doc"] + "contributions": [ + "doc" + ] }, { "login": "neelimagoogly", "name": "Neelima Mohanty", "avatar_url": "https://avatars.githubusercontent.com/u/97789856?v=4", "profile": "https://github.com/neelimagoogly", - "contributions": ["doc"] + "contributions": [ + "doc" + ] + }, + { + "login": "JoltCode", + "name": "JoltCode", + "avatar_url": "https://avatars.githubusercontent.com/u/46378904?v=4", + "profile": "https://github.com/JoltCode", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, - "linkToUsage": true + "linkToUsage": true, + "commitType": "docs" } diff --git a/README.md b/README.md index 25d38711f6..9c8e132478 100644 --- a/README.md +++ b/README.md @@ -262,23 +262,19 @@ Thanks goes to these wonderful people: Ivan Gayton
Ivan Gayton

📆 💻 👀 🤔 Rob Savoye
Rob Savoye

🚧 🧑‍🏫 💻 👀 🤔 krtonga
krtonga

💻 📖 🔧 🤔 - Sam
Sam

💻 👀 🚇 🤔 🚧 + Sam
Sam

💻 👀 🚇 🤔 Petya
Petya

📖 📋 🤔 - Niraj Adhikari
Niraj Adhikari

💻 🤔 🚧 - Deepak Pradhan (Varun)
Deepak Pradhan (Varun)

💻 🤔 🚧 - - Mohamed Bakari Mohamed
Mohamed Bakari Mohamed

💻 - Sujan Adhikari
Sujan Adhikari

💻 - AugustHottie
AugustHottie

📖 - Ahmeed Etti-Balogun
Ahmeed Etti-Balogun

📖 - Uju
Uju

📖 - Neelima Mohanty
Neelima Mohanty

📖 G. Willson
G. Willson

💻 Tayebwa Noah
Tayebwa Noah

📖 Mohammad Areeb
Mohammad Areeb

📖 + AugustHottie
AugustHottie

📖 + Ahmeed Etti-Balogun
Ahmeed Etti-Balogun

📖 + Uju
Uju

📖 + Neelima Mohanty
Neelima Mohanty

📖 + JoltCode
JoltCode

💻 From f4bb7c997da807b3a95952ec4a73ce9b76359854 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 11 Oct 2023 18:01:09 +0100 Subject: [PATCH 5/8] build: remove babel plugins, babelrc files --- src/frontend/.babelrc | 41 ------------------------------------- src/frontend/package.json | 1 - src/frontend/pnpm-lock.yaml | 10 --------- 3 files changed, 52 deletions(-) delete mode 100755 src/frontend/.babelrc diff --git a/src/frontend/.babelrc b/src/frontend/.babelrc deleted file mode 100755 index 934c0ae8e9..0000000000 --- a/src/frontend/.babelrc +++ /dev/null @@ -1,41 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "useBuiltIns": "entry", - "corejs": "3.22" - } - ], - "@babel/preset-typescript", - "@babel/preset-react" - ], - "plugins": [ - ["@babel/transform-runtime"], - [ - "import", - { "libraryName": "@mui/material", "libraryDirectory": "", "camel2DashComponentName": false }, - "@mui/material" - ], - [ - "import", - { "libraryName": "@mui/icons-material", "libraryDirectory": "", "camel2DashComponentName": false }, - "@mui/icons-material" - ], - [ - "import", - { "libraryName": "@mui/material/colors", "libraryDirectory": "", "camel2DashComponentName": false }, - "@mui/material/colors" - ] - // [ - // "import", - // { "libraryName": "react-redux", "libraryDirectory": "", "camel2DashComponentName": false }, - // "react-redux" - // ], - // [ - // "import", - // { "libraryName": "swiper", "libraryDirectory": "", "camel2DashComponentName": false }, - // "swiper" - // ] - ] -} diff --git a/src/frontend/package.json b/src/frontend/package.json index 4f0b16168e..b29d924eba 100755 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -21,7 +21,6 @@ "@types/react-dom": "^17.0.2", "@vitejs/plugin-react": "^4.1.0", "autoprefixer": "^10.4.15", - "babel-plugin-import": "^1.13.6", "css-loader": "^6.3.0", "eslint-config-airbnb": "^19.0.4", "eslint-plugin-react": "^7.33.0", diff --git a/src/frontend/pnpm-lock.yaml b/src/frontend/pnpm-lock.yaml index 1aa04ab26c..f23697512c 100644 --- a/src/frontend/pnpm-lock.yaml +++ b/src/frontend/pnpm-lock.yaml @@ -133,9 +133,6 @@ devDependencies: autoprefixer: specifier: ^10.4.15 version: 10.4.16(postcss@8.4.31) - babel-plugin-import: - specifier: ^1.13.6 - version: 1.13.8 css-loader: specifier: ^6.3.0 version: 6.8.1(webpack@5.88.2) @@ -4033,13 +4030,6 @@ packages: dequal: 2.0.3 dev: true - /babel-plugin-import@1.13.8: - resolution: - { integrity: sha512-36babpjra5m3gca44V6tSTomeBlPA7cHUynrE2WiQIm3rEGD9xy28MKsx5IdO45EbnpJY7Jrgd00C6Dwt/l/2Q== } - dependencies: - '@babel/helper-module-imports': 7.22.15 - dev: true - /babel-plugin-macros@3.1.0: resolution: { integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== } From 13724170d52891f77803b155bcf6560575adcd86 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 11 Oct 2023 18:01:44 +0100 Subject: [PATCH 6/8] docs: update ordering of allcontributors --- .all-contributorsrc | 99 +++++++++++++-------------------------------- 1 file changed, 27 insertions(+), 72 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 259f911273..64c5e42ea1 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -3,9 +3,7 @@ "projectOwner": "hotosm", "repoType": "github", "repoHost": "https://github.com", - "files": [ - "README.md" - ], + "files": ["README.md"], "imageSize": 100, "badgeTemplate": "[![All Contributors](https://img.shields.io/badge/HOTOSM-Thanks%20for%20contributing!-red/github/all-contributors/hotosm/FMTM?color=red&style=flat-square)](#contributors)", "commit": true, @@ -16,141 +14,98 @@ "name": "Ivan Gayton", "avatar_url": "https://avatars.githubusercontent.com/u/5991943?v=4", "profile": "http://ivangayton.net", - "contributions": [ - "projectManagement", - "code", - "review", - "ideas" - ] + "contributions": ["projectManagement", "code", "review", "ideas"] }, { "login": "robsavoye", "name": "Rob Savoye", "avatar_url": "https://avatars.githubusercontent.com/u/71342768?v=4", "profile": "https://www.hotosm.org", - "contributions": [ - "maintenance", - "mentoring", - "code", - "review", - "ideas" - ] + "contributions": ["maintenance", "mentoring", "code", "review", "ideas"] }, { "login": "krtonga", "name": "krtonga", "avatar_url": "https://avatars.githubusercontent.com/u/7307817?v=4", "profile": "https://github.com/krtonga", - "contributions": [ - "code", - "doc", - "tool", - "ideas" - ] + "contributions": ["code", "doc", "tool", "ideas"] }, { "login": "spwoodcock", "name": "Sam", "avatar_url": "https://avatars.githubusercontent.com/u/78538841?v=4", "profile": "https://github.com/spwoodcock", - "contributions": [ - "code", - "review", - "infra", - "ideas" - ] + "contributions": ["code", "review", "infra", "ideas"] }, { "login": "petya-kangalova", "name": "Petya ", "avatar_url": "https://avatars.githubusercontent.com/u/98902727?v=4", "profile": "https://www.hotosm.org/people/petya-kangalova/", - "contributions": [ - "doc", - "eventOrganizing", - "ideas" - ] + "contributions": ["doc", "eventOrganizing", "ideas"] }, { "login": "Mudi-business", "name": "Mohamed Bakari Mohamed", "avatar_url": "https://avatars.githubusercontent.com/u/52991565?v=4", "profile": "http://zanrevenue.org", - "contributions": [ - "code" - ] + "contributions": ["code"] + }, + { + "login": "JoltCode", + "name": "JoltCode", + "avatar_url": "https://avatars.githubusercontent.com/u/46378904?v=4", + "profile": "https://github.com/JoltCode", + "contributions": ["code"] + }, + { + "login": "neelimagoogly", + "name": "Neelima Mohanty", + "avatar_url": "https://avatars.githubusercontent.com/u/97789856?v=4", + "profile": "https://github.com/neelimagoogly", + "contributions": ["doc"] }, { "login": "biomassives", "name": "G. Willson", "avatar_url": "https://avatars.githubusercontent.com/u/4379874?v=4", "profile": "https://www.scdhub.org", - "contributions": [ - "code" - ] + "contributions": ["code"] }, { "login": "Ndacyayisenga-droid", "name": "Tayebwa Noah", "avatar_url": "https://avatars.githubusercontent.com/u/58124613?v=4", "profile": "https://github.com/Ndacyayisenga-droid", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "mohammadareeb95", "name": "Mohammad Areeb", "avatar_url": "https://avatars.githubusercontent.com/u/77102111?v=4", "profile": "https://github.com/mohammadareeb95", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "AugustHottie", "name": "AugustHottie", "avatar_url": "https://avatars.githubusercontent.com/u/96122635?v=4", "profile": "https://github.com/AugustHottie", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "Balofire", "name": "Ahmeed Etti-Balogun", "avatar_url": "https://avatars.githubusercontent.com/u/102294666?v=4", "profile": "https://github.com/Balofire", - "contributions": [ - "doc" - ] + "contributions": ["doc"] }, { "login": "Roseford", "name": "Uju", "avatar_url": "https://avatars.githubusercontent.com/u/75838716?v=4", "profile": "https://github.com/Roseford", - "contributions": [ - "doc" - ] - }, - { - "login": "neelimagoogly", - "name": "Neelima Mohanty", - "avatar_url": "https://avatars.githubusercontent.com/u/97789856?v=4", - "profile": "https://github.com/neelimagoogly", - "contributions": [ - "doc" - ] - }, - { - "login": "JoltCode", - "name": "JoltCode", - "avatar_url": "https://avatars.githubusercontent.com/u/46378904?v=4", - "profile": "https://github.com/JoltCode", - "contributions": [ - "code" - ] + "contributions": ["doc"] } ], "contributorsPerLine": 7, From 2473e2b7d1aa369fbf70282b098cb52e1e1894ad Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 11 Oct 2023 18:09:49 +0100 Subject: [PATCH 7/8] docs: merge allcontributors from main branch --- .all-contributorsrc | 56 +++++++++++++++++++++++++++++++++------------ README.md | 14 ++++++++---- 2 files changed, 52 insertions(+), 18 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 64c5e42ea1..52d341b13f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -23,6 +23,27 @@ "profile": "https://www.hotosm.org", "contributions": ["maintenance", "mentoring", "code", "review", "ideas"] }, + { + "login": "spwoodcock", + "name": "Sam", + "avatar_url": "https://avatars.githubusercontent.com/u/78538841?v=4", + "profile": "https://github.com/spwoodcock", + "contributions": ["code", "review", "infra", "ideas", "maintenance"] + }, + { + "login": "varun2948", + "name": "Deepak Pradhan (Varun)", + "avatar_url": "https://avatars.githubusercontent.com/u/37866666?v=4", + "profile": "https://github.com/varun2948", + "contributions": ["code", "ideas", "maintenance"] + }, + { + "login": "nrjadkry", + "name": "Niraj Adhikari", + "avatar_url": "https://avatars.githubusercontent.com/u/41701707?v=4", + "profile": "https://github.com/nrjadkry", + "contributions": ["code", "ideas", "maintenance"] + }, { "login": "krtonga", "name": "krtonga", @@ -30,13 +51,6 @@ "profile": "https://github.com/krtonga", "contributions": ["code", "doc", "tool", "ideas"] }, - { - "login": "spwoodcock", - "name": "Sam", - "avatar_url": "https://avatars.githubusercontent.com/u/78538841?v=4", - "profile": "https://github.com/spwoodcock", - "contributions": ["code", "review", "infra", "ideas"] - }, { "login": "petya-kangalova", "name": "Petya ", @@ -44,6 +58,13 @@ "profile": "https://www.hotosm.org/people/petya-kangalova/", "contributions": ["doc", "eventOrganizing", "ideas"] }, + { + "login": "Sujanadh", + "name": "Sujan Adhikari", + "avatar_url": "https://avatars.githubusercontent.com/u/109404840?v=4", + "profile": "https://github.com/Sujanadh", + "contributions": ["code"] + }, { "login": "Mudi-business", "name": "Mohamed Bakari Mohamed", @@ -51,6 +72,20 @@ "profile": "http://zanrevenue.org", "contributions": ["code"] }, + { + "login": "NSUWAL123", + "name": "Nishit Suwal", + "avatar_url": "https://avatars.githubusercontent.com/u/81785002?v=4", + "profile": "https://github.com/NSUWAL123", + "contributions": ["code"] + }, + { + "login": "biomassives", + "name": "G. Willson", + "avatar_url": "https://avatars.githubusercontent.com/u/4379874?v=4", + "profile": "https://www.scdhub.org", + "contributions": ["code"] + }, { "login": "JoltCode", "name": "JoltCode", @@ -65,13 +100,6 @@ "profile": "https://github.com/neelimagoogly", "contributions": ["doc"] }, - { - "login": "biomassives", - "name": "G. Willson", - "avatar_url": "https://avatars.githubusercontent.com/u/4379874?v=4", - "profile": "https://www.scdhub.org", - "contributions": ["code"] - }, { "login": "Ndacyayisenga-droid", "name": "Tayebwa Noah", diff --git a/README.md b/README.md index 9c8e132478..f447628161 100644 --- a/README.md +++ b/README.md @@ -261,20 +261,26 @@ Thanks goes to these wonderful people: Ivan Gayton
Ivan Gayton

📆 💻 👀 🤔 Rob Savoye
Rob Savoye

🚧 🧑‍🏫 💻 👀 🤔 + Sam
Sam

💻 👀 🚇 🤔 🚧 + Deepak Pradhan (Varun)
Deepak Pradhan (Varun)

💻 🤔 🚧 + Niraj Adhikari
Niraj Adhikari

💻 🤔 🚧 krtonga
krtonga

💻 📖 🔧 🤔 - Sam
Sam

💻 👀 🚇 🤔 Petya
Petya

📖 📋 🤔 + + + Sujan Adhikari
Sujan Adhikari

💻 Mohamed Bakari Mohamed
Mohamed Bakari Mohamed

💻 + Nishit Suwal
Nishit Suwal

💻 G. Willson
G. Willson

💻 + JoltCode
JoltCode

💻 + Neelima Mohanty
Neelima Mohanty

📖 + Tayebwa Noah
Tayebwa Noah

📖 - Tayebwa Noah
Tayebwa Noah

📖 Mohammad Areeb
Mohammad Areeb

📖 AugustHottie
AugustHottie

📖 Ahmeed Etti-Balogun
Ahmeed Etti-Balogun

📖 Uju
Uju

📖 - Neelima Mohanty
Neelima Mohanty

📖 - JoltCode
JoltCode

💻 From ff26553522d2621f817f3adae681d833161f7db4 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 11 Oct 2023 22:21:17 +0100 Subject: [PATCH 8/8] docs: add info about deployment flow --- Makefile | 15 +++++----- docs/_Sidebar.md | 4 ++- docs/dev/Deployment-Flow.md | 60 +++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 4 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 docs/dev/Deployment-Flow.md diff --git a/Makefile b/Makefile index 625a0df156..77aa982a3d 100644 --- a/Makefile +++ b/Makefile @@ -19,13 +19,14 @@ # All python source files # MDS := $(wildcard ./docs/*.md) MDS := \ - docs/DEV-1.-Getting-Started.md \ - docs/DEV-2.-Backend.md \ - docs/DEV-3.-Frontend.md \ - docs/DEV-4.-Database-Tips.md \ - docs/DEV-5.-Docker-Tips.md \ - docs/DEV-6.-Production-Deployment.md \ - docs/User-Manual-For-Project-Managers.md + docs/dev/Backend.md \ + docs/dev/Database-Tips.md \ + docs/dev/Deployment-Flow.md \ + docs/dev/Docker-Tips.md \ + docs/dev/Frontend.md \ + docs/dev/Production.md \ + docs/dev/Setup.md \ + docs/dev/Troubleshooting.md \ PDFS := $(MDS:.md=.pdf) diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index da5dce382a..ab57cfe195 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -24,4 +24,6 @@ [6. Production Deployment](https://github.com/hotosm/fmtm/wiki/dev/Production) -[7. Troubleshooting](https://github.com/hotosm/fmtm/wiki/dev/Troubleshooting) +[7. Deployment Flow](https://github.com/hotosm/fmtm/wiki/dev/Deployment-Flow) + +[8. Troubleshooting](https://github.com/hotosm/fmtm/wiki/dev/Troubleshooting) diff --git a/docs/dev/Deployment-Flow.md b/docs/dev/Deployment-Flow.md new file mode 100644 index 0000000000..6f6576a32f --- /dev/null +++ b/docs/dev/Deployment-Flow.md @@ -0,0 +1,60 @@ +# Deployment Flow + +These stages go in order, from local development, through to production deployment. + +## Local Development + +- Devs develop features on their local instance. +- Use `docker-compose.yml` setup for testing. +- Once feature and testing complete, make a PR to the `development` branch. + +## Development Deployment + +- Once a PR is approved, it is merged to `development`. +- This triggers a workflow to automatically deploy the code changes on the dev server. +- The purpose of this stage is for fast CI, + i.e. the developer sees their code in action quickly. + +## Staging Deployment + +- At a set interval (approx bi-weekly), + the updates made on `development` and frozen, tested, + patched (if required), and merged into the `staging` branch via PR. +- Once approved, the `staging` branch auto-deploys to the staging server. +- The purpose of this stage is to reguarly release versions of FMTM that + power users (and the project owner) can test. +- Anyone who doesn't mind occasional breakage is welcome to use this server publically. +- Hot fixes are also possible, if fixing some + functionality is critical for FMTM to function. + +## Production Deployment + +- The staging server instance is thoroughly tested + by the product owner, and bug reports filed. +- The release is hardened into longer interval (approx bi-monthly) production releases. +- A PR is made from `staging` to `main` branch. +- Once approved and the code merged, a Github **release** is made. +- A release is available on Github, + including all relevant release notes for what has been updated. +- The **release** will trigger the workflow to deploy to the production server. + +## Other: Feature Demo Releases + +- A feature demo release is a throwaway instance of FMTM with a particular purpose. +- Functionality is developed here for various reasons: + - Specific updates for a single project that won't be used elsewhere. + - Very fast updating of the server, + without interfering with the typical release flow. +- The key point is that these branch instances are **single use** + and will be **shut down** once the project has ended. +- The easiest approach is probably to: + - Create and login to a server. + - Run the bundled `feature-demo.sh` install script. +- Alternatively, a workflow can be made to auto-deploy: + - Triggering on a branch naming convention: `feature-demo/some-feature`. + - The user will have to enter an SSH key into the Gitlab secrets. + - The workflow will deploy to the server remotely + when the branch is pushed to. + - This approach is less preferred, as the user + requires write access to the Github repo, + but is under consideration. diff --git a/mkdocs.yml b/mkdocs.yml index 581bc51f6f..56a5b8ba38 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -72,6 +72,7 @@ nav: - Backend: dev/Backend.md - Frontend: dev/Frontend.md - Production Deployment: dev/Production.md + - Deployment Flow: dev/Deployment-Flow.md - Docker Tips: dev/Docker-Tips.md - Database Tips: dev/Database-Tips.md - Troubleshooting: dev/Troubleshooting.md