Skip to content

Commit

Permalink
Merge pull request #1287 from hotosm/develop
Browse files Browse the repository at this point in the history
3.0.6: UI bugfixes and updates (merge develop into master)
  • Loading branch information
dakotabenjamin authored Dec 4, 2018
2 parents 6ab9826 + 780cd7f commit d126447
Show file tree
Hide file tree
Showing 12 changed files with 177 additions and 57 deletions.
82 changes: 82 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
(The latest version can be found at https://www.hotosm.org/code-of-conduct)

Welcome to Humanitarian OpenStreetMap Team. HOT is committed to providing a welcoming and safe environment for people of all races, gender identities, gender expressions, sexual orientations, physical abilities, physical appearances, socio-economic backgrounds, nationalities, ages, religions, and beliefs.

The HOT community principles are:

**Be friendly and patient.** Be generous and kind in both giving and accepting critique. Critique is a natural and important part of our culture. Good critiques are kind, respectful, clear, and constructive, focused on goals and requirements rather than personal preferences. You are expected to give and receive criticism with grace. Be considerate in speech and actions, and actively seek to acknowledge and respect the boundaries of fellow attendees.

**Be welcoming.** We strive to be a community that welcomes and supports people of all backgrounds and identities. Some examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language.

- Being respectful of differing viewpoints and experiences.

- Gracefully accepting constructive criticism.

- Showing empathy towards other community members.

- Placing collective interest before your own interest.

**Be considerate.** Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language.

**Be respectful.** Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. Members of the HOT community should be respectful when dealing with other members as well as with people outside the HOT community.

**Be careful in your word choice.** We are a global community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to:

- Violent threats or language directed against another person.

- Discriminatory jokes and language.

- Posting sexually explicit or violent material.

- Posting (or threatening to post) other people's personally identifying information ("doxing").

- Personal insults, especially those using racist or sexist terms.

- Unwelcome sexual attention.

- Advocating for, or encouraging, any of the above behavior.

- Repeated harassment of others. In general, if someone asks you to stop, then stop.

**Assume all communications are positive.** Always remain polite, and assume good faith. It is surprisingly easy to misunderstand each other, be it online or in person, particularly in such a culturally diverse setting as ours. Misunderstandings are particularly easy to arise when we are in a rush, or otherwise distracted. Please ask clarifying questions before assuming that a communication was inappropriate.

**When we disagree, try to understand why.** Disagreements, both social and technical, happen easily and often. It is important that we resolve such disagreements and differing views constructively. At times it can be hard to appreciate a viewpoint that contradicts your own perceptions. Instead of pushing back, try to understand where the other person is coming from, and don’t be afraid to ask questions. You can be most helpful if your own replies serve to clarify, rather than to escalate an issue. Also don’t forget that it can be easy to make mistakes, and allow for the possibility that the mistake may have been yours. When this happens it is better to resolve the issue together, and to learn from the experience together, than to place blame.


Original text courtesy of the [Speak Up! project](http://web.archive.org/web/20141109123859/http://speakup.io/coc.html).

Further sources:

- [Ada Initiative: HOWTO design a code of conduct for your community](https://adainitiative.org/2014/02/18/howto-design-a-code-of-conduct-for-your-community/)

- [Algorithm Club Code of Conduct](https://github.com/drtortoise/critical-algorithm-studies/blob/master/code-of-conduct.md)

- [American Red Cross GIS Team Code of Conduct](https://github.com/AmericanRedCross/team-code-of-conduct)

- [Contributor Covenant – A Code of Conduct for Open Source Projects](http://contributor-covenant.org/)

- [Django Code of Conduct](https://www.djangoproject.com/conduct/)

- [Mozilla Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/)

- [Vox Media Code of Conduct](http://code-of-conduct.voxmedia.com/)

## Complaint Handling Process

As a first measure, it is preferable to work out issues directly with the people involved, or to work with other Community Members who can help you resolve the issue. This may take several forms:

- Talk with one another. Assume that communications are positive and that people are treating each other with respect. Cues about emotions are often lacking from digital communications. Many of our modes of digital communication tend towards brevity, which can be easier to interpret incorrectly as being negative.

- Contact a representative of the [Community Working Group](https://www.hotosm.org/community/working-groups/), which exists to support the HOT Community. Representatives are available to discuss any concerns about behaviour within the community, or ideas to promote positive behaviours. You can email them at [[email protected]](mailto:[email protected]).

- Contact a representative of the [Governance Working Group](https://www.hotosm.org/community/working-groups/), which drafted these recommendations and the CoC. Representatives are available to provide advice on particular scenarios, as well as on the processes around the CoC.

- Contact the HOT Chair of Voting Members.

- Contact a [HOT Board Member](https://www.hotosm.org/board). Board members are well versed in the community and its management. They can offer advice on your particular situation, and know the resources of the organization that may be available to you.

- Contact the HOT Community Partnerships Manager.

When these informal processes fail, or when a situation warrants an immediate response by HOT, you can evoke the **HOT Policy and Code of Conduct Complaint Handling Process**. This process was adopted by HOT Voting Members in 2016 to provide a more formal means of enforcement for our community standards. You start it by emailing [[email protected]](mailto:[email protected]) with a description of your complaint, your name, and the name of the offending party. All complaints will be considered confidential. The full process is described [here](https://docs.google.com/document/d/1xb-SPADtSbgwl6mAgglHMPHpknt-E7lKRoIcSbW431A/edit)
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ look for categories that correspond to your skills, such as `UI` or `SysAdmin`.
## 3. How we structure pull requests and issue reviews

### Code and Project Leads
Project and code leads are experienced volunteer developers and the main points
Project and code leads are experienced HOT volunteer and staff developers and the main points
of contact for the project. They are also the final reviewers of issues and pull requests. Code leads
will review pull requests and provide feedback. The purpose of this role is to help contributors,
provide consistency and ensure code quality.

* Current code leads: Pierre Giraud (pgiraud) and Ethan Nelson (ethan-nelson)
* Current project lead: Blake Girardot (bgirardot)
* Current code leads: Ethan Nelson (ethan-nelson)
* Current project lead: Nate Smith (smit1678)

Issues and [roadmap development](https://github.com/hotosm/tasking-manager/projects/1) is overseen and discussed by the Tasking Manager Working Group. See [Working Group wiki page](https://github.com/hotosm/tasking-manager/wiki/TM-Working-Group-Meeting-Details) for details.

### Project Contributors

Expand Down
46 changes: 31 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# HOT tasking-manager

## Intro
The app is split into a Client (AngularJS) and Server (Python) structure. Each can be developed independently of each other. See below for instructions on how to set up your deve environment.
## Table of contents

1 [Intro](#Intro)

2 [Client Development](#ClientDevelopment)

3 [Server Development](#ServerDevelopment)

4 [Dev Ops](#DevOps)

5 [Localisation](#Localisation)

## <a name="Intro">Intro</a>
The app is split into a Client (AngularJS) and Server (Python) structure. Each can be developed independently of each other. See below for instructions on how to set up your dev environment.

[See our FAQ if you hit any problems getting setup](https://github.com/hotosm/tasking-manager/wiki/Dev-Environment-FAQ)

**Looking to get involved in development?** Check out the [Working Group meeting details](https://github.com/hotosm/tasking-manager/wiki/TM-Working-Group-Meeting-Details), review the [Roadmap](https://github.com/hotosm/tasking-manager/projects/1), and review our Contributor guidelines](https://github.com/hotosm/tasking-manager/blob/develop/CONTRIBUTING.md).

## Client Development
## <a name="ClientDevelopment">Client Development</a>
### Global Dependencies
Following must be available locally:

Expand All @@ -23,7 +36,7 @@ npm install
```

### Running Locally
If you plan to do client development you can run the app using gulp, without having to worry too much about the server. If you want to point the client at a non-local API (e.g. a staging environment), you'll have to change the environment config for development in client/taskingmanager.config.json.
If you plan to do client development you can run the app using gulp, without having to worry too much about the server. If you want to point the client at a non-local API (e.g. a staging environment), you'll have to change the environment config for development in `client/taskingmanager.config.json.

```
cd client [if not already in client]
Expand All @@ -38,7 +51,7 @@ The client has a suite of [Jasmine](https://jasmine.github.io/) Unit Tests, that
karma start ..\tests\client\karma.conf.js
```

## Server Development
## <a name="ServerDevelopment">Server Development</a>
### Dependencies
Following must be available locally:

Expand All @@ -56,7 +69,7 @@ Following must be available locally:
* ```.\devops\win\install.bat```

### Environment vars:
As the project is open source we have to keep secrets out of the repo. You will need to setup the following env vars locally:
As the project is open source, we have to keep secrets out of the repo. You will need to setup the following env vars locally:

* **TM_DB** - This is for the PostGIS connection string. If you can't access an existing DB refer to DevOps page to [set up a local DB in Docker](https://github.com/hotosm/tasking-manager/wiki/Dev-Ops#creating-a-local-postgis-database-with-docker)
* **TM_SECRET** - This is secret key for the TM app used by itsdangerous and flask-oauthlib for entropy
Expand All @@ -67,8 +80,8 @@ As the project is open source we have to keep secrets out of the repo. You will
* **TM_SMTP_USER** - The user for the SMTP server that is used to send email alerts
* **TM_SMTP_PASSWORD** - The password for the SMTP server that is used to send email alerts

* Linux/Mac
* (It is strongly recommended to set these within your .bash_profile so they are available to all processes )
* Linux/Mac:
* (It is strongly recommended to set these within your .bash_profile so they are available to all processes)
* ```export TM_DB=postgresql://USER:PASSWORD@HOST/DATABASE```
* ```export TM_SECRET=secret-key-here```
* ```export TM_CONSUMER_KEY=oauth-consumer-key-goes-here```
Expand All @@ -88,7 +101,7 @@ As the project is open source we have to keep secrets out of the repo. You will
* ```setx TM_SMTP_PASSWORD "smtp-server-password-here"```

### Creating the DB
We use [Flask-Migrate](https://flask-migrate.readthedocs.io/en/latest/) to create the database from the migrations directory. If you can't access an existing DB refer to DevOps page to [set up a local DB in Docker](https://github.com/hotosm/tasking-manager/wiki/Dev-Ops#creating-a-local-postgis-database-with-docker) Create the database as follows:
We use [Flask-Migrate](https://flask-migrate.readthedocs.io/en/latest/) to create the database from the migrations directory. If you can't access an existing DB refer to DevOps page to [set up a local DB in Docker](https://github.com/hotosm/tasking-manager/wiki/Dev-Ops#creating-a-local-postgis-database-with-docker) create the database as follows:

```
python manage.py db upgrade
Expand Down Expand Up @@ -123,18 +136,21 @@ The project includes a suite of Unit and Integration tests that you should run a
python -m unittest discover tests/server
```

## Dev Ops
## <a name="DevOps">Dev Ops</a>
If you encounter any issues while setting up a dev environment, please visit our [FAQ ❓ page](https://github.com/hotosm/tasking-manager/wiki/Dev-Environment-FAQ) to find possible solutions.


### Server Config

#### Environment Vars

On boot the Tasking Manager App will look for the following environment vars:

* **TM_ENV** - Allows you to specify which config to load from ./server/config.py Acceptable values:
* **Dev** - This is the default
* **Staging** - Use this for your staging/test environment
* **Prod** - Use this for your production environment
* **TM_ENV** - Allows you to specify which config to load from `./server/config.py`.
* Acceptable values:
* **Dev** - This is the default
* **Staging** - Use this for your staging/test environment
* **Prod** - Use this for your production environment

## Localisation
## <a name="Localisation">Localisation</a>
Please see the [Localisation Wiki](https://github.com/hotosm/tasking-manager/wiki/Localisation) for more details.
24 changes: 17 additions & 7 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
# Roadmap

## Plan
Tasking Manager development is overseen by the Tasking Manager Working Group. The working group consists of code contributors and project stakeholders and meets on a bi-weekly basis.

### 0-2 months
See [Working Group wiki page](https://github.com/hotosm/tasking-manager/wiki/TM-Working-Group-Meeting-Details) for meeting details.

## Roadmap Work Areas

The roadmap consists of seven work areas:
- Onboarding
- Task Prioritization
- Machine Learning guidance integration
- Team/project management
- Performance/scalability/usability improvements
- Validation improvements
- Metrics: Mapping and user stats

### Active
* Resolve performance and scalability issues
* Conduct user testing and a design review
* Resolve feature parity between TMv2 and TMv3
* Refactor frontend to React

### 2 - 4 months
### Work currently being planned
* Add groups/organizations for improved project and team management
* Add new analytics for users, projects, groups
* Add AI/ML integration for improved mapping efficiency

### 4 - 6 months
* Improved validation methods
* Data quality feedback, integrations

## Longer term ideas/directions

- Refactor frontend to React
- Address the overlap of TM and MapCampaigner functionalities, should they be separate tools
- Improve the connection between remote and field (not just API but workflow and engagement)
- Support moving from creating data in unmapped areas to updating areas with new imagery or information
Expand Down
9 changes: 9 additions & 0 deletions client/app/admin/create-project/create-project.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@
setUploadedFeatures(uploadedFeatures);
});
}
else if (file.name.substr(-3).toLowerCase() === 'osm') {
// Use the osmtogeojson.js library to read the osm (with GeoJSON as output)
var xml = (new DOMParser()).parseFromString(data, 'text/xml')
uploadedFeatures = geospatialService.getFeaturesFromGeoJSON(osmtogeojson(xml, {flatProperties: true}));
setUploadedFeatures(uploadedFeatures);
}
};
if (file.name.substr(-4).toLowerCase() === 'json') {
fileReader.readAsText(file);
Expand All @@ -356,6 +362,9 @@
else if (file.name.substr(-3).toLowerCase() === 'zip') {
fileReader.readAsArrayBuffer(file);
}
else if (file.name.substr(-3).toLowerCase() === 'osm') {
fileReader.readAsText(file);
}
else {
vm.isImportError = true;
vm.nonPolygonError = false;
Expand Down
17 changes: 2 additions & 15 deletions client/app/admin/create-project/create-project.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h4>{{ 'Step 1: Define Area' | translate }}</h4>
<dl>
<dt>Option 1:</dt>
<dd>
<p>Draw the Area of Interest on the map.</p>
<p>{{ 'Draw the Area of Interest on the map.' | translate }}</p>
<button class="button button--achromic" type="button"
ng-click="createProjectCtrl.drawAOI()"><span>{{ 'Draw' | translate }}</span>
</button>
Expand All @@ -59,7 +59,7 @@ <h4>{{ 'Step 1: Define Area' | translate }}</h4>
<dl>
<dt>Option 2:</dt>
<dd>
<p>{{ 'Import a GeoJSON, KML, or zipped SHP file.' | translate }}</p>
<p>{{ 'Import a GeoJSON, KML, OSM or zipped SHP file.' | translate }}</p>
<button class="button button--achromic"
ngf-select="createProjectCtrl.import($file)">{{ 'Import' | translate }}
</button>
Expand All @@ -71,7 +71,6 @@ <h4>{{ 'Step 1: Define Area' | translate }}</h4>
<strong>{{ 'Error' | translate }}:</strong> {{ 'Please provide a valid GeoJSON, KML or zipped Shapefile.' | translate }}
</p>
</div>

<div ng-show="createProjectCtrl.nonPolygonError"
class="alert alert--danger" role="alert">
<p>
Expand All @@ -84,18 +83,6 @@ <h4>{{ 'Step 1: Define Area' | translate }}</h4>
<strong>{{ 'Error' | translate }}:</strong> {{ 'The AOI contains self intersections' | translate }}
</p>
</div>

</div>
<div class="form__group form__group--section--sm">
<dl>
<dt>Option 3:</dt>
<dd>
<p>{{ 'Want to use an .osm file instead? You can use' | translate }} <a
href="http://geojson.io"
target="_blank" rel="noopener">GeoJSON.io</a>
{{ 'to convert it to GeoJSON.' | translate }}</p>
</dd>
</dl>
</div>
</form>
<div class="navigation-steps">
Expand Down
Loading

0 comments on commit d126447

Please sign in to comment.