From 2600f5e17e34cb2d40afcb845bdae73644171a55 Mon Sep 17 00:00:00 2001 From: Chad Mitchell Date: Wed, 4 Dec 2024 11:02:24 -0800 Subject: [PATCH 1/5] Update CONTRIBUTING instructions. Make PR template optional. --- .../pull_request_element_template.md | 35 ------------------- front_matter/contributing.md | 28 +++++++++++---- front_matter/pull_request_template.md | 35 ------------------- 3 files changed, 22 insertions(+), 76 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_element_template.md delete mode 100644 front_matter/pull_request_template.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_element_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_element_template.md deleted file mode 100644 index e85d857..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_element_template.md +++ /dev/null @@ -1,35 +0,0 @@ -Please remove any sensitive information (e.g., passwords, API keys) from your submission. -Please fill in the details for all of the relevant items below. -Thank you for taking the time to complete this PR. It will be reviewed as soon as possible. - -## Element name -Provide a proposed name for the lattice element. This can be an abbreviation, and should be at most 1-2 words (e.g., Quadrupole). - -## Element description -Provide a brief description of the lattice element. Please include: -- A clear and concise description of the element (1-2 sentences) -- How the element is typically used (e.g., class of accelerator, beam dynamics purpose) - -## List of element parameters -Provide a bulleted list of the element parameters. For each parameter, include: -- a short symbol to denote the parameter -- type of the parameter (integer, float, array of float, etc.) -- physical units of the parameter -- a brief phrase describing the parameter - -## Physical model -Provide a well-defined mathematical description of the element and its parameters. This may include equations, figures, etc. -This description should completely specify the element in an unambiguous form, and may include one of the following: -- equations describing the physical geometry -- equations describing the electromagnetic fields -- equations describing the dynamical transfer map - -## Alternative descriptions -If applicable, provide a description of similar widely-used elements or alternative parameter sets. -The purpose is to provide disambiguation and to provide criteria that may be used to aid in classification and grouping. - -## Additional information -If applicable, please provide any additional information that may be relevant, such as: -- Links to existing codes or implementations -- Any relevant technical requirements or specifications -- References to relevant publications or research diff --git a/front_matter/contributing.md b/front_matter/contributing.md index bbbf0f6..e50e147 100644 --- a/front_matter/contributing.md +++ b/front_matter/contributing.md @@ -5,12 +5,22 @@ Follow these steps **only once**: 2. Click the pulldown arrow next to `Fork`, click `Create a new fork`, and specify your GitHub username in the `Owner` field (e.g., "cemitch99"). -3. Click `Code` to view and copy the URL of your fork -(e.g., https://github.com/cemitch99/lattice-standard.git) +3. Go back to https://github.com/campa-consortium/lattice-standard and copy the url of the repo: +(e.g., https://github.com/campa-consortium/lattice-standard.git) -4. On your local machine, from the terminal, clone your fork: +4. On your local machine, from the terminal, clone the main repository: ``` -git clone https://github.com/cemitch99/lattice-standard.git +git clone https://github.com/campa-consortium/lattice-standard.git +``` + +5. Rename what we just cloned: call it "mainline": +``` +git remote rename origin mainline +``` + +6. Add your remote repository in order to track it locally: +``` +git remote add cemitch99 https://github.com/cemitch99/lattice-standard.git ``` Follow these steps **each time you submit a pull request**: @@ -19,6 +29,12 @@ Follow these steps **each time you submit a pull request**: cd lattice-standard ``` +2. Make sure your local repository is up-to-date: +``` +git checkout main +git pull +``` + 2. Create a new branch with a descriptive name for the desired changes (e.g., "add_template"): ``` git checkout -b add_template @@ -39,9 +55,9 @@ git add pull_request_element_template.md git commit -m "Add element template." ``` -7. Push your changes to the remote repository: +7. Push the changes to your fork remote repository: ``` -git push origin add_template +git push -u cemitch99 add_template ``` 8. Follow the link that is generated to open a new pull request on GitHub that includes these changes, e.g., go to https://github.com/cemitch99/lattice-standard/pull/new/add_template. diff --git a/front_matter/pull_request_template.md b/front_matter/pull_request_template.md deleted file mode 100644 index e85d857..0000000 --- a/front_matter/pull_request_template.md +++ /dev/null @@ -1,35 +0,0 @@ -Please remove any sensitive information (e.g., passwords, API keys) from your submission. -Please fill in the details for all of the relevant items below. -Thank you for taking the time to complete this PR. It will be reviewed as soon as possible. - -## Element name -Provide a proposed name for the lattice element. This can be an abbreviation, and should be at most 1-2 words (e.g., Quadrupole). - -## Element description -Provide a brief description of the lattice element. Please include: -- A clear and concise description of the element (1-2 sentences) -- How the element is typically used (e.g., class of accelerator, beam dynamics purpose) - -## List of element parameters -Provide a bulleted list of the element parameters. For each parameter, include: -- a short symbol to denote the parameter -- type of the parameter (integer, float, array of float, etc.) -- physical units of the parameter -- a brief phrase describing the parameter - -## Physical model -Provide a well-defined mathematical description of the element and its parameters. This may include equations, figures, etc. -This description should completely specify the element in an unambiguous form, and may include one of the following: -- equations describing the physical geometry -- equations describing the electromagnetic fields -- equations describing the dynamical transfer map - -## Alternative descriptions -If applicable, provide a description of similar widely-used elements or alternative parameter sets. -The purpose is to provide disambiguation and to provide criteria that may be used to aid in classification and grouping. - -## Additional information -If applicable, please provide any additional information that may be relevant, such as: -- Links to existing codes or implementations -- Any relevant technical requirements or specifications -- References to relevant publications or research From f7dfa94bb3da4abddfee53d7dff01ed8276505c8 Mon Sep 17 00:00:00 2001 From: Chad Mitchell Date: Wed, 4 Dec 2024 11:13:53 -0800 Subject: [PATCH 2/5] Fix template location. --- .github/pull_request_template.md | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..e85d857 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,35 @@ +Please remove any sensitive information (e.g., passwords, API keys) from your submission. +Please fill in the details for all of the relevant items below. +Thank you for taking the time to complete this PR. It will be reviewed as soon as possible. + +## Element name +Provide a proposed name for the lattice element. This can be an abbreviation, and should be at most 1-2 words (e.g., Quadrupole). + +## Element description +Provide a brief description of the lattice element. Please include: +- A clear and concise description of the element (1-2 sentences) +- How the element is typically used (e.g., class of accelerator, beam dynamics purpose) + +## List of element parameters +Provide a bulleted list of the element parameters. For each parameter, include: +- a short symbol to denote the parameter +- type of the parameter (integer, float, array of float, etc.) +- physical units of the parameter +- a brief phrase describing the parameter + +## Physical model +Provide a well-defined mathematical description of the element and its parameters. This may include equations, figures, etc. +This description should completely specify the element in an unambiguous form, and may include one of the following: +- equations describing the physical geometry +- equations describing the electromagnetic fields +- equations describing the dynamical transfer map + +## Alternative descriptions +If applicable, provide a description of similar widely-used elements or alternative parameter sets. +The purpose is to provide disambiguation and to provide criteria that may be used to aid in classification and grouping. + +## Additional information +If applicable, please provide any additional information that may be relevant, such as: +- Links to existing codes or implementations +- Any relevant technical requirements or specifications +- References to relevant publications or research From 84f300fa50b1d68b0ccaa42cbe67b75dd9162b21 Mon Sep 17 00:00:00 2001 From: Chad Mitchell <46825199+cemitch99@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:34:34 -0800 Subject: [PATCH 3/5] Apply suggestions from code review --- front_matter/contributing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front_matter/contributing.md b/front_matter/contributing.md index e50e147..d139407 100644 --- a/front_matter/contributing.md +++ b/front_matter/contributing.md @@ -3,7 +3,7 @@ Follow these steps **only once**: 1. Go to https://github.com/campa-consortium/lattice-standard. -2. Click the pulldown arrow next to `Fork`, click `Create a new fork`, and specify your GitHub username in the `Owner` field (e.g., "cemitch99"). +2. Click the pulldown arrow next to `Fork`, click `Create a new fork`, and specify your GitHub username in the `Owner` field (e.g., "username"). 3. Go back to https://github.com/campa-consortium/lattice-standard and copy the url of the repo: (e.g., https://github.com/campa-consortium/lattice-standard.git) @@ -20,7 +20,7 @@ git remote rename origin mainline 6. Add your remote repository in order to track it locally: ``` -git remote add cemitch99 https://github.com/cemitch99/lattice-standard.git +git remote add username https://github.com/username/lattice-standard.git ``` Follow these steps **each time you submit a pull request**: @@ -57,7 +57,7 @@ git commit -m "Add element template." 7. Push the changes to your fork remote repository: ``` -git push -u cemitch99 add_template +git push -u username add_template ``` 8. Follow the link that is generated to open a new pull request on GitHub that includes these changes, e.g., go to https://github.com/cemitch99/lattice-standard/pull/new/add_template. From 2014690d5ebc67ec79d8fcf408eed1ebf954a39c Mon Sep 17 00:00:00 2001 From: Chad Mitchell <46825199+cemitch99@users.noreply.github.com> Date: Wed, 11 Dec 2024 07:45:15 -0800 Subject: [PATCH 4/5] Update CONTRIBUTING.md Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> --- front_matter/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front_matter/contributing.md b/front_matter/contributing.md index d139407..2a248f2 100644 --- a/front_matter/contributing.md +++ b/front_matter/contributing.md @@ -55,7 +55,7 @@ git add pull_request_element_template.md git commit -m "Add element template." ``` -7. Push the changes to your fork remote repository: +7. Push the changes to your fork: ``` git push -u username add_template ``` From cf0f869f11ef224bcc87cf3343b9ccb861135e78 Mon Sep 17 00:00:00 2001 From: Chad Mitchell <46825199+cemitch99@users.noreply.github.com> Date: Mon, 6 Jan 2025 11:52:31 -0800 Subject: [PATCH 5/5] Address comments Modified default method to SSH. --- front_matter/contributing.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/front_matter/contributing.md b/front_matter/contributing.md index 2a248f2..7e40e2e 100644 --- a/front_matter/contributing.md +++ b/front_matter/contributing.md @@ -5,12 +5,14 @@ Follow these steps **only once**: 2. Click the pulldown arrow next to `Fork`, click `Create a new fork`, and specify your GitHub username in the `Owner` field (e.g., "username"). -3. Go back to https://github.com/campa-consortium/lattice-standard and copy the url of the repo: -(e.g., https://github.com/campa-consortium/lattice-standard.git) +3. Go back to https://github.com/campa-consortium/lattice-standard, click `Code` > `SSH`, and copy the url of the repo: +(e.g., git@github.com:campa-consortium/lattice-standard.git) -4. On your local machine, from the terminal, clone the main repository: +The simpler option `Code` > `HTTPS` can be used if the user just want to look at the repo. (This does not require a password setup.) + +5. On your local machine, from the terminal, clone the main repository: ``` -git clone https://github.com/campa-consortium/lattice-standard.git +git clone git@github.com:campa-consortium/lattice-standard.git ``` 5. Rename what we just cloned: call it "mainline": @@ -20,7 +22,7 @@ git remote rename origin mainline 6. Add your remote repository in order to track it locally: ``` -git remote add username https://github.com/username/lattice-standard.git +git remote add username git@github.com:campa-consortium/lattice-standard.git ``` Follow these steps **each time you submit a pull request**: