Skip to content
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

Add more & easier "Environment" to bug template, and other tweaks #682

Merged
merged 3 commits into from
Jan 16, 2020

Conversation

huonw
Copy link
Member

@huonw huonw commented Jan 15, 2020

This tweaks the issue template in a few ways:

  • renames "Desktop" to "Environment" and add a request for Python and package versions
  • adds some code that can automatically compute the above information
  • introduces "Observed Behaviour" which asks for specific information about the output, since this is really important to be sure we're debugging the right thing (I think this was somewhat suggested by "Screenshots", but not entirely)
  • folds the "data" and "screenshots" section into "Additional Context", since hopefully the rest of the description is enough to understand the bug

This is prompted by noticing some bugs that don't have as much info as would be helpful, so hopefully this serves as somewhat of a simplification.

@codeclimate
Copy link

codeclimate bot commented Jan 15, 2020

Code Climate has analyzed commit 46a5efb and detected 0 issues on this pull request.

View more on Code Climate.

@huonw
Copy link
Member Author

huonw commented Jan 15, 2020

On my machine, the code snippet gives output like:

Operating system: Darwin-18.6.0-x86_64-i386-64bit
Python version:

3.6.9 (default, Jul 10 2019, 12:25:55) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)]

Package versions:

absl-py==0.9.0
appdirs==1.4.3
appnope==0.1.0
astor==0.8.1
attrs==19.3.0
backcall==0.1.0
black==19.10b0
bleach==3.1.0
boto==2.49.0
boto3==1.10.45
botocore==1.13.45
cachetools==4.0.0
certifi==2019.11.28
chardet==3.0.4
Click==7.0
cloudpickle==1.2.2
coverage==4.5.4
coveralls==1.10.0
cycler==0.10.0
decorator==4.4.1
defusedxml==0.6.0
docopt==0.6.2
docutils==0.15.2
doit==0.31.1
entrypoints==0.3
gast==0.2.2
gensim==3.8.1
google-auth==1.10.0
google-auth-oauthlib==0.4.1
google-pasta==0.1.8
grpcio==1.26.0
h5py==2.10.0
idna==2.8
import-deps==0.1.0
importlib-metadata==1.3.0
ipykernel==5.1.3
ipython==7.11.1
ipython-genutils==0.2.0
ipywidgets==7.5.1
isodate==0.6.0
jedi==0.15.2
Jinja2==2.10.3
jmespath==0.9.4
joblib==0.14.1
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.0.0
jupyter-core==4.6.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
kiwisolver==1.1.0
llvmlite==0.30.0
MacFSEvents==0.8.1
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.1.2
mistune==0.8.4
more-itertools==8.0.2
mplleaflet==0.0.5
nbconvert==5.6.1
nbformat==4.4.0
networkx==2.4
notebook==6.0.2
numba==0.46.0
numpy==1.18.0
oauthlib==3.1.0
opt-einsum==3.1.0
packaging==19.2
pandas==0.25.3
pandocfilters==1.4.2
parso==0.5.2
pathspec==0.7.0
pexpect==4.7.0
pickleshare==0.7.5
pluggy==0.13.1
prometheus-client==0.7.1
prompt-toolkit==2.0.10
protobuf==3.11.2
ptyprocess==0.6.0
py==1.8.1
py-cpuinfo==5.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.7
Pygments==2.5.2
pyparsing==2.4.6
pyrsistent==0.15.6
pytest==5.3.1
pytest-benchmark==3.2.2
pytest-cov==2.8.1
pytest-incremental==0.5.0
python-dateutil==2.8.1
python-igraph==0.7.1.post6
pytz==2019.3
pyzmq==18.1.1
qtconsole==4.6.0
rdflib==4.2.2
regex==2020.1.8
requests==2.22.0
requests-oauthlib==1.3.0
rsa==4.0
s3transfer==0.2.1
scikit-learn==0.22
scipy==1.4.1
seaborn==0.9.0
Send2Trash==1.5.0
six==1.13.0
smart-open==1.9.0
-e git+git@github.com:stellargraph/stellargraph.git@76bf573f8ea829e204b745c6b629a42a35c66668#egg=stellargraph&subdirectory=../../../stellargraph-4
tensorboard==2.0.2
tensorflow==2.0.0
tensorflow-estimator==2.0.1
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
toml==0.10.0
tornado==6.0.3
traitlets==4.3.3
treon==0.1.3
typed-ast==1.4.1
urllib3==1.25.7
wcwidth==0.1.8
webencodings==0.5.1
Werkzeug==0.16.0
widgetsnbextension==3.5.1
wrapt==1.11.2
zipp==0.6.0

@huonw huonw requested a review from timpitman January 15, 2020 22:24
@huonw huonw marked this pull request as ready for review January 15, 2020 22:28
timpitman
timpitman previously approved these changes Jan 16, 2020
Copy link
Contributor

@timpitman timpitman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of making it easier to capture diagnostic information from users (to be seen whether it gets uptake!). The script worked for me on Mac and Xubuntu Linux.

packages=subprocess.run(["pip", "freeze"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode("utf-8")
print("""Operating system: `{}`
Python version:
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the multiline string constant here could be compressed substantially into fewer lines to make this more compact?

Copy link
Member Author

@huonw huonw Jan 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the multiline string constant here could be compressed substantially into fewer lines to make this more compact?

I considered this, but I thought that users may appreciate being able to understand the code more easily, since we're asking them to run code on their machine... however, now that I think about it, a user is presumably already running our code (in the form of the library itself), so it's probably fine. I've switched to a more compact form, and added a suggestion that it can be run in a jupyter notebook too.

also should we consider something that will run on python2 (just-in-case?!)

Good idea, I've switched to using Popen in a way that seems to work on Python 2 and 3.

Copy link
Contributor

@timpitman timpitman Jan 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had second thoughts about the python2 support; would need an additional from __future__ import print_function which is probably a waste

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok, because it's a single argument the parens are just grouping (i.e. (x) is the same as x).

.github/ISSUE_TEMPLATE/bug_report.md Show resolved Hide resolved
packages=subprocess.run(["pip", "freeze"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode("utf-8")
print("""Operating system: `{}`
Python version:
```
Copy link
Contributor

@timpitman timpitman Jan 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had second thoughts about the python2 support; would need an additional from __future__ import print_function which is probably a waste

@huonw huonw requested a review from timpitman January 16, 2020 03:56
@huonw huonw merged commit 8a1c366 into develop Jan 16, 2020
@huonw huonw deleted the feature/improved-bug-template branch January 16, 2020 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants