Skip to content

Commit

Permalink
Merge bcc0afd into ea037d0
Browse files Browse the repository at this point in the history
  • Loading branch information
openbrian committed Oct 15, 2019
2 parents ea037d0 + bcc0afd commit d913ca9
Show file tree
Hide file tree
Showing 76 changed files with 2,297 additions and 44 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -38,3 +38,4 @@ script:
- sed -e "/idle_in_transaction_session_timeout/d" -e 's/ IMMUTABLE / /' -e "s/AS '.*libpgosm.*',/AS 'libpgosm',/" -e "/^--/d" db/structure.sql > db/structure.actual
- diff -uw db/structure.expected db/structure.actual
- bundle exec rake test:db
- bundle exec rake cucumber
193 changes: 193 additions & 0 deletions Design.md
@@ -0,0 +1,193 @@
# Microcosm

Micrososm is a website that supports the activities of OpenStreetMap local user groups. These activities include:

* membership tracking
* communication with members
* showcase recent achievements of the microcosm
* inform people about upcoming mapping events
* highlight places of staleness on the local map
* review changsets
* build walkable and bikable routes for fixing OSM bugs

## Sample URLs

There are various hosting options:

> http://mappingdc.org/microcosm
> http://openstreetmap.us/microcosms/mappingdc
> http://openstreetmap.org/microcosms/paris
# Users

* Visitor - Someone who is interested in mapping, but not a member of a microcosm.
* Member - Primary user is a mapper who belongs to the microcosm. The mapper goes to events, does street level mapping, edits the map in this area.
* Organizer - Secondary user is the organizers/team of the microcosm.
* Administrator - OSM admin may create microcosms.

# Features

## As a Visitor

### About the map

- [ ] See Notes on the map that need resolution

### About the microcosm

- [x] See a list of microcosms
- [x] See description of the microcosm
- [x] See the members of the microcosm
- [x] See links to facebook and twitter
- [ ] See a map of the area
- [ ] See links to members OSM wiki, OSM help, OSM Forum, GitHub, Mapillary, HOT OSM, and Twitter accounts if they exist.
- [ ] See what the microcosm is working on
- [ ] See what's new in the microcosm: editing activity, project activity
- [ ] See feed from twitter
- [ ] Not be invited more than once per year

### About the microcosm events

- [x] See upcoming events
- [ ] See past events

### About the microcosm projects

- [ ] See the projects of the microcosm

## As a Member

### About the microcosm

- [ ] See details about other members
- [ ] See mayors of neighborhoods

### About the member

- [ ] See their profile
- [ ] See their upcoming events
- [ ] See their past events
- [ ] See their progress
- [ ] See where they have mapped
- [ ] Share that they belong to a Local Chapter
- [ ] Add friends (use OSM profile friends)

### About events

- [ ] Propose a new event
- [x] RSVP for an event

### About projects

- [ ] Propose a new project
- [ ] Elect to work on a project
- [ ] Work on a mapping task (task manager, local project)

### Other

## As an Organizer

### About the mapathon

- [ ] Can adjust the center location and bounds of the AOI

### About the microcosm

- [ ] Manage the description
- [ ] Identify sister microcosms

### Events

- [ ] Organize an event
- [ ] Generate Field Papers (Survey Papers)

### Membership

