-
Notifications
You must be signed in to change notification settings - Fork 13
Contribute: Update Wiki
We are glad you have something new to contribute to GAMER and are willing to teach others how to use it!
Before getting started, it’s recommended that you familiarize yourself with the basics of repository, branch, fork, action, and workflow.
The followings are the outline of this document:
In this document, "Wiki" refers to the Wiki page on the GitHub website, and "doc" stands for the markdown files located under gamer/doc/wiki
. Note that doc and Wiki are NOT always synchronized. You will need to use the action to copy content either from doc to Wiki or from Wiki to doc.
Here is the squence diagram for Wiki contribitions. You can select any of these three method to edit Wiki. See Edit Wiki for details.
sequenceDiagram
participant GAMER public version
participant doc
participant Wiki
participant local
GAMER public version->>doc: Fork
rect rgb(240,255,240)
rect rgb(200,250,200)
Note over doc,local: 1. Through gollum (recommended)
end
doc->>Wiki: Copy doc to Wiki
Wiki->>local: Clone
Note over local: Edit on gollum
local->>Wiki: Push
Wiki->>doc: Copy Wiki to doc
end
rect rgb(255,250,240)
rect rgb(250,235,215)
Note over doc,Wiki: 2. From GitHub website
end
doc->>Wiki: Copy doc to Wiki
Note over Wiki: Edit on Wiki
Wiki->>doc: Copy Wiki to doc
end
rect rgb(240,255,255)
rect rgb(200,255,255)
Note over doc,local: 3. On the local terminal
end
doc->>local: Clone
Note over local: Edit content using the local terminal
local->>doc: Push
doc->>Wiki: Copy doc to Wiki
Note over Wiki: Preview
end
doc->>GAMER public version: Pull request
This setup only needs to be done once (the first time) !!!
-
Check GAMER version
- Please make sure you have the latest GAMER.
-
Create the first page
- Click the Wiki page and create the first page.
-
Create a token for the action
- Go to
Settings
of your account >Developer settings
>Personal access tokens
>Generate new token (classic)
.- NOTE: We use the
Tokens (classic)
in this example.
- NOTE: We use the
- Please check the
repo
and theworkflow
options.- NOTE: You can set the
Note
of this token freely.
- NOTE: You can set the
- You might want to set the
Expiration
toNo expiration
. - Click the green
Generate token
at the bottom.
- Remember to save the token since it will only be shown once!
- Go to
-
Create the repository secret token and email
- Go to
Settings
of your forked gamer repository >Security
>Secrets and variables
>Actions
>Repository secrets
.
- Click
New repository secret
, and then you will see the following. Please replace<your_personal_access_token>
with the token generated in the previous step underSecret
and make sure theName
of the secret isTOKEN_FOR_WIKI
. ClickAdd secret
.
- Click
New repository secret
. Please replace<your_email_address>
with your account's email address underSecret
and make sure theName
of the secret isMY_EMAIL
. ClickAdd secret
.- NOTE: Your email address will remain private since it only exists in your repository. This step is only for recording your contribution by the action.
- Go to
-
Enable actions (workflows)
- Click
Actions
> click the green button.
- Click
-
Initialize Wiki
- Click
Actions
>Copy doc to wiki
>Run workflow
> ChooseBranch: main
> ClickRun workflow
. Once the workflow is complete, the Wiki will be updated to matchgamer/doc/wiki
on themain
branch.
- Click
We provide three methods for editing the Wiki pages: through gollum
(recommended), directly on the GitHub website, or via the local terminal. In the following examples, the new branch you would like to contribute to is referred to as new_contribution_branch
.
-
Through
gollum
(recommended)-
Install gollum.
-
Click
Actions
>Copy doc to wiki
>Run workflow
> ChooseBranch: new_contribution_branch
> ClickRun workflow
. Once the workflow is complete, the Wiki will be updated to matchgamer/doc/wiki
on thenew_contribution_branch
branch. -
Clone your forked Wiki git. You may find the Wiki URL at the bottom right of the Wiki page.
-
Edit by
gollum
.- NOTE: To use
gollum
for a branch other thanmaster
(e.g.,new_branch
), use the commandgollum --ref new_branch
. gollum --lenient-tag-lookup /path/to/wiki
- Open
http://localhost:4567
in your browser.
- NOTE: To use
-
Push your changes to the forked Wiki git.
-
Copy wiki to doc
This step is like
git push
to your branch.- Click
Actions
>Copy wiki to doc
>Run workflow
> ChooseBranch: new_contribution_branch
> ClickRun workflow
. Once the workflow is complete, the content ofgamer/doc/wiki
in thenew_contribution_branch
branch will be updated to match the latest Wiki pages.
- Click
-
-
From GitHub website
In this method, we treat the Wiki on GitHub as a local repository and use the workflow to replicate the pull and push behavior for the Wiki.
-
Copy doc to wiki
This step is like
git checkout new_contribution_branch
but for the GitHub Wiki website version.- Click
Actions
>Copy doc to wiki
>Run workflow
> ChooseBranch: new_contribution_branch
> ClickRun workflow
. Once the workflow is complete, the Wiki will be updated to matchgamer/doc/wiki
on thenew_contribution_branch
branch.
- Click
-
Edit directly on the GitHub Wiki website
See About wikis - GitHub Docs for more details.
-
Copy wiki to doc
This step is like
git push
to yournew_contribution_branch
branch.- Click
Actions
>Copy wiki to doc
>Run workflow
> ChooseBranch: new_contribution_branch
> ClickRun workflow
. Once the workflow is complete, the content ofgamer/doc/wiki
in thenew_contribution_branch
branch will be updated to match the latest Wiki pages.
- Click
-
-
On the local terminal
This process is similar to editing GAMER source code on the local terminal. The Wiki files are located in
gamer/doc/wiki
. After committing your changes to thenew_contribution_branch
branch and pushing them to GitHub, you can preview these changes on the Wiki pages by- Click
Actions
>Copy doc to wiki
>Run workflow
> ChooseBranch: new_contribution_branch
> ClickRun workflow
. Once the workflow is complete, the Wiki will be updated to matchgamer/doc/wiki
on thenew_contribution_branch
branch.
- Click
- Before filing a new PR, please ensure the following:
- All hyperlinks are functional.
- Images are clear.
- All related pages affected by this PR have been updated.
- File a PR to the public GAMER repository.
- NOTE: Contributions should be made through the files in
gamer/doc/wiki/
rather than the Wiki pages.
- NOTE: Contributions should be made through the files in
Getting Started
User Guide
- Installation
- Running the Code
- Adding New Simulations
- Runtime Parameters
- MPI and OpenMP
- GPU
- Physics Modules
- Outputs
- Simulation Logs
- Data Analysis
- In Situ Python Analysis
- Test Problems
- Troubleshooting
Advanced Topics
Developer Guide