-
Notifications
You must be signed in to change notification settings - Fork 868
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 codespace container for reproducing issues #3537
Conversation
Also to answer your @janosh question in #3536 that:
My idea is to keep the issue template clean (and it is not a tutorial at the end of the day), and make codespace optional (instead of "pushing" codespace to users). However it occurs to me that it might be better to move the guidance figure into the issue template, and put the introductory stuff into the repro template (if the use follows the figure and open up the codespace, the repro template would be presented)? In doing this we could avoid an extra readme file. What do you think? Again I'm really sorry for messing around with the commit history. But after one hour's experiment I'm now much more confident with git workflow (Just realize could rewrite commit history so reopen a PR is not necessary). Thanks. |
add repro template add codespace guide include link to guide in issue template
yes exactly, i think avoiding an extra readme file which many people might miss would be nice. could you make that change? |
Done @janosh. I merged the separate guide README.md into the issue template (folded by default to minimize disturbance to the template overall). Let me know if you would like to see more changes. |
<details> | ||
<summary>🚀 Click to Show the Codespaces Guide</summary> | ||
<img width="300" alt="Create codespace" src="https://github.com/materialsproject/pymatgen/assets/80093591/482181f8-d7e1-49b4-8382-2d948ed4e550"> | ||
|
||
1. Open up the [pymatgen repo](https://github.com/materialsproject/pymatgen) in your web browser. | ||
2. Click the green `Code` button at the top-right corner of the repo, and switch to the `Codespaces` panel. | ||
3. Click `Create code space on master` to create a new codespace, or to return to an existing codespace. | ||
</details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than this multistep process, can we not just show an SVG badge with a deeplink to open a new codespace? see Open in GitHub Codespaces docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janosh Wonderful suggestion! Thanks and implemented.
Python only uses 1 CPU anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DanielYang59! In devcontainer.json
, I decreased hostRequirements.cpus: 4->1
since Python only uses 1 CPU anyway. Unless I'm missing something?
@janosh It seems you might have left the outputs inside the repro template ipynb?
Also the I wouldn't create a PR just for this on my side. Thanks! |
… by adding &labels=bug&template=bug_report.yaml as suggested in #3537 (comment)
Thanks @DanielYang59, good catch! 👍 |
… by adding &labels=bug&template=bug_report.yaml as suggested in materialsproject#3537 (comment)
Tasks finished to resolve #2753 (#3536 is messed up):
However I still need advice on handling user feedbacks, as I failed to identify any way to create a link or share a snapshot to an existing codespace, as @janosh suggested.
The closest I could find currently is the Live Share, which allows multiple users to work on a single codespace in real-time. But I don't think this is what we're looking for though. This would require the user to publicly share a link to a codespace and might have security risks.
So far the best solution to me still remains to run the code in the codespace, and paste the output back to the issue manually (until a feature such as sharing a codespace snapshot is out). In doing so, we could help pre-configure the reproduction environment and information collection mechanisms, also avoiding all sorts of non-pymatgen issues (python not installed properly, outdated pymatgen or dependency, and so on).