openjournals / joss-reviews

Reviews for the Journal of Open Source Software
Creative Commons Zero v1.0 Universal
701 stars 36 forks source link

[REVIEW]: CoPro: a data-driven model for conflict risk projections #2855

Closed whedon closed 3 years ago

whedon commented 3 years ago

Submitting author: @JannisHoch (Jannis Hoch) Repository: https://github.com/JannisHoch/copro Version: v0.0.5 Editor: @sbenthall Reviewer: @soodoku, @sbenthall Archive: 10.5281/zenodo.4548904

:warning: JOSS reduced service mode :warning:

Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in our blog post.

Status

status

Status badge code:

HTML: <a href="https://joss.theoj.org/papers/1f03334e56413ff71f65092ecc609aa4"><img src="https://joss.theoj.org/papers/1f03334e56413ff71f65092ecc609aa4/status.svg"></a>
Markdown: [![status](https://joss.theoj.org/papers/1f03334e56413ff71f65092ecc609aa4/status.svg)](https://joss.theoj.org/papers/1f03334e56413ff71f65092ecc609aa4)

Reviewers and authors:

Please avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) by leaving comments in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)

Reviewer instructions & questions

@soodoku & @sbenthall, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:

  1. Make sure you're logged in to your GitHub account
  2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations

The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let @sbenthall know.

Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest

Review checklist for @soodoku

Conflict of interest

Code of Conduct

General checks

Functionality

Documentation

Software paper

Review checklist for @sbenthall

Conflict of interest

Code of Conduct

General checks

Functionality

Documentation

Software paper

whedon commented 3 years ago

Hello human, I'm @whedon, a robot that can help you with some common editorial tasks. @soodoku, @sbenthall it looks like you're currently assigned to review this paper :tada:.

:warning: JOSS reduced service mode :warning:

Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in our blog post.

:star: Important :star:

If you haven't already, you should seriously consider unsubscribing from GitHub notifications for this (https://github.com/openjournals/joss-reviews) repository. As a reviewer, you're probably currently watching this repository which means for GitHub's default behaviour you will receive notifications (emails) for all reviews 😿

To fix this do the following two things:

  1. Set yourself as 'Not watching' https://github.com/openjournals/joss-reviews:

watching

  1. You may also like to change your default settings for this watching repositories in your GitHub profile here: https://github.com/settings/notifications

notifications

For a list of things I can do to help you, just type:

@whedon commands

For example, to regenerate the paper pdf after making changes in the paper's md or bib files, type:

@whedon generate pdf
sbenthall commented 3 years ago

@soodoku Sorry for the delay on starting the review. Now the review has started, and you can see the checklist on this issue.

whedon commented 3 years ago
Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1177/0022343317691330 is OK
- 10.1177/0022343316682065 is OK
- 10.1177/0022343316682064 is OK

MISSING DOIs

- 10.1126/science.aal4483 may be a valid DOI for title: Predicting armed conflict: Time to adjust our expectations?
- 10.1088/1748-9326/11/5/054002 may be a valid DOI for title: Forecasting civil conflict along the shared socioeconomic pathways

INVALID DOIs

- None
whedon commented 3 years ago

:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:

whedon commented 3 years ago

:wave: @soodoku, please update us on how your review is going.

whedon commented 3 years ago

:wave: @sbenthall, please update us on how your review is going.

JannisHoch commented 3 years ago

