Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a version of TM with sandboxed OSM for training data generation #6326

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

spwoodcock
Copy link
Member

@spwoodcock spwoodcock commented Apr 10, 2024

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Describe this PR

  • I created a demo local setup for using a bundled version of OSM that is sandboxed.
    • We need something like this as part of a TM specifically for generating training data for fAIr.
  • It adds a database and OpenStreetMapwebsite/API service to the stack.
  • The version of OSM includes a pre-generated user 'admin@hotosm.org' with password 'Password1234'.
  • There is also a pre-generated OAuth2 application, with the redirect URI set to that in the tasking-manager.env REDIRECT_URI variable.

Things still to do:

  • Instead of creating an OAuth2 App setup and requiring login, we could possibly just generate an access token in the database, then use that as the access_token to hardcoded for iDEditor (in editor.js?).

Alternative Approaches Considered

Testing / Setup

  1. First build the OSM container:
cd contrib/tm-training
docker compose build osm
  1. Set the REDIRECT_URL correctly in tasking-manager.env:

  2. Run all services together:

dc -f docker-compose.yml -f contrib/tm-training/docker-compose.yml up -d
  1. Get the generated Client ID and Client Secret:
dc -f docker-compose.yml -f contrib/tm-training/docker-compose.yml logs osm
  1. Update the env vars in tasking-manager.env.

  2. Restart all services:

dc -f docker-compose.yml -f contrib/tm-training/docker-compose.yml up -d

Extra resources

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@spwoodcock spwoodcock changed the title Feat/training data tm Create a version of TM with sandboxed OSM for training data generation Apr 10, 2024
Copy link

sonarcloud bot commented Apr 30, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ramyaragupathy
Copy link
Member

Would this fit the need for end to end mapping testing grounds @spwoodcock @dakotabenjamin ?

@ramyaragupathy ramyaragupathy added type: enhancement Improving an existing functionality priority: high labels May 1, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this file?

@dakotabenjamin
Copy link
Member

Yes, but from what I understand of the setup as written its not something we would push to production but would rather spin up standalone for a training event for example.

perhaps a task for later but ideally we can specify which osm backend to write to during project creation. For the sandbox, we would probably want to setup some processes for cleaning the database regularly as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants