From 784e4ba858ff8992300060eb9f6676ec88ef2cd7 Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 8 Jan 2024 12:57:05 -0500 Subject: [PATCH 1/7] tiny addition about github practices --- docs/SUMMARY.md | 1 + docs/github.md | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 docs/github.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 76595ae44..8db5e2ccf 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -34,6 +34,7 @@ - [Debugging](./debug/index.md) - [Logical Bugs](./debug/cider.md) - [Compilation Bugs](./debug/debug.md) +- [Developing Calyx](./github.md) # Generating Calyx diff --git a/docs/github.md b/docs/github.md new file mode 100644 index 000000000..eaa608d6b --- /dev/null +++ b/docs/github.md @@ -0,0 +1,24 @@ +# Contributing to Calyx + +## A few notes on Github practices around the Calyx project +The current home of the Calyx repo can be found [here][calyx_repo]. As with many +large projects, we protect the main branch of the repo so that updates can only +be made via pull requests. So the development cycle tends to look like: +``` +checkout main -> develop code -> open PR -> revise -> merge PR +``` + +For legibility of commits, we squash all commits in a PR down to a single commit +and merge the composite commit to the main branch. This helps keep the commit +count of the main branch lower than it would otherwise be, however it can make +using commands like `git bisect` more challenging for large branches. For that +reason we tend to recommend more frequent PRs to avoid large deltas. + +Once your PR has been merged, be sure to ***checkout from the updated main branch*** +for future changes. If you branch off the merged branch or continue with it, +there will be extensive merge conflicts due to the squash and merge tactic. For +this reason we always recommend creating branches off of the main branch if you +intend to have them merged into it. + + +[calyx_repo]: https://github.com/calyxir/calyx From 5e29c09503868e9e1ac011568935f4015ef89df0 Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 8 Jan 2024 13:49:18 -0500 Subject: [PATCH 2/7] Change the title --- docs/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 8db5e2ccf..e004140c5 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -34,7 +34,7 @@ - [Debugging](./debug/index.md) - [Logical Bugs](./debug/cider.md) - [Compilation Bugs](./debug/debug.md) -- [Developing Calyx](./github.md) +- [Contributing to Calyx](./github.md) # Generating Calyx From b72e7c7f389690a6a11b4713ad0a6180a8e14151 Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 8 Jan 2024 13:58:01 -0500 Subject: [PATCH 3/7] rachit notes --- docs/github.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/github.md b/docs/github.md index eaa608d6b..f230f665d 100644 --- a/docs/github.md +++ b/docs/github.md @@ -1,6 +1,6 @@ # Contributing to Calyx -## A few notes on Github practices around the Calyx project +## Github Workflow The current home of the Calyx repo can be found [here][calyx_repo]. As with many large projects, we protect the main branch of the repo so that updates can only be made via pull requests. So the development cycle tends to look like: @@ -20,5 +20,19 @@ there will be extensive merge conflicts due to the squash and merge tactic. For this reason we always recommend creating branches off of the main branch if you intend to have them merged into it. +### CI Behavior +The CI runs a number of tests including ensuring that Rust and Python code has +been formatted. For Python we use the `black` formatter and for Rust we use the +standard `cargo fmt`. + +For Rust further linting is done via [`clippy`][clippy] to ensure that there are +no warnings. In situations where warnings are expected, such as code that is +only part way through development, you can opt to add `#[allow]` annotations +within Rust to suppress the lint. + +If changes are made to the `Dockerfile` then the CI will automatically rebuild +the docker image and run your tests on it. + [calyx_repo]: https://github.com/calyxir/calyx +[clippy]: https://github.com/rust-lang/rust-clippy From 40504a3267bf3be4101a49cbbbd5d825d7b9f7e5 Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 22 Jan 2024 14:07:00 -0500 Subject: [PATCH 4/7] Update docs/github.md Co-authored-by: Adrian Sampson --- docs/github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/github.md b/docs/github.md index f230f665d..c428f8f0b 100644 --- a/docs/github.md +++ b/docs/github.md @@ -31,7 +31,7 @@ only part way through development, you can opt to add `#[allow]` annotations within Rust to suppress the lint. If changes are made to the `Dockerfile` then the CI will automatically rebuild -the docker image and run your tests on it. +the Docker image and run your tests on it. [calyx_repo]: https://github.com/calyxir/calyx From d81e14b990ee1f4d2488fe9f6527fbf605b24a2f Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 22 Jan 2024 14:07:15 -0500 Subject: [PATCH 5/7] Update docs/github.md Co-authored-by: Adrian Sampson --- docs/github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/github.md b/docs/github.md index c428f8f0b..668b3fd7c 100644 --- a/docs/github.md +++ b/docs/github.md @@ -10,7 +10,7 @@ checkout main -> develop code -> open PR -> revise -> merge PR For legibility of commits, we squash all commits in a PR down to a single commit and merge the composite commit to the main branch. This helps keep the commit -count of the main branch lower than it would otherwise be, however it can make +count of the main branch lower than it would otherwise be; however, it can make using commands like `git bisect` more challenging for large branches. For that reason we tend to recommend more frequent PRs to avoid large deltas. From 69e1bb6b7e27855a480e2f21f59fe610490a53e8 Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 22 Jan 2024 14:07:27 -0500 Subject: [PATCH 6/7] Update docs/github.md Co-authored-by: Adrian Sampson --- docs/github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/github.md b/docs/github.md index 668b3fd7c..01209f234 100644 --- a/docs/github.md +++ b/docs/github.md @@ -22,7 +22,7 @@ intend to have them merged into it. ### CI Behavior The CI runs a number of tests including ensuring that Rust and Python code has -been formatted. For Python we use the `black` formatter and for Rust we use the +been formatted. For Python we use the [Black](https://github.com/psf/black) formatter and for Rust we use the standard `cargo fmt`. For Rust further linting is done via [`clippy`][clippy] to ensure that there are From 0d1997018eac75cb7316fe822f73ee3546b60819 Mon Sep 17 00:00:00 2001 From: Griffin Berlstein Date: Mon, 22 Jan 2024 14:07:40 -0500 Subject: [PATCH 7/7] Update docs/github.md Co-authored-by: Adrian Sampson --- docs/github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/github.md b/docs/github.md index 01209f234..013c48ec0 100644 --- a/docs/github.md +++ b/docs/github.md @@ -14,7 +14,7 @@ count of the main branch lower than it would otherwise be; however, it can make using commands like `git bisect` more challenging for large branches. For that reason we tend to recommend more frequent PRs to avoid large deltas. -Once your PR has been merged, be sure to ***checkout from the updated main branch*** +Once your PR has been merged, be sure to ***check out the updated main branch*** for future changes. If you branch off the merged branch or continue with it, there will be extensive merge conflicts due to the squash and merge tactic. For this reason we always recommend creating branches off of the main branch if you