HI @soodoku and @sbenthall, in the meantime, the model evolved to version 0.0.6 (https://github.com/JannisHoch/copro/releases/tag/v0.0.6). All changes made in the process of this review will be committed to the branch 'joss-review' (https://github.com/JannisHoch/copro/tree/joss_review).

soodoku commented 3 years ago

i am done w/ my review.

sbenthall commented 3 years ago

I apologize for the delay in my review. There have been some personal issues on my end that have needed extra attention. I'm proceeding with my review now.

sbenthall commented 3 years ago

I think this is terribly exciting and I am eager to see it published in the best form possible. To that end:

I have not yet completed reviewing the code--these are first impressions of the document and paper only. But I think these improvements to the writeup and documentation are important for the publication.

sbenthall commented 3 years ago

When I get to the sh run.sh part of the instructions in the README, I get the following error:

https://gist.github.com/sbenthall/83de0ce8675283c01d3f3fa973dc6f38

JannisHoch commented 3 years ago

Hi @sbenthall, Absolutely no problem!

From your comments I assume you were not looking at the most recent version of the model. For instance, in the joss-review branch (https://github.com/JannisHoch/copro/tree/joss_review), there is no file run.sh anymore. It is renamed to 'run_notebooks.sh' for running the jupyter notebooks, and 'runscript*.sh' for executing the command line scripts.

If your problems still occur after installing the latest copro version, please let me know. thanks :)

JannisHoch commented 3 years ago

in f9326d36bcbf20e93a54e6ea5733f1ae515f4477 I have added notes that the model was developed and tested with anaconda/miniconda.

JannisHoch commented 3 years ago

regarding your question of other state-of-the-art software: to my knowledge, there is no freely available software model with such an extensive documentation out there. of course there is model code as supplement to a publication, and publications covering similar approaches (see the references in the joss manuscript), but not in a 'structured' way like done for CoPro.

JannisHoch commented 3 years ago

I also have added a bit more technical detail to the JOSS manuscript. based on the review of @soodoku, the model goal and purpose were made clearer in the README and in the documentation.

sbenthall commented 3 years ago

Hello. Apologies for the further delay. I've had to take some family leave but am now back to work. I'll look at the branch you've referenced; sorry to miss it the first time.

sbenthall commented 3 years ago

I am being held up by some local Python environment issues. (The rasterio dependency is not installing properly.) I'm pretty sure this is just a problem on my end! I'll try to repair my environment setup and get back to you.

JannisHoch commented 3 years ago

@sbenthall, first of all, good to hear you're back!

Could you maybe attach a screenshot or so for me to look into it?

And I assume you were using the yml file to create the environment?

sbenthall commented 3 years ago

This is the stack trace. https://gist.github.com/sbenthall/5edad4e128fea79a99c2486ab6333bfe Googling for it makes it look like a local python issue. I'll keep kicking at it.

sbenthall commented 3 years ago

Hmm. So what's strange here is that conda install rasterio==1.1.0 works fine, but then I get an error when it installs again via pip install -e ..

I wonder if the conda version is conflicting with the pip version somehow (the pip version is invoked in the setup.py file.)

sbenthall commented 3 years ago

Commenting out the rasterio dependency in setup.py and rerunning the pip installation gets me this error:

https://gist.github.com/sbenthall/6a7f135970232dad08eb65ecebfd97cf

sbenthall commented 3 years ago

I do notice that rasterio installation instructions look like they require a number of other GDAL related packages, which in the rasterio installation instructions are listed as separate steps.

https://rasterio.readthedocs.io/en/latest/

I wonder if you could confirm that your instructions for CoPro, as written, work on a fresh system that does not have these GDAL packages installed. It is quite likely that these are being handled correctly by Anaconda and there's some issue going on locally, but if you could test on another machine that would be additional confirmation that it's a local issue and not a problem with the installation instructions.

JannisHoch commented 3 years ago

Hmmm, this all sounds pretty odd to me.

I have never seen any of the error messages before when installing copro - neither the one when running pip install -e . (as it seems that rasterio is correctly installed from cache and the error occurs bit later somehow), nor the one with altered setup.py file (which is a permission error after all if I get it right?).

Also, I was able to install copro (branch joss_review) on a pretty 'fresh' Linux environment.

So yes, it may be that it's a local issue. I have two ideas:

JannisHoch commented 3 years ago

Or, as another possible fix, specify a more recent rasterio version? current one is 1.1.8. maybe there are some flaws in version 1.1.0 for some specific circumstances.

sbenthall commented 3 years ago

Good news. I've got the install working. Sorry about that.

Now I'm trying to test the library. Tiny snag: downloading the demo data and putting it in the right place so that the .cfg files can find it requires a little trial and error for me at the moment.

Certainly not a dealbreaker but some scripting around that would be nice.

I'll continue my review over the weekend -- it should be done by Monday. Thanks for your patience on this--I know it's been a long wait.

JannisHoch commented 3 years ago

great to hear - i am curious, what exactly was the problem?

so the 'download_example_data.sh' does not what it's supposed to do? guess i'll here that from you soon. but to not slow down the review process, i could also send you the example data via mail?

looking forward to the remaining review!

sbenthall commented 3 years ago

so the 'download_example_data.sh' does not what it's supposed to do?

oh! I didn't see this. It is not mentioned in the README --- it just says the data is on Zenodo. So I fetched it by hand...

sbenthall commented 3 years ago

https://copro.readthedocs.io/en/latest/examples/nb02_XY_data.ipynb.html 4.2.2.2. "Assing" -> "Assign"

sbenthall commented 3 years ago

I see your example notebooks use %matplotlib inline. I believe more recent versions of Jupyter have made this unnecessary.

sbenthall commented 3 years ago

As you direct users to use your Jupyter notebook examples, it would be helpful if you referred them to instructions for setting up their Jupyter notebooks to be able to use the conda environment as a kernel. e.g.

https://medium.com/@nrk25693/how-to-add-your-conda-environment-to-your-jupyter-notebook-in-just-4-steps-abeab8b8d084

sbenthall commented 3 years ago

nb01 cell [5] I'm getting the following error:

conflict_gdf, extent_gdf, selected_polygons_gdf, global_df = selection.select(config, out_dir, root_dir) https://gist.github.com/sbenthall/24da689b34fef8fc2ef9e16b99027215

nb02 cell 3 I'm getting the following error: conflict_gdf = gpd.read_file('conflicts.shp') selected_polygons_gdf = gpd.read_file('polygons.shp') https://gist.github.com/sbenthall/d8a722add82fa013d3779e39953773fe

....

I see now that these shapefiles are created by n01 in normal operation, and that the run_notebooks.sh script cleans these out. But I'm not deep enough in to know why nb01 is failing when ran manually.

....

I know it's hard to get the tooling around this perfectly but I think with a little more documentation the initial user experience would be more idiot-proof.

JannisHoch commented 3 years ago

hi @sbenthall ,

thanks for your comments. Regarding the first three, I will change them asap.

Regarding the last, few commetns from my side.

JannisHoch commented 3 years ago

I have added rtree and ipykernel to the environment.yml file, so hope that a) writing the files in nb01 works now, and b) adding the copro-environmen to your jupyter kernel is possible.

