-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JOSS Review] Code and examples #30
Comments
All requested Code changes were implemented in 50110d9 I have also slightly adapted the tests. |
Imports were fixed in 543ae78
All paths were edited and data was added to the test folder in 1954775 and 4b29bca
The respective code was removed in 1954775
The semicolons were removed in 253b74d
The notebook was adapted in ee3c30c
All plots were edited in 1954775 |
@nmstreethran I think I am done with your comments here. Feel free to have a look and thanks for bringing up some important points. |
@AlexanderJuestel I've had a quick look and everything looks good. Many thanks for addressing my comments! |
@AlexanderJuestel here are my comments on the code and examples.
openjournals/joss-reviews#6275
Code
I recommend linting
processing.py
for some suggestions on improving the code style. Here are three suggested changes:change the following to
shapes = list(zip(gdf_hd['geometry'], gdf_hd['HD']))
pyheatdemand/pyheatdemand/processing.py
Line 782 in 73f41fd
bare except should be avoided if possible
pyheatdemand/pyheatdemand/processing.py
Lines 963 to 964 in 73f41fd
these should use
if a not in b
instead ofif not a in b
pyheatdemand/pyheatdemand/processing.py
Line 513 in 73f41fd
pyheatdemand/pyheatdemand/processing.py
Line 656 in 73f41fd
pyheatdemand/pyheatdemand/processing.py
Line 1372 in 73f41fd
pyheatdemand/pyheatdemand/processing.py
Line 1441 in 73f41fd
Additionally, these two snippets seem to be identical. Is it possible to define it as a function for use in these two places to avoid code repetition?
pyheatdemand/pyheatdemand/processing.py
Lines 495 to 532 in 73f41fd
pyheatdemand/pyheatdemand/processing.py
Lines 638 to 675 in 73f41fd
Example notebooks
To import the library from the cloned repository, using
from pyheatdemand import processing
was sufficient. Usingsys
was not necessary (also did not work for me; I'm not using Windows though). In the example notebooks, thesys
path uses bothpyhd
andpyheatdemand
; all instances ofpyhd
should be fixed.The data paths used in the notebooks are inconsistent, e.g.
../../../data/
,../data/
, etc. I noticed that many of the datasets used are available in thetest
folder. Could you make use of these in the example notebooks? This will allow potential users to execute the notebooks themselves and reproduce the results.In some notebooks (for example,
02_Processing_Data_Type_I_Raster.ipynb
), the data was reprojected toepsg:3034
. However, subsequent code usesto_crs('EPSG:3034')
, which is redundant and can be removed.The semicolon in
show();
should be removed.In the notebook
14_Refining_Polygon_Mask.ipynb
, under 'Refining the mask', there's a cell with aTypeError
output that should be deleted.Some other suggestions for improvement are to include axis labels / titles / legends in as many plots as possible (where appropriate) as there are a lot of images in the notebooks and this will help with some context. For example, the histograms could use titles or axis labels, and the heat demand colour bars could use a legend title.
The text was updated successfully, but these errors were encountered: