maproulette / maproulette-backend Goto Github PK
View Code? Open in Web Editor NEWMapRoulette back-end / API
License: Apache License 2.0
MapRoulette back-end / API
License: Apache License 2.0
How shall we proceed with production deployment? Is there one preferred way?
Related documentation:
Related: #3
Travis supports Scala builds, I am familiar with Travis and it's free to use for OS projects. Unless you have a different idea @CrashFreak ?
There are 24 users in the DB when I just query it, but the users table shows 10 and says '1 to 10 of 10 entries'.
If you edit the details of a challenge, the Overpass query will be re-fired upon submitting the changes. This may not be what the user wants. Perhaps make it optional. Or add an 'reload overpass' option to the challenge admin menu to do this explicitly and never do it otherwise. Or add a date interval (every day / week) to schedule re-running the query.
feeding the following JSON to /api/v2/project
:
{
"name": "Test Project",
"description": "This is merely a test project, generated by _Postman_.",
"children": [
{
"name": "Test Challenge",
"identifier": "test_challenge",
"difficulty": 1,
"description": "This is merely a test challenge, generated by _Postman_.",
"blurb": "A Test Challenge",
"instruction": "This task should not be considered since it is a test task only!",
"children": [
{
"name": "Test Task 1",
"identifier": "test_task_1",
"instruction": "This should override the Challenge instruction, which says: `This task should not be considered since it is a test task only!`",
"location": {"type":"Point","coordinates":[77.6255107,40.5872232]},
"status": 0
}
]
}
]
}
fails with
{
"status": "KO",
"message": "{\"obj.enabled\":[{\"msg\":[\"error.path.missing\"],\"args\":[]}],\"obj.featured\":[{\"msg\":[\"error.path.missing\"],\"args\":[]}],\"obj.challengeType\":[{\"msg\":[\"error.path.missing\"],\"args\":[]}]}"
}
hashtags are becoming more visible and important in changeset comment. let's look at how we can pre-populate changeset comments with hashtags #maproulette #[challenge] etc.
Tasks should have a permanent URL.
Clicking the MapRoulette logo in the top left should get you to /
Not sure how to reproduce yet, but getting this from time to time upon project creation through the API:
{
"status": "KO",
"message": "ERROR: duplicate key value violates unique constraint \"idx_groups_name\"\n Detail: Key (lower(name::text))=(test project_admin) already exists."
}
A Postman API test suite would be nice.
The undocumented API call /api/v2/project/:id/children
does not give an invalid path response, but rather the following:
{
"status": "KO",
"message": {
"obj": [
{
"msg": [
"error.expected.jsobject"
],
"args": []
}
]
}
}
Right now when we have no tasks at all, this is displayed as an error toast message.
It would be nicer if we could present this as a modal window that says 'MapRoulette is currently out of work for you to do!'
It would also be nice to have this state emailed to the super user.
Upon first signing in to MapRoulette, can we ask for an email opt in? In the future we may want to send out periodic emails. This should be optional and settable in application configuration (for internal deploys we'd never need it)
The text would be:
"Are you OK with receiving the occasional email from MapRoulette? (You can opt out of this at any time.)"
Then also the user settings should have an email opt in checkbox.
User profile now contains some dummy data. Let's remove that soon.
firing DELETE /api/v2/project/:id
repeatedly keeps giving HTTP 200 responses.
When viewing a marker the map is zoomed in all the way. This is good when editing, but in the MapRoulette task assignment view it might make more sense to zoom out a few notches to give the user some more context about where they are and what data is around the area of interest.
It might be that this is specific to the "Aerodrome in NC" project it's defaulting to (i.e. I need to zoom out to see if there's an airport or runway mapped next to this aerodrome node), but it feels generally applicable to me.
Let's have a heroku instance that has the latest build deployed on it automatically. Useful? (I think so as we get to a point where others (design, beta testers) may want to take a look at the current state of the app.
I'll set this up on my fork for now, we can discuss if we want an automated Travis / Heroku CI flow on upstream. See also #8
When you change the instruction in an existing challenge that has tasks, the task instructions don't get changed as well.
The assumption should be that unless you specifically override the instruction for a task, it inherits that value from the challenge.
There is no way for the API user to know how to access newly created projects through the /api/v2/projects
POST call, as the call does not return identifiers. Suggest returning a JSON list with ids in the order of the project objects in the request JSON, {ids: [1,2,3,....]}
When you enter the user profile, there should be a button to exit. That action should take you back to wherever you were before.
another bucket list idea. When a challenge is complete, or some other milestone achieved, post to Slack and / or other social media. (IRC, twitter...)
As someone who only worked on a few MapRoulette tasks on the old version on the iD editor side and never generated them myself, I think a little getting started guide would be helpful: here's what to paste and where, how long it takes to load, here's how to run the new task once it's created, and so on.
I was just reading Mapzen's privacy policy for their mapping platform. It's interesting, bold, and I like it a lot. We should mimic this for MapRoulette, not keeping any PII, and having a meaningful statement about it.
In MapRoulette 1, we never gave this proper attention.
Since updating to the latest code, I get the following error on first invocation:
[error] p.c.s.n.PlayRequestHandler - Exception caught in Netty
java.lang.NoClassDefFoundError: Could not initialize class play.api.http.DefaultHttpErrorHandler$
at play.core.server.Server$class.logExceptionAndGetResult$1(Server.scala:45)
at play.core.server.Server$class.getHandlerFor(Server.scala:65)
at play.core.server.NettyServer.getHandlerFor(NettyServer.scala:47)
at play.core.server.netty.PlayRequestHandler.handle(PlayRequestHandler.scala:82)
at play.core.server.netty.PlayRequestHandler.channelRead(PlayRequestHandler.scala:163)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:278)
at com.typesafe.netty.http.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:129)
at com.typesafe.netty.http.HttpStreamsServerHandler.channelRead(HttpStreamsServerHandler.java:96)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
Let's have semantic versioning for MapRoulette, and include the version string somewhere in the UI (can be hidden away in an about screen). We could start with 2.0.0.
I created rudimentary setup instructions for OS X, see here. If this is useful we can make a wiki page out of it.
wondering if it makes sense to keep external projects like AdminLTE as submodules rather than pulling in the code into our project? not a prio, just capturing the thought for later.
A DELETE call to /api/v2/project/:id
returns
{
"message": "Task 10 deleted by user 1."
}
Posting the JSON below to /api/v2/tasks
silently fails with
WARN - Invalid json for type: {"obj.location":[{"msg":["error.expected.jsstring"],"args":[]}]}
on the console.
[
{
"name": "ExampleTask",
"identifier": "Custom_Identifier",
"parent": 2,
"instruction": "Task instruction",
"geometries": {
"type": "FeatureCollection",
"features":
[{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [77.6255107,40.5872232]
},
"properties": {}
}]
},
"location": {"type":"Point","coordinates":[77.6255107,40.5872232]},
"status": 0
}
]
the user sees and clicks 'next' which is not necessarily the same as 'too hard to fix'. Suggest changing to 'skipped'.
I like automated docs for the REST API. It's convenient and enforces a consistent inline class / method documentation style. Perhaps Swagger can help. I found play-doc. Also there is activator doc
but that seems to be more for internal documentation.
Repro:
What I see happen is:
GET http://maproulette.org:8080/auth/addUser/5/toProject/2 400 (Bad Request)
)I think it actually makes much more sense to do the user administration for a project on the project page, so to have a 'Users' page where you can add and remove users from a project, next to the 'Challenges' and 'Surveys' tabs.
When adding a user to a project from the user page, you need to reload to see the result. Unlike with the API key generation which is immediately reflected.
It would be neat to have a one-line local test docker machine.
In MapRoulette 1, any task geometry that had a property osmid
would be pre-selected in JOSM. We should carry this behavior over to New MapRoulette
When I open http://maproulette.org:8080/map/-1/1331
And I do nothing else except moving my mouse to the sidebar menu.
Then I see see
On Firefox 46 and Chromium 50
It would be super nice to have a JOSM plugin that shows MR tasks in a more structured way. Basic functionality I see:
This is probably a separate project but for now keeping the ticket under this repo.
Instead of having a text box floating over to the side here:
…consider putting that text in a Leaflet popup attached to the marker.
You'd want to let the user close that popup, so you'll have to think about where to put the text when they are finished skimming and decide to move the map around. Maybe when they dismiss the popup the text hides in the white area at the bottom of the page?
It would be nice if the superuser could set a message that would prominently display at the top of the map, for critical / important service announcements.
The delete button in the user table does not seem to do anything.
main.js [sm]:225 Uncaught TypeError: Cannot read property 'deleteUser' of undefined
deleteItem @ main.js [sm]:225
deleteUser @ main.js [sm]:195
onclick @ VM544 users:586
It would be neat if you could clone a challenge. Would look like this:
Hitting 'Clone' would open the new challenge creation screen pre-populated with the values of the source challenge.
Use case is when you have challenges that are very similar but require only small tweaks to description and / or overpass query.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.