Also, I have fixed the typo, added info about the download_example_data.sh file in README.md, and placed contextual info on the execution of the notebooks there as well.

sbenthall commented 3 years ago

Ok, just tried the .sh scripts version of working README.

I ran sh run_script_reference.sh no problem.

Then with sh run_script_projections.sh I got this error:

https://gist.github.com/sbenthall/11fdd17af6f690c13933383e504eac50

JannisHoch commented 3 years ago

hi @sbenthall, I am again stligthly puzzled about the errror you get. If I run the scripts in the 'joss_review' branch (which is the one under review I guess?), I don't get any issues at all. Also, I get different console output than you.

sure you use the right branch?

JannisHoch commented 3 years ago

dear @sbenthall , hope you are doing well. I am just curious how the review process is going on your side. Not wanna be pushy as I know that this work is voluntary and Covid-19 is not doing any good either... Since I want to use the code in a manuscript, I'd very much appreciate it if there could be a citable version of the code until then. Thanks! Looking forward to any new bugs you find. Jannis

sbenthall commented 3 years ago

I apologize again for the delay. We had a baby in December. I'm double checking this today

sbenthall commented 3 years ago

I'm using the joss_review branch and am getting the same error.

What is your output for that script?

JannisHoch commented 3 years ago

that's great news, congrats!

i am bit puzzled by your error message, or more precisely by the console output you get. it does not look like anything i get when using the joss_review branch with the cfg-files as is plus the downloaded example data. it seems like you getting debug output, but not the one i get using the joss_review branch. that is what makes me assume that there is something odd about your model exeuction, but cannot pinpoint what it is.

did you alter any of the files by any chance? maybe good if you could send me the cfg-files you use if the error persists?

sbenthall commented 3 years ago

I'll try a fresh install

sbenthall commented 3 years ago

It works! Thanks for your patience. This passes review and we'll proceed to the next stage.

sbenthall commented 3 years ago

@whedon check references

sbenthall commented 3 years ago

@whedon generate pdf

JannisHoch commented 3 years ago

@sbenthall so what was the magic trick? anything i can add to the package to make the installation bullet-proof?

whedon commented 3 years ago

:point_right::page_facing_up: Download article proof :page_facing_up: View article proof on GitHub :page_facing_up: :point_left:

whedon commented 3 years ago
Reference check summary (note 'MISSING' DOIs are suggestions that need verification):

OK DOIs

- 10.1177/0022343317691330 is OK
- 10.1177/0022343316682065 is OK
- 10.1177/0022343316682064 is OK

MISSING DOIs

- 10.1126/science.aal4483 may be a valid DOI for title: Predicting armed conflict: Time to adjust our expectations?
- 10.1088/1748-9326/11/5/054002 may be a valid DOI for title: Forecasting civil conflict along the shared socioeconomic pathways

INVALID DOIs

- None
sbenthall commented 3 years ago

It was likely just human error initially. Don't worry about it.

Next steps:

This is the final editing stage.

JannisHoch commented 3 years ago

am i supposed to push any changes to the joss_review branch or how does this work?

sbenthall commented 3 years ago

If you have edits to the paper, then yes, that's right.

When it's absolutely finalized, you tag it.

sbenthall commented 3 years ago

Yeah, those DOI's Whedon pointed out should be added to the joss .bib file