-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/development' into fix-xlsforms
- Loading branch information
Showing
31 changed files
with
372 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- staging | ||
- development | ||
# Allow manual trigger (workflow_dispatch) | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pytest: | ||
uses: ./.github/workflows/reusable/pytest.yml | ||
frontend-tests: | ||
uses: ./.github/workflows/reusable/frontend_tests.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- staging | ||
- development | ||
paths: | ||
- src/backend/** | ||
# Allow manual trigger (workflow_dispatch) | ||
workflow_dispatch: | ||
|
||
jobs: | ||
frontend-tests: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ github.ref_name }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: PyTest | ||
uses: ./.github/workflows/reusable/pytest.yml |
9 changes: 3 additions & 6 deletions
9
.github/workflows/frontend_test.yml → ...hub/workflows/reusable/frontend_tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 3 additions & 12 deletions
15
.github/workflows/pytest.yml → .github/workflows/reusable/pytest.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Publish Docs to Wiki | ||
|
||
on: | ||
push: | ||
paths: | ||
- docs/** | ||
branches: [main] | ||
# Allow manual trigger (workflow_dispatch) | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
USER_NAME: svcfmtm | ||
USER_EMAIL: [email protected] | ||
ORG: ${{ github.event.repository.owner.name }} | ||
REPO_NAME: ${{ github.event.repository.name }} | ||
|
||
jobs: | ||
publish_docs_to_wiki: | ||
# rclone syncs /docs dir to fmtm.wiki repo | ||
name: Publish Docs to Wiki | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Pull content from wiki | ||
run: | | ||
mkdir tmp_wiki | ||
cd tmp_wiki | ||
git init | ||
git config user.name $USER_NAME | ||
git config user.email $USER_EMAIL | ||
git pull https://x-access-token:[email protected]/$ORG/$REPO_NAME.wiki.git | ||
- name: Push content to wiki | ||
run: | | ||
apt update && apt install -y rsync | ||
rsync -av --delete docs/ tmp_wiki/ --exclude .git | ||
cd tmp_wiki | ||
git add . | ||
git commit -m "docs: automated wiki update on push" | ||
git push -f --set-upstream https://x-access-token:[email protected]/$ORG/$REPO_NAME.wiki.git master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,6 @@ src/frontend/node_modules | |
**/pdm.toml | ||
**/.pdm-python | ||
**/__pypackages__ | ||
|
||
# mkdocs | ||
site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ volumes: | |
|
||
networks: | ||
fmtm-dev: | ||
name: fmtm-dev | ||
|
||
services: | ||
fmtm-db: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# [Home](https://github.com/hotosm/fmtm/wiki) | ||
|
||
[About](https://github.com/hotosm/fmtm/wiki/About) | ||
|
||
[Code of Conduct](https://github.com/hotosm/fmtm/wiki/CODE_OF_CONDUCT) | ||
|
||
[User Manual for FMTM](https://github.com/hotosm/fmtm/wiki/User-Manual-For-Project-Managers) | ||
|
||
[Contribution](https://github.com/hotosm/fmtm/wiki/CONTRIBUTING) | ||
|
||
[FAQ](https://github.com/hotosm/fmtm/wiki/FAQ) | ||
|
||
## For Developers | ||
|
||
[1. Getting Started](https://github.com/hotosm/fmtm/wiki/dev/Setup) | ||
|
||
[2. Backend](https://github.com/hotosm/fmtm/wiki/dev/Backend) | ||
|
||
[3. Frontend](https://github.com/hotosm/fmtm/wiki/Dev/Frontend) | ||
|
||
[4. Database Tips](https://github.com/hotosm/fmtm/wiki/dev/Database-Tips) | ||
|
||
[5. Docker Tips](https://github.com/hotosm/fmtm/wiki/dev/Docker-Tips) | ||
|
||
[6. Production Deployment](https://github.com/hotosm/fmtm/wiki/dev/Production) | ||
|
||
[7. Troubleshooting](https://github.com/hotosm/fmtm/wiki/dev/Troubleshooting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
:root { | ||
--md-primary-fg-color: #d73f3f; | ||
--md-primary-fg-color--light: #e27575; | ||
--md-primary-fg-color--dark: #c22929; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Troubleshooting 🆘 | ||
|
||
## Running FMTM standalone | ||
|
||
- Although it's easiest to use Docker, sometimes it may no be feasible, or not preferred. | ||
- We use a tool called PDM to manage dependencies. | ||
- PDM can run in two modes: venv and PEP582 (`__pypackages__`). | ||
- Be careful when running FMTM you are not accidentally pulling in your system packages. | ||
|
||
### Tips | ||
|
||
- If a directory `__pypackages__` exists, delete it and attempt to | ||
`pdm install` | ||
again. | ||
- If the `__pypackages__` directory returns, then force using venv instead | ||
`pdm config python.use_venv true` | ||
and remove the directory again. | ||
- Troubleshoot the packages PDM sees with: | ||
`pdm run pip list` | ||
- Check a package can be imported in the PDM-based Python environment: | ||
|
||
```bash | ||
pdm run python | ||
import fastapi | ||
``` | ||
|
||
If you receive errors such as: | ||
|
||
```bash | ||
pydantic.error_wrappers.ValidationError: 3 validation errors for Settings | ||
OSM_URL | ||
field required (type=value_error.missing) | ||
OSM_SCOPE | ||
field required (type=value_error.missing) | ||
OSM_LOGIN_REDIRECT_URI | ||
field required (type=value_error.missing) | ||
``` | ||
|
||
Then you need to set the env variables on your system. | ||
|
||
If you would rather not do this, | ||
an alternative can be to feed them into the pdm command: | ||
|
||
```bash | ||
FRONTEND_MAIN_URL="" FRONTEND_MAP_URL="" \ | ||
OSM_CLIENT_ID="" OSM_CLIENT_SECRET="" OSM_SECRET_KEY="" \ | ||
pdm run uvicorn app.main:api --host 0.0.0.0 --port 8000 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.