Skip to content

Commit

Permalink
Merge pull request #98 from JannisHoch/dev
Browse files Browse the repository at this point in the history
v0.0.5
  • Loading branch information
JannisHoch committed Oct 7, 2020
2 parents ccd5e09 + 27b2c00 commit dcb174e
Show file tree
Hide file tree
Showing 60 changed files with 2,425 additions and 1,418 deletions.
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

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
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at j.m.hoch@uu.nl. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,38 @@
# How to contribute

This python-package is a first outcome of an interdisciplinary project aimed at understanding the complex interplay between conflict and climate and environment.
As such, the presented code and functionalities can only be seen as a first step towards a fully-fledged model.
We therefore strongly encourage other users to contribute to this project!

## General notes

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project, the project owners, and users of the project.

## Getting Started

* Make sure you have a GitHub account.
* Fork the repository on GitHub.

## Making Changes

* Create a topic branch from where you want to base your work.
* This is usually the dev branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master, run `git checkout -b
fix/dev/my_contribution master`. Please avoid working directly on the
`dev` (or `master`) branch.
* Make commits of logical and atomic units. Write a [good commit message][commit]!
* Make sure you have added the necessary tests for your changes.

## Submitting Changes

* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the repository.
* The core team looks at pull requests as soon as possible, but no maximum waiting time can be given here.
* After feedback has been given we expect responses within two weeks. After two
weeks we may close the pull request if it isn't showing any activity.

[commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
57 changes: 38 additions & 19 deletions README.rst
Expand Up @@ -2,54 +2,63 @@
Overview
===============

The conflict_model
CoPro
----------------
(Machine learning) model for mapping environmental drivers of conflict risk.

.. image:: https://travis-ci.com/JannisHoch/conflict_model.svg?token=BnX1oxxHRbyd1dPyXAp2&branch=dev
Welcome to CoPro, a machine-learning tool for conflict risk projections based on climate, environmental, and societal drivers.

.. image:: https://travis-ci.com/JannisHoch/conflict_model.svg?branch=dev
:target: https://travis-ci.com/JannisHoch/conflict_model

.. image:: https://img.shields.io/badge/License-MIT-blue.svg
:target: https://github.com/JannisHoch/conflict_model/blob/dev/LICENSE
:target: https://github.com/JannisHoch/copro/blob/dev/LICENSE

.. image:: https://readthedocs.org/projects/copro/badge/?version=latest
:target: https://copro.readthedocs.io/en/latest/?badge=latest

.. image:: https://readthedocs.org/projects/conflict-model/badge/?version=dev
:target: https://conflict-model.readthedocs.io/en/dev/?badge=dev
.. image:: https://img.shields.io/github/v/release/JannisHoch/copro
:target: https://github.com/JannisHoch/copro/releases/tag/v0.0.5-pre

.. image:: https://img.shields.io/github/v/release/JannisHoch/conflict_model
:target: https://github.com/JannisHoch/conflict_model/releases/tag/v0.0.3
.. image:: https://zenodo.org/badge/254407279.svg
:target: https://zenodo.org/badge/latestdoi/254407279

.. image:: https://badges.frapsoft.com/os/v2/open-source.svg?v=103
:target: https://github.com/ellerbrock/open-source-badges/

Installation
----------------

To install the conflict model, first clone the code from GitHub. It is advised to create an individual python environment first.
To install copro, first clone the code from GitHub. It is advised to create an individual python environment first.
You can then install the model package into this environment.

.. code-block:: console
$ git clone https://github.com/JannisHoch/conflict_model.git
$ cd path/to/conflict_model
$ git clone https://github.com/JannisHoch/copro.git
$ cd path/to/copro
$ conda env create -f environment.yml
$ conda activate conflict_model
$ conda activate copro
$ python setup.py develop
Execution
----------------

To be able to run the model, the conda environment has to be activated first.

.. code-block:: console
$ conda activate copro
Example notebook
^^^^^^^^^^^^^^^^^^

To run the example jupyter notebook, follow these instructions
There are jupyter notebooks available to guide you through the model application process.
They can all be run and converted to htmls by executing the provided shell-script.

.. code-block:: console
$ cd path/to/conflict_model/example
$ cd path/to/copro/example
$ sh run.sh
This automatically executes the notebook and converts it to a html-file, also stored in the example folder.

It is of course also possible to execute the notebook cell by cell using jupyter notebook.

Runner script
Expand All @@ -60,16 +69,26 @@ All data and settings are retrieved from the settings-file which needs to be pro

.. code-block:: console
$ cd path/to/conflict_model/scripts
$ python runner.py path/to/conflict_model/data/run_setting.cfg
$ cd path/to/copro/scripts
$ python runner.py ../example/example_settings.cfg
By default, output is stored to the output directory specified in the settings-file.

Documentation
---------------

Model documentation including model API can be found at http://copro.rtfd.io/

Code of conduct and Contributing
---------------------------------

Please find the relevant information on our Code of Conduct and how to contribute to this package in the relevant files.

Authors
----------------

* Jannis M. Hoch (Utrecht University)
* Sophie de Bruin (Utrecht University, PBL)
* Niko Wanders (Utrecht University)

Corrosponding author: Jannis M. Hoch (j.m.hoch@uu.nl)
Corrosponding author: Jannis M. Hoch (j.m.hoch@uu.nl)

0 comments on commit dcb174e

Please sign in to comment.