- [ ] Manage members
- [ ] Send a message to members
- [ ] Get notified about first time mappers in the area (https://github.com/cliffordsnow/newUsers)
- [ ] Invite people to join the microcosm

### Quality Assurance

- [ ] Measure the completeness of coverage
- [ ] Organize feeds (e.g. city bike station locations)
- [ ] Measure quality assurance

## As an admin

- [ ] Create microcosms
- [x] Edit microcosms
- [ ] Periodically scan the wiki for new user groups and local chapters (https://github.com/osmlab/localgroups/blob/master/osmgroups.geojson)

# QA

* https://wiki.openstreetmap.org/wiki/Keep_Right
* https://www.keepright.at/report_map.php?zoom=12&lat=39.95356&lon=-75.12364
* https://github.com/keepright/keepright
* http://osmose.openstreetmap.fr/en/map/
* https://wiki.openstreetmap.org/wiki/OSM_Inspector


# Use Cases

## List reviews in the area

Some people want their changes reviewed. Provide a list of these for the AOI.

## An organizer organizes a street survey

Assume: microcosm exists and has many users, event details have been selected

Steps:

1. Organizer notifies the microcosm about the event.
1. Members RSVP.
1. The event is held.

## At an event members upload pictures of their survey notes

At an event there may not be time for surveyors to enter all their data. They can take pictures of their notes and upload it to the microcosm for other people to map later. The notes are entered into a queue of tasks for others to assign to themselves.

Build native apps for iOS and Android to use the camera and upload them to the server.

## Build-a-mapathon

* Help an organizer pick a location to map based on various criteria like location of development, staleness, feasability (mass transit), etc.
* Find a quiet place to sit and edit.
* Break down area to be surveyed into walkable pieces for teams.
* Print Field Papers.

## Map Fixing for Individuals

* Find map bugs and generate a bikable or walkable path to cover these points.
* It should be a max bang for your buck type of optimization (use pgrouting).
* Incorporate mobile apps like StreetComplete and OSMBugs.

# Use

* Feature flags - pda/flip, fetlife/rollout
* Internationalization

# Ideas

* nanocosm
* Map of user groups around the world http://usergroups.openstreetmap.de/
* DC Wiki - How do we do x? e.g. sidewalks

# See Also

* https://wiki.openstreetmap.org/wiki/User_group
* https://github.com/maptime/maptime.github.io/blob/master/_data/chapters.json
* https://wiki.openstreetmap.org/wiki/User:Mvexel/New_User_Welcome_Message
* https://www.wmata.com/schedules/timetables/all-routes.cfm?State=DC
* https://github.com/fossgis/usergroups-bot - This is a bot written in Python, collection all Template:User_group together and generating a KML file to show them on a map: http://usergroups.openstreetmap.de

# Integration

* https://github.com/kort/kort
* StreetComplete


6 changes: 6 additions & 0 deletions Gemfile
Expand Up @@ -131,6 +131,9 @@ gem "aws-sdk-s3"
# Used to resize user images
gem "mini_magick"

# Used to provide clean urls like /microcosm/mappingdc
gem "friendly_id"

# Gems useful for development
group :development do
gem "annotate"
Expand All @@ -142,6 +145,9 @@ end

# Gems needed for running tests
group :test do
gem "cucumber-rails", :require => false
# database_cleaner is not required, but highly recommended
gem "database_cleaner"
gem "fakefs", :require => "fakefs/safe"
gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
gem "rails-controller-testing"
Expand Down
37 changes: 36 additions & 1 deletion Gemfile.lock
Expand Up @@ -76,6 +76,7 @@ GEM
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2)
backports (3.15.0)
better_errors (2.5.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
Expand Down Expand Up @@ -132,14 +133,38 @@ GEM
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
cucumber (3.1.2)
builder (>= 2.1.2)
cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.2.1)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (~> 5.0)
cucumber-expressions (6.0.1)
cucumber-rails (1.8.0)
capybara (>= 2.12, < 4)
cucumber (>= 3.0.2, < 4)
mime-types (>= 2.0, < 4)
nokogiri (~> 1.8)
railties (>= 4.2, < 7)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
dalli (2.7.10)
database_cleaner (1.7.0)
debug_inspector (0.0.3)
deep_merge (1.2.1)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
delayed_job_active_record (4.1.4)
activerecord (>= 3.0, < 6.1)
delayed_job (>= 3.0, < 5)
diff-lcs (1.3)
docile (1.3.2)
dry-configurable (0.8.3)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -193,10 +218,13 @@ GEM
ffi (1.11.1)
ffi-libarchive (0.4.10)
ffi (~> 1.0)
friendly_id (5.2.5)
activerecord (>= 4.0.0)
fspath (3.1.2)
gd2-ffij (0.4.0)
ffi (>= 1.0.0)
geoip (1.6.4)
gherkin (5.1.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashdiff (1.0.0)
Expand Down Expand Up @@ -252,13 +280,17 @@ GEM
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mimemagic (0.3.3)
mini_magick (4.9.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.12.2)
msgpack (1.3.1)
multi_json (1.13.1)
multi_test (0.1.2)
multi_xml (0.6.0)
multipart-post (2.1.1)
nio4r (2.5.2)
Expand Down Expand Up @@ -463,14 +495,17 @@ DEPENDENCIES
composite_primary_keys (~> 11.1.0)
config
coveralls
cucumber-rails
dalli
database_cleaner
delayed_job_active_record
dynamic_form
erb_lint
factory_bot_rails
fakefs
faraday
ffi-libarchive
friendly_id
gd2-ffij (>= 0.4.0)
geoip
htmlentities
Expand Down Expand Up @@ -524,4 +559,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
1.17.2
1.17.3
9 changes: 9 additions & 0 deletions app/abilities/ability.rb
Expand Up @@ -28,6 +28,8 @@ def initialize(user)
can [:history, :version], OldNode
can [:history, :version], OldWay
can [:history, :version], OldRelation
can [:index, :show, :show_events, :show_members], Microcosm
can [:show, :index], Event
end

if user
Expand All @@ -42,6 +44,11 @@ def initialize(user)
can [:new, :create], Report
can [:mine, :new, :create, :edit, :update, :delete], Trace
can [:account, :go_public, :make_friend, :remove_friend], User
can [:create, :update], EventAttendance
can [:edit, :update], Microcosm, :microcosm_members => { :user => { :id => user.id }, :role => MicrocosmMember::Roles::ORGANIZER }
can [:create], MicrocosmMember
can [:edit, :update], MicrocosmMember, :microcosm => { :microcosm_members => { :user => { :id => user.id }, :role => MicrocosmMember::Roles::ORGANIZER } }
can [:new, :create], Event, :microcosm => { :microcosm_members => { :user => { :id => user.id }, :role => MicrocosmMember::Roles::ORGANIZER } }

if user.moderator?
can [:hide, :hidecomment], DiaryEntry
Expand All @@ -57,6 +64,8 @@ def initialize(user)
can :create, IssueComment
can [:set_status, :delete, :index], User
can [:grant, :revoke], UserRole
can [:new, :create, :update], Microcosm
can [:edit, :update], MicrocosmMember
end
end
end
Expand Down
Binary file added app/assets/images/dc_library.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/microcosm_dc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions app/assets/stylesheets/common.scss
Expand Up @@ -2915,3 +2915,10 @@ input.richtext_title[type="text"] {
}
}
}

.flex_row {
display: flex;
div {
padding: 10px;
}
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/event_attendances.scss
@@ -0,0 +1,3 @@
// Place all the styles related to the EventAttendances controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
23 changes: 23 additions & 0 deletions app/assets/stylesheets/events.scss
@@ -0,0 +1,23 @@
// Place all the styles related to the Events controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/

.event_details {
.when {
color: #777; font-size: 120%;
}
}

.event_attendees > a {
display: block;
width: 8em;
height: 8em;
border: 1px solid #888;
border-radius: 4px;
float: left;
margin: 1em;
padding: 1em;
background-color: rgb(238, 238, 238);
box-sizing: border-box;
text-decoration: none;
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/microcosm_member.scss
@@ -0,0 +1,3 @@
// Place all the styles related to the MicrocosmMember controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/

0 comments on commit d913ca9

Please sign in to comment.