diff --git a/.github/workflows/allow-anyone-to-self-assign-an-issue.yaml b/.github/workflows/allow-anyone-to-self-assign-an-issue.yaml new file mode 100644 index 0000000..458c793 --- /dev/null +++ b/.github/workflows/allow-anyone-to-self-assign-an-issue.yaml @@ -0,0 +1,11 @@ +name: "Allow anyone to self-assign an issue" + +on: [issue_comment] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: bhermann/issue-volunteer@v0.1.12 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.kit/features/0-display-welcome-message/install-into-client.sh b/.kit/features/0-display-welcome-message/install-into-client.sh new file mode 100755 index 0000000..51c2391 --- /dev/null +++ b/.kit/features/0-display-welcome-message/install-into-client.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +echo "*********************************************************************" +printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" +printf "(I'm in the 'kit' and communicate through your 'tty'\u00B9 - get it? \xF0\x9F\x98\x81)\n" +echo +echo "I am here to help you be successful in the GitKit activities." +echo "You will hear from me every once in a while when I think you" +echo "might need some help." +echo +printf "\u00B9To learn about the tty: https://itsfoss.com/what-is-tty-in-linux/\n" +echo "*********************************************************************" diff --git a/.kit/features/5-add-conflicts-for-practicing-merges-with-conflicts/0001-Conflicts-for-practicing-merges-with-conflicts.patch b/.kit/features/5-add-conflicts-for-practicing-merges-with-conflicts/0001-Conflicts-for-practicing-merges-with-conflicts.patch new file mode 100644 index 0000000..5550193 --- /dev/null +++ b/.kit/features/5-add-conflicts-for-practicing-merges-with-conflicts/0001-Conflicts-for-practicing-merges-with-conflicts.patch @@ -0,0 +1,35 @@ +From d008b798254a94457d7937dccd05e30ca1351ff8 Mon Sep 17 00:00:00 2001 +From: Grant Braught +Date: Fri, 12 Nov 2021 08:43:21 -0500 +Subject: [PATCH] Conflicts for practicing merges with conflicts + +Students can pull this branch and used it to practice resolving merge conflicts. It contains two merge conflicts with the 4 changes made in the addConflicts branch. +--- + README.md | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/README.md b/README.md +index 9d26f8e..26c2c3a 100644 +--- a/README.md ++++ b/README.md +@@ -22,7 +22,7 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic + + ### History ### + +-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ++FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://a.different.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. + + ### Acknowledgements ### + +@@ -31,7 +31,7 @@ FarmData2 is powered by the farmOS open source project. + Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/). + + The development of FarmData2 has received partial support from: +-* The GNOME Community Engagement Challenge: ++* The [GNOME Community Engagement Challenge](https://a.different.link3): + * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) + * The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. + * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). +-- +2.36.0 + diff --git a/.kit/features/5-add-conflicts-for-practicing-merges-with-conflicts/install-into-instance.sh b/.kit/features/5-add-conflicts-for-practicing-merges-with-conflicts/install-into-instance.sh new file mode 100755 index 0000000..645a9bf --- /dev/null +++ b/.kit/features/5-add-conflicts-for-practicing-merges-with-conflicts/install-into-instance.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +git stash +git switch main +git switch -c add-conflicts-for-practicing-merges-with-conflicts +git am "${SCRIPT_DIR}"/*.patch +git switch main +git stash pop diff --git a/.kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch b/.kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch new file mode 100644 index 0000000..3ba5969 --- /dev/null +++ b/.kit/features/5-add-round-two-conflicts/0001-Changes-that-conflict-with-Round2-Issues.patch @@ -0,0 +1,40 @@ +From 8d03822daf8d30fc192b4543d7992ee0b0ea099e Mon Sep 17 00:00:00 2001 +From: Grant Braught +Date: Fri, 12 Nov 2021 08:37:19 -0500 +Subject: [PATCH] Changes that conflict with Round2 Issues. + +Each of the 190-Round2 issues in the issue tracker add links to the README.md file. This commit, when merged into main will introduce changes that conflict with all of the changes requested by those issues. It should be merged after students synch with main and as or just after they submit their PR's for the 190-Round2 issues. +--- + README.md | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/README.md b/README.md +index 9d26f8e..efb70b6 100644 +--- a/README.md ++++ b/README.md +@@ -22,18 +22,18 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic + + ### History ### + +-FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the Dickinson College Farm. The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ++FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://not.the.right.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. + + ### Acknowledgements ### + +-FarmData2 is powered by the farmOS open source project. ++FarmData2 is powered by the [farmOS](https://not.the.right.link2) open source project. + + Support and assistance with FarmData2 development has been received from [The Non-Profit FOSS Institute](https://npfi.org/). + + The development of FarmData2 has received partial support from: +-* The GNOME Community Engagement Challenge: ++* The [GNOME Community Engagement Challenge](https://not.the.right.link3): + * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) +-* The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. ++* The National Science Foundation ([DUE-2013069](https://not.the.right.link4)) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. + * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). + + --- +-- +2.36.0 + diff --git a/.kit/features/5-add-round-two-conflicts/install-into-instance.sh b/.kit/features/5-add-round-two-conflicts/install-into-instance.sh new file mode 100755 index 0000000..d0ec9c4 --- /dev/null +++ b/.kit/features/5-add-round-two-conflicts/install-into-instance.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +git stash +git switch main +git switch -c add-round-two-conflicts +git am "${SCRIPT_DIR}"/*.patch +git switch main +git stash pop diff --git a/.kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml b/.kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml new file mode 100644 index 0000000..458c793 --- /dev/null +++ b/.kit/features/5-allow-anyone-to-self-assign-an-issue/allow-anyone-to-self-assign-an-issue.yaml @@ -0,0 +1,11 @@ +name: "Allow anyone to self-assign an issue" + +on: [issue_comment] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: bhermann/issue-volunteer@v0.1.12 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh b/.kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh new file mode 100755 index 0000000..3597af8 --- /dev/null +++ b/.kit/features/5-allow-anyone-to-self-assign-an-issue/install-into-instance.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +set -e + +project_dir="$( + while [[ ! -d .git ]] ; do + cd .. + done + pwd +)" +workflows_dir="${project_dir}/.github/workflows" +mkdir -p "$workflows_dir" +cp "$SCRIPT_DIR/allow-anyone-to-self-assign-an-issue.yaml" "$workflows_dir" diff --git a/.kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh b/.kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh new file mode 100755 index 0000000..dabd8d2 --- /dev/null +++ b/.kit/features/5-allow-only-fast-foward-merges-on-main/install-into-client.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +git config --local branch.main.mergeoptions "--no-ff" diff --git a/.kit/features/5-detect-upstream-clone/install-into-client.sh b/.kit/features/5-detect-upstream-clone/install-into-client.sh new file mode 100755 index 0000000..6b3c1a3 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/install-into-client.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +# shellcheck disable=SC1091 +source "${SCRIPT_DIR}/upstream-location.sh" + +function main() { + detect-upstream-clone +} + +function detect-upstream-clone() { + upstream="$(load-upstream-location)" + origin="$(get-origin-location)" + + # Case insensitive check. + upstream="$(echo "$upstream" | tr '[:upper:]' '[:lower:]')" + origin="$(echo "$origin" | tr '[:upper:]' '[:lower:]')" + if [[ "$origin" == "$upstream" ]] ; then + display-error-message + fi +} + +function get-origin-location() { + convert-url-to-org-repo "$(get-origin-url)" +} + +function get-origin-url() { + git remote get-url origin +} + +function convert-url-to-org-repo() { + url="$1" + if [[ "$url" =~ ^git.* ]] ; then + convert-git-url-to-org-repo "$url" + else + convert-http-url-to-org-repo "$url" + fi +} + +function convert-git-url-to-org-repo() { + url="$1" + url="$(remove-prefix-to-first-colon "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function convert-http-url-to-org-repo() { + url="$1" + url="$(remove-prefix-http "$url")" + url="$(remove-suffix-dot-git "$url")" + echo "$url" +} + +function remove-prefix-to-first-colon() { + echo "${1#*:}" +} + +function remove-suffix-dot-git() { + echo "${1%.git}" +} + +function remove-prefix-http() { + local url="${1}" + url="${url#*//}" + echo "${url#*/}" +} + +function display-error-message() { + echo "*********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo + echo "Oops, I think you have cloned the upstream repository instead of your" + echo "fork. But don't worry. You can fix it!" + echo + echo "1. Delete your local repository." + echo "2. Navigate to your fork on GitHub and copy its clone URL." + echo "3. Clone your fork using its clone URL." + echo "*********************************************************************" +} + +main diff --git a/.kit/features/5-detect-upstream-clone/install-into-instance.sh b/.kit/features/5-detect-upstream-clone/install-into-instance.sh new file mode 100755 index 0000000..bfe5e93 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/install-into-instance.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +source "${SCRIPT_DIR}/upstream-location.sh" + +function main() { + save-upstream-location "$(get-upstream-location)" +} + +function get-upstream-location() { + get-origin-location +} + +function get-origin-location() { + convert-url-to-org-repo "$(get-origin-url)" +} + +function get-origin-url() { + git remote get-url origin +} + +function convert-url-to-org-repo() { + local n="$1" + if [[ "$n" =~ ^git.* ]] ; then + # remove git@github.com prefix + n="${n#git@github.com:}" + else + # remove https://github.com/ prefix + n="${n#https://*github.com/}" + fi + # remove .git suffix + n="${n%.git}" + echo "$n" +} + +function get-upstream-location-file() { + echo "$SCRIPT_DIR/upstream-location.txt" +} + +function commit-and-push-upstream-location() { + git add "$(get-upstream-location-file)" + git commit -m "build(kit): add upstream location" + git push +} + +main diff --git a/.kit/features/5-detect-upstream-clone/upstream-location.sh b/.kit/features/5-detect-upstream-clone/upstream-location.sh new file mode 100755 index 0000000..17fd5d3 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/upstream-location.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +save-upstream-location() { + echo "${1}" > "${SCRIPT_DIR}/upstream-location.txt" +} + +load-upstream-location() { + cat "${SCRIPT_DIR}/upstream-location.txt" +} diff --git a/.kit/features/5-detect-upstream-clone/upstream-location.txt b/.kit/features/5-detect-upstream-clone/upstream-location.txt new file mode 100644 index 0000000..30f6497 --- /dev/null +++ b/.kit/features/5-detect-upstream-clone/upstream-location.txt @@ -0,0 +1 @@ +dickinson-comp190/GitKit-FarmData2 diff --git a/.kit/features/5-prevent-commit-to-main/install-into-client.sh b/.kit/features/5-prevent-commit-to-main/install-into-client.sh new file mode 100755 index 0000000..cc4e743 --- /dev/null +++ b/.kit/features/5-prevent-commit-to-main/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-commit-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-commit" +chmod +x "$PROJECT_DIR/.git/hooks/pre-commit" diff --git a/.kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh b/.kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh new file mode 100755 index 0000000..420a046 --- /dev/null +++ b/.kit/features/5-prevent-commit-to-main/prevent-commit-to-main.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You should not be committing to the main branch." + echo "You should be committing to a feature branch." + echo + echo "Here's how:" + echo + echo "1. Create a feature branch, if you don't already have one." + echo + echo " git branch " + echo + echo "2. Switch to that branch." + echo + echo " git switch " + echo + echo "3. Retry your commit." + echo + echo "That's it! Have fun! Meow!" + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/features/5-prevent-merge-to-main/install-into-client.sh b/.kit/features/5-prevent-merge-to-main/install-into-client.sh new file mode 100755 index 0000000..b2ed56c --- /dev/null +++ b/.kit/features/5-prevent-merge-to-main/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-merge-to-main.sh" "$PROJECT_DIR/.git/hooks/pre-merge-commit" +chmod +x "$PROJECT_DIR/.git/hooks/pre-merge-commit" diff --git a/.kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh b/.kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh new file mode 100755 index 0000000..6bc4c9d --- /dev/null +++ b/.kit/features/5-prevent-merge-to-main/prevent-merge-to-main.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +if [[ $(git symbolic-ref HEAD) == "refs/heads/main" ]] +then + echo "**********************************************************************" + printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" + echo "You should not be merging to the main branch." + echo "You should only be merging in a GitHub pull request." + echo "The working tree is still in a merging state." + echo + echo "Before continuing, run the command:" + echo + echo " git reset --merge" + echo + echo "Ignore messages after this line" + echo "**********************************************************************" + exit 1 +fi diff --git a/.kit/features/5-prevent-rebase/install-into-client.sh b/.kit/features/5-prevent-rebase/install-into-client.sh new file mode 100755 index 0000000..cedd614 --- /dev/null +++ b/.kit/features/5-prevent-rebase/install-into-client.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +## This script is called once after the instance is cloned by a KitClient. +## It runs in the clone of the instance in a KitClient. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +PROJECT_DIR="$(git rev-parse --show-toplevel)" + +cp "$SCRIPT_DIR/prevent-rebase.sh" "$PROJECT_DIR/.git/hooks/pre-rebase" +chmod +x "$PROJECT_DIR/.git/hooks/pre-rebase" diff --git a/.kit/features/5-prevent-rebase/prevent-rebase.sh b/.kit/features/5-prevent-rebase/prevent-rebase.sh new file mode 100755 index 0000000..62f9f60 --- /dev/null +++ b/.kit/features/5-prevent-rebase/prevent-rebase.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Hook to verify that commits are not made to the main branch accidentally +# Based on https://gist.github.com/ilyakatz/4625224#file-pre-commit-master-no-no + +# Disallow all rebasing +echo "**********************************************************************" +printf "\xF0\x9F\x98\xBA\xF0\x9F\x92\xBB Meow, Kit-tty here!\n" +echo "You should not be rebasing in this kit." +echo "You should be using 'git merge' instead." +echo "**********************************************************************" +exit 1 diff --git a/.kit/features/6-create-labels/install-into-instance.sh b/.kit/features/6-create-labels/install-into-instance.sh new file mode 100755 index 0000000..b67a669 --- /dev/null +++ b/.kit/features/6-create-labels/install-into-instance.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +cd "$SCRIPT_DIR" + +set -e + +cat labels.json | yq '.[].color' > colors.txt +cat labels.json | yq '.[].name' > names.txt +paste names.txt colors.txt > names-colors.txt + +IFS=$'\t' +while read n c ; do + gh label create --force "$n" --color "$c" &> /dev/null || true + sleep 1 +done < names-colors.txt +IFS=$' \t\n' + +rm names-colors.txt colors.txt names.txt diff --git a/.kit/features/6-create-labels/labels.json b/.kit/features/6-create-labels/labels.json new file mode 100644 index 0000000..9982a2a --- /dev/null +++ b/.kit/features/6-create-labels/labels.json @@ -0,0 +1,67 @@ +[ + { + "name": "Round1", + "description": "First issues for COMP 190 Activity.", + "color": "6B4089" + }, + { + "name": "Round2", + "description": "Second issues for COMP 190 Activity.", + "color": "7AA01D" + }, + { + "name": "bug", + "description": "Something isn't working", + "color": "d73a4a" + }, + { + "name": "documentation", + "description": "Improvements or additions to documentation", + "color": "0075ca" + }, + { + "name": "duplicate", + "description": "This issue or pull request already exists", + "color": "cfd3d7" + }, + { + "name": "enhancement", + "description": "New feature or request", + "color": "a2eeef" + }, + { + "name": "good first issue", + "description": "Good for newcomers", + "color": "7057ff" + }, + { + "name": "help wanted", + "description": "Extra attention is needed", + "color": "008672" + }, + { + "name": "invalid", + "description": "This doesn't seem right", + "color": "e4e669" + }, + { + "name": "Links", + "description": "Link to be added to documentation.", + "color": "c5def5" + }, + { + "name": "question", + "description": "Further information is requested", + "color": "d876e3" + }, + { + "name": "Typos", + "description": "Typo in documentation to be fixed.", + "color": "A21517" + }, + { + "name": "wontfix", + "description": "This will not be worked on", + "color": "ffffff" + } +] diff --git a/.kit/features/7-create-issues/install-into-instance.sh b/.kit/features/7-create-issues/install-into-instance.sh new file mode 100755 index 0000000..febd705 --- /dev/null +++ b/.kit/features/7-create-issues/install-into-instance.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +## This script is called after the new instance has been created and +## initialiazed. It runs in the local clone of the instance. + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; +cd "$SCRIPT_DIR" + +set -e + +i=0 +o="$(cat issues.json | yq ".[${i}]")" + +while [[ "$o" != "null" ]] ; do + title="$(echo "$o" | yq '.title')" + body="$(echo "$o" | yq '.body')" + labels="$(echo "$o" | yq '.labels[]' | sed ':a;N;$!ba;s/\n/,/g')" + echo "Creating issue: $title" + gh issue create --title "$title" --body "$body" --label "$lables" + sleep 3 + ((++i)) + o="$(cat issues.json | yq ".[${i}]")" +done diff --git a/.kit/features/7-create-issues/issues.json b/.kit/features/7-create-issues/issues.json new file mode 100644 index 0000000..0178560 --- /dev/null +++ b/.kit/features/7-create-issues/issues.json @@ -0,0 +1,277 @@ +[ + { + "title": "Add Missing \"a\"", + "body": "Add the word \"a\" between \"in\" and \"module\" in the sentence \"JavaScript and CSS libraries can be included in module by adding them to the module configuration files\" under the \"JavaScript and CSS Libraries\" heading in the README.md file **in the farmdata2_modules/fd2_tabs/fd2_example directory.**", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Format Role Names", + "body": "Change the role names \"manager,\" \"worker,\" and \"guest\" to be formatted in the same way that \"admin\" is. They should be formatted using back-ticks (\\`) for code instead of (\\_) for italics to match \"admin\" in the second bullet point under \"FarmData2 Module Structure\" in the README.md file in the **farmdata2_modules/fd2_tabs/fd2_example directory.**", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add Missing \"with\"", + "body": "Add the word \"with\" between \"experiment\" and \"FarmData2\" in the sentence \"The FD2 Example tab is created by a sample module and can be used as a sandbox in which to learn about and experiment FarmData2 modules like those that produce the FieldKit and BarnKit tabs.\" at the end of the paragraph following the \"FarmData2 Modules\" heading in the README.md file **in the \"farmdata2_modules/fd2_tabs/fd2_example\" directory**.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Missing t Typo", + "body": "Change \"ext\" to \"text\" in the phrase \" (e.g. button, ext field)\" at the end of bullet point 3 under \"Component Tests\" in the \"Cypress\" section of ONBOARDING.md.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix \"comonent\" Typo", + "body": "Change \"comonent\" to \"component\" in the phrase \"A typical comonent test will:\" at the end of the first paragraph under \"Component Tests\" in the \"Cypress\" section of the ONBOARDING.md document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Add Missing r To Fix Typo", + "body": "Change \"you\" to \"your\" in the phrase \"Following these will make you tests less brittle.\" in the third bullet point under \"Resources\" in the \"End-To-End\" tests part of the \"Cypress\" section in the ONBOARDING.md document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Missing t Typo", + "body": "Change \"ext\" to \"text\" in the phrase \" (e.g. button, ext field)\" at the end of bullet point 3 under \"End-To-End\" tests in the \"Cypress\" section of ONBOARDING.md.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix Italics", + "body": "Change the phrase \",called _spec_s\" to \"\\*spec\\*s\" at the end of the sentence \"A test typically consists of a series of steps that are automated by the Cypress tests, called _spec_s.\" in the \"End-to-End Tests\" section under the \"Cypress\" heading in the ONBOARDING.md file. The _spec_s or \\*spec\\*s is supposed to make the *spec* appear in italics. However, it turns out that \\* works within a word but \\_ does not.", + "labels": [ + "bug", + "documentation", + "Round1" + ] + }, + { + "title": "Fix Typo of \"ad\" to \"as\"", + "body": "Change \"ad\" to \"as\" in the sentence \"An overview of Theia and its use ad an Integrated Development Environment.\" in the bullet point under \"Resources\" in the \"Editors\" section of the \"ONBOARDING.md\" file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Complete Truncated Sentence with Link", + "body": "The final sentence of the text in the \"FarmData2\" section of the ONBOARDING.md file (just before the bullet points) is truncated. It reads \"If you run in to any issues, use the\" That sentence should be completed with the text \"FarmData2 School Stream on Zulip.\" The added text should be a link to the URL https://farmdata2.zulipchat.com/#narrow/stream/291820-FarmData2-School. \r\n\r\nInformation about making a link in Markdown can be found here: https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links", + "labels": [ + "bug", + "documentation", + "Links", + "Round1" + ] + }, + { + "title": "Add Missing \"that\"", + "body": "Add \"that\" between \"tutorial\" and \"walks\" in the bullet point \"Git Immersion: A tutorial walks through a series of ...\" in the \"Prerequisites\" section of the ONBOARDING.md file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Correct typo in \"followign\" ", + "body": "Correct the typo of \"followign\" to \"following\" in the sentence \"The followign two guides walk through how to work with existing open source projects and essentially follow GitFlow:\" in the second bullet point under \"Resources\" in the \"Prerequisites\" section of the ONBOARDING.md file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make it Plural", + "body": "Change \"it\" to \"its\" in the sentence \"The FarmData2 community uses Zulip as it communication platform.\" in the first sentence of the \"Communications\" section of the ONBOARDING.md file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Make Starts Singular", + "body": "Change \"starts to \"start\" in the sentence \"This command will starts up the docker containers that are used by FarmData2.\" in the \"Starting FarmData2\" section of INSTALL.md.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Fix typo in \"command\"", + "body": "Change \"comman\" to \"command\" in the sentence \"But the above comman can be used ...\" that appears at the end of the \"Install the Sample Database Image\" section of the INSTALL.md document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Link for Setting Upstream Remote", + "body": "Make the phrase \"Set the upstream remote\" a link to documentation in the 4th bullet point of the \"Workflow\" section in the CONTRIBUTING document.\r\n\r\nUse the link: https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork\r\n\r\nInformation about making a link in Markdown can be found here: https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links", + "labels": [ + "documentation", + "enhancement", + "Links", + "Round1" + ] + }, + { + "title": "Link for Pull Requests", + "body": "Make the phrase \"Make a Pull Request\" into a link to documentation about how to make a pull request. This phrase is in the final bullet point of the \"Workflow\" section of the CONTRIBUTING.md file.\r\n\r\nUse the link: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request\r\n\r\nInformation about making a link in Markdown can be found here: https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links", + "labels": [ + "documentation", + "enhancement", + "Links", + "Round1" + ] + }, + { + "title": "Make \"Fork\" a link ", + "body": "Make the word \"Fork\" into a link to appropriate documentation from GitHub in the second bullet point under the \"Workflow\" heading in the CONTRIBUTING.md file.\r\n\r\nUse the link: https://docs.github.com/en/get-started/quickstart/fork-a-repo\r\n\r\nInformation about making a link in Markdown can be found here: https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#links", + "labels": [ + "documentation", + "enhancement", + "Links", + "Round1" + ] + }, + { + "title": "Comma Usage", + "body": "Correct the comma usage in the sentence \"If you are unfamiliar with one or more of these technologies the ONBOARDING document provides additional information about each, as well as resources and activities for learning about them.\" that appears at the end of the \"Technology Onboarding\" section of the CONTRIBUTING.md document.\r\n\r\nAdd a comma between \"technologies\" and \"the ONBOARDING\"\r\nRemove the comma between \"about each\" and \"as well as\" ", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Make Update plural", + "body": "Change \"Update\" to \"Updates\" in the phrase \"Update to any of the FarmData2 documentation are welcome.\" in the first sentence of the \"Documentation\" section of the \"CONTRIBUTING.md file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Change \"is\" to \"it\"", + "body": "Correct the first \"is\" to be \"it\" in the phrase \"(e.g. platforms on which is is or is not seen).\" in the second bullet point under the \"Issue Gardening\" heading in the CONTRIBUTING.md file.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Remove duplicate \"are\"", + "body": "The duplicate \"are\" should be removed from the phrase \"If you are are a user of FarmData2...\" that appears after the \"Bug Reports\" heading in the CONTRIBUTING.md document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Hyphenate step by step", + "body": "The adjective step by step should be hyphenated as step-by-step in the phrase \"The Install Directions give step by step instructions for getting FarmData2 up and running.\" just under the \"Participation\" heading in the CONTRIBUTING.md document.", + "labels": [ + "documentation", + "enhancement", + "Typos", + "Round1" + ] + }, + { + "title": "Typo in Licensing Section", + "body": "Fix the typo by changing \"it\" to \"its\" in the sentence that ends \"while protecting both the project and it community of contributors.\" in the Licensing section of the CONTRIBUTING.md document.", + "labels": [ + "documentation", + "Typos", + "Round1" + ] + }, + { + "title": "Remove mention of AUTHORS.md", + "body": "The AUTHORS.md file has not been created. The sentence \"The AUTHORS.md file contains a list of all contributors to the repository and is updated periodically.\" should be removed from the Attribution section of the LICENSE.md file.", + "labels": [ + "documentation", + "invalid", + "Round1" + ] + }, + { + "title": "Contributors \"acknowledge\" the DCO", + "body": "Change the word \"completes\" to \"acknowledges\" in the phrase \"This is done explicitly when when a contributor completes the...\" in the Contributions section of the LICENSE.md file.", + "labels": [ + "documentation", + "enhancement", + "Round1" + ] + }, + { + "title": "Dickinson College Farm Link", + "body": "Change the text \"the Dickinson College Farm\" into a link to the farm in the History section of README.md.\r\n\r\nThe URL to use for the link is: https://www.dickinson.edu/farm\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax ", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "NSF Award Link", + "body": "Make the text \"DUE-2013069\" into a link to the award in the Acknowledgments section at the bottom of the README.md file.\r\n\r\nThe URL to use for the link is: https://www.nsf.gov/awardsearch/showAward?AWD_ID=2013069\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax ", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "GNOME CEC Link", + "body": "Make the phrase \"GNOME Community Engagement Challenge\" into a link in the Acknowledgements at the bottom of the README.md file.\r\n\r\nThe URL to use for the link is: https://www.gnome.org/challenge/\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax ", + "labels": [ + "documentation", + "Links", + "Round2" + ] + }, + { + "title": "Add farmOS Link", + "body": "Change the word \"farmOS\" into a link in the Acknowledgements at the bottom of README.md. \r\n\r\nThe URL to use for the link is: https://farmos.org/\r\n\r\nThe \"Links\" section of the following document shows how to create a link using Markdown:\r\n- https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax ", + "labels": [ + "documentation", + "Links", + "Round2" + ] + } +] diff --git a/.kit/features/install-features-into-client/run.sh b/.kit/features/install-features-into-client/run.sh new file mode 100755 index 0000000..c6dedea --- /dev/null +++ b/.kit/features/install-features-into-client/run.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +## Called by KitClient to install features. +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +#set -ex +set -e + +## Move to the root of the project. +cd "$SCRIPT_DIR" +while [[ ! -d .git ]] ; do + cd .. +done + +## Install features into the client. +for feature in ./.kit/features/* ; do +# pwd + script="$feature"/install-into-client.sh + if [[ -e "$script" ]] ; then +# echo "$scipt" + "$script" + fi +done diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eee5e37..16f722f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ To promote an open, welcoming, inclusive and harassment-free experience, all eng ## Licensing ## -Content in the FarmData2 project is released under several different licenses as described in the [LICENSE file](LICENSE.md). In addition, that file describes the rights and responsibilities of contributors with regard to the their contributed content. The licensing structure of FarmData2 is designed to ensure that FarmData2 remains free and open source while protecting both the project and it community of contributors. Please review it carefully before contributing content to FarmData2. +Content in the FarmData2 project is released under several different licenses as described in the [LICENSE file](LICENSE.md). In addition, that file describes the rights and responsibilities of contributors with regard to the their contributed content. The licensing structure of FarmData2 is designed to ensure that FarmData2 remains free and open source while protecting both the project and its community of contributors. Please review it carefully before contributing content to FarmData2. ## Connecting ## @@ -20,7 +20,7 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic There are many ways to participate in FarmData2. Some of them are listed below. -Having a running version of FarmData2 is a prerequisite for many of the forms of participation. The [Install Directions] give step by step instructions for getting FarmData2 up and running. +Having a running version of FarmData2 is a prerequisite for many of the forms of participation. The [Install Directions] give step-by-step instructions for getting FarmData2 up and running. [Install Directions]: INSTALL.md @@ -37,7 +37,7 @@ If you are are a user of FarmData2 and discover something that doesn't seem to b #### Feature Requests #### -If you are are a user of FarmData2 and have a new feature you would like to see you can: +If you are a user of FarmData2 and have a new feature you would like to see you can: * Reach out to the community on the [Zulip Developer Stream](https://farmdata2.zulipchat.com/#narrow/stream/271292-developers) to discuss the feature you'd like to see and how to proceed. * Search the [Issue Tracker] to see if the feature, or something close, has already been suggested by someone. @@ -49,14 +49,14 @@ If you are are a user of FarmData2 and have a new feature you would like to see The project [Issue Tracker] contains tickets describing known issues with the project. The tickets for known issues are tagged with the label "bug". Each reported bug will have a detailed description of how the bug can be observed. Gardening includes activities such as: * Verifying or clarifying these descriptions. - * Enhance the report by providing additional information about the bug (e.g. platforms on which is is or is not seen). + * Enhance the report by providing additional information about the bug (e.g. platforms on which is it or is not seen). * Confirming that bug does (or does not) exist in the current version. To participate by Gardening visit the [Issue Tracker] and find something of interest to verify, enhance or clarify. Try it out in your running version of FarmData2 and add a comment to the ticket with what you find. #### Documentation #### -Update to any of the FarmData2 documentation are welcome. If you find typos, unclear or missing steps, poorly worded explanations, or have any other suggestions for how the documentation could be improved use the [workflow](#workflow) described below to create a pull request for your suggested changes. +Updates to any of the FarmData2 documentation are welcome. If you find typos, unclear or missing steps, poorly worded explanations, or have any other suggestions for how the documentation could be improved use the [workflow](#workflow) described below to create a pull request for your suggested changes. #### Bug Fix / Feature Implementation #### @@ -68,9 +68,9 @@ The above is not an exhaustive list of ways to participate in FarmData2. For som ## Technology Onboarding ## -Interacting with FarmData2 requires a basic familiarity with git and GitHub. FarmData2 development uses a fairly standard web technology stack including HTML, CSS, Bootstrap, JavaScript, and Vue.js. The front-end accesses FarmData2 data through the [FarmOS API](https://farmos.org/development/api/) using the [Axios](https://github.com/axios/axios) library. End-to-end and component testing is done using the [Cypress framework](https://www.cypress.io/). +Interacting with FarmData2 requires a basic familiarity with git and GitHub. FarmData2 development uses a fairly standard web technology stack including HTML, CSS, Bootstrap, JavaScript, and Vue.js. The front-end accesses FarmData2 data through the [FarmOS API](https://v1.farmos.org/development/api/) using the [Axios](https://github.com/axios/axios) library. End-to-end and component testing is done using the [Cypress framework](https://www.cypress.io/). -If you are unfamiliar with one or more of these technologies the [ONBOARDING](ONBOARDING.md) document provides additional information about each, as well as resources and activities for learning about them. +If you are unfamiliar with one or more of these technologies, the [ONBOARDING](ONBOARDING.md) document provides additional information about each as well as resources and activities for learning about them. ## Workflow ## @@ -79,7 +79,7 @@ FarmData2 generally uses the [GitHub flow](https://guides.github.com/introductio As a reference, the basic steps for working with GitHub Flow are as follows: * Go to the [FarmData2 Repository] (the _upstream_) - * Fork the _upstream_ repository to your GitHub (the _origin_). + * [Fork](https://docs.gihub.com/en/get-started/quickstart/fork-a-repo) the _upstream_ repository to your GitHub (the _origin_). * [Clone] the _origin_ repository to your local machine. * Set the _upstream_ remote for your local repository to point to the _upstream_ repository. * Create a _feature branch_ from the _main_ branch your local machine. @@ -89,7 +89,7 @@ As a reference, the basic steps for working with GitHub Flow are as follows: * Pull the most recent _upstream_ version of the _main branch_. * Merge the updated _main branch_ into your _feature branch_. * Push your _feature branch_ to the _origin_. - * Make a Pull Request for your _feature branch_ to the _upstream_. + * Make a [Pull Request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) for your _feature branch_ to the _upstream_. [Clone]: https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/cloning-a-repository [FarmData2 Repository]: https://github.com/DickinsonCollege/FarmData2 diff --git a/INSTALL.md b/INSTALL.md index cea1926..e71417b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,7 @@ The FarmData2 repository contains a sample database with anonymized data from se ./setDB.bash sample ``` -When this command completes there should be a `db` directory in the `docker` directory. The files in this `db` directory are a mySQL database that contain the sample data. Note that you will only need to do this step once. But the above comman can be used at any time to reset the database to its initial state. +When this command completes there should be a `db` directory in the `docker` directory. The files in this `db` directory are a mySQL database that contain the sample data. Note that you will only need to do this step once. But the above command can be used at any time to reset the database to its initial state. #### Starting FarmData2 #### @@ -84,7 +84,7 @@ To start FarmData2 ensure that you are in the `docker` directory in the reposito ./fd2-up.bash ``` -This command will starts up the docker containers that are used by FarmData2. There will be lots of output from this command and the first time you run it, it may take a while to complete as it pulls, downloads and extracts the docker images to your machine. +This command will start up the docker containers that are used by FarmData2. There will be lots of output from this command and the first time you run it, it may take a while to complete as it pulls, downloads and extracts the docker images to your machine. If you encounter an error similar to `Cannot start service www`, it can likely be fixed by entering the command ``` diff --git a/ONBOARDING.md b/ONBOARDING.md index c76f883..fa25d63 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -2,7 +2,7 @@ This document provides an overview of the technologies used in FarmData2, describes the roles that they play and provides resources for learning the essentials of each. -Interacting with FarmData2 requires a basic familiarity with git and GitHub. FarmData2 development uses a fairly standard web technology stack including HTML, CSS, Bootstrap, JavaScript, and Vue.js. The front-end accesses FarmData2 data through the [FarmOS API](https://farmos.org/development/api/) using the [Axios](https://github.com/axios/axios) library. End-to-end testing is done using the [Cypress framework](https://www.cypress.io/). The automation, configuration and back-end development of FarmData2 use a number of other technologies including Drupal, drush, FarmOS, Docker, docker-compose and bash scripting. +Interacting with FarmData2 requires a basic familiarity with git and GitHub. FarmData2 development uses a fairly standard web technology stack including HTML, CSS, Bootstrap, JavaScript, and Vue.js. The front-end accesses FarmData2 data through the [FarmOS API](https://v1.farmos.org/development/api/) using the [Axios](https://github.com/axios/axios) library. End-to-end testing is done using the [Cypress framework](https://www.cypress.io/). The automation, configuration and back-end development of FarmData2 use a number of other technologies including Drupal, drush, FarmOS, Docker, docker-compose and bash scripting. This document is intended to be used in two ways. When you are new to FarmData2, it is recommended that you work through this document from the top down. However, it is not essential that you fully master every tool and technology on the first pass. Rather once you feel basically comfortable with a tool or technology (or if you already know it) skip to the next one. Then later, while working on FarmData2 you can return to this document and jump directly to the relevant section(s) to find a reference or to learn a little bit more as needed. @@ -12,7 +12,7 @@ Before continuing, If you haven't already, please review the [README](README.md) ## Communications ## -The FarmData2 community uses [Zulip](https://zulip.com/) as it communication platform. Zulip is a group chat application that blends the benefits of asynchronous threaded discussions (e.g. a forum) with live chat. +The FarmData2 community uses [Zulip](https://zulip.com/) as its communication platform. Zulip is a group chat application that blends the benefits of asynchronous threaded discussions (e.g. a forum) with live chat. Connecting with the [FarmData2 community](https://farmdata2.zulipchat.com/) on Zulip provides a place to ask questions of the project managers and the broader developer community. @@ -29,10 +29,10 @@ The following resources can be useful for learning what you'll need to know abou - Resources: - [Hello World](https://guides.github.com/activities/hello-world/): A first introduction to GitHub that will get you started if you haven't used it before. - - [GitFlow Intro](https://guides.github.com/introduction/flow/): An introduction to an effective way of using GitHub (i.e. a _workflow_). The followign two guides walk through how to work with existing open source projects and essentially follow GitFlow: + - [GitFlow Intro](https://guides.github.com/introduction/flow/): An introduction to an effective way of using GitHub (i.e. a _workflow_). The following two guides walk through how to work with existing open source projects and essentially follow GitFlow: - [Step-by-step guide to contributing on GitHub](https://www.dataschool.io/how-to-contribute-on-github/) - [7 Steps to Get Started with Git](https://www.fosslife.org/7-steps-get-started-git). - - [Git Immersion](https://gitimmersion.com/): A tutorial walks through a series of short hands-on exercises that provide practice with the key features of git. + - [Git Immersion](https://gitimmersion.com/): A tutorial that walks through a series of short hands-on exercises that provide practice with the key features of git. - [Pro Git Book](http://git-scm.com/book/en/v2) | [Learn Git Tutorial](https://www.tutorialspoint.com/git/index.htm): More detailed and comprehensive coverage of git's features and use. ## Quickest Start ## @@ -45,7 +45,7 @@ FarmData2 has been used in a number of undergraduate computer science courses an The activities will guide you from an introduction to FOSS and FarmData2, through installation of FarmData2 and then through the use of each of the key technologies used in FarmData2. Each activity includes practice using the technologies within the context of FarmData2. Thus, you'll learn not only the technologies, but will get comfortable working within the FarmData2 developer environment as well. -If you use these activities, please keep in mind that they were created for use as assignments in courses. Thus, you shouldn't feel obligated to answer every question and you should skip over any class specific parts that don't make sense outside of a course. When you have completed all of the activities you'll be well on your way to being a FarmData2 developer. In addition, while these activites will be updated as FarmData2 evolves, they may not be fully in synch with the latest code in the repository. If you run in to any issues, use the +If you use these activities, please keep in mind that they were created for use as assignments in courses. Thus, you shouldn't feel obligated to answer every question and you should skip over any class specific parts that don't make sense outside of a course. When you have completed all of the activities you'll be well on your way to being a FarmData2 developer. In addition, while these activites will be updated as FarmData2 evolves, they may not be fully in synch with the latest code in the repository. If you run in to any issues, use the [FarmData2 School Stream on Zulip](https://farmdata2.zulipchat.com/#narrow/stream/291820-FarmData2-School) - 01 - Introduction to FOSS & The FarmData2 Community [ [docx](media/Activities/01-IntroToFarmData2.docx) | [pdf](media/Activities/01-IntroToFarmData2.pdf) ] - 02 - FarmData2 Developer Install [ [docx](media/Activities/02-DeveloperInstall.docx) | [pdf](media/Activities/02-DeveloperInstall.pdf) ] @@ -79,7 +79,7 @@ When the IDE opens: The explorer on the left will show the contents and structure of the FarmData2 repository. If you are familiar with other IDEs then using Theia should be relatively straight forward. - Resources: - - [How to use Eclipse Theia as an IDE](https://eclipsesource.com/blogs/2019/10/04/how-to-use-eclipse-theia-as-an-ide/): An overview of Theia and its use ad an Integrated Development Environment. + - [How to use Eclipse Theia as an IDE](https://eclipsesource.com/blogs/2019/10/04/how-to-use-eclipse-theia-as-an-ide/): An overview of Theia and its use as an Integrated Development Environment. As FarmData2 matures, utilities (e.g. linters and formatters) will be added to the provided Theia IDE. If you choose to use a different editor, all such utilities will be documented in the [INSTALL.md](INSTALL.md) file so that you can install the appropriate plugins for your editor. @@ -133,13 +133,13 @@ The majority of development for FarmData2 is front-end (i.e. browser-based). Th #### FarmOS API #### -The FarmData2 front end exchanges data with the server using the [FarmOS API](https://farmos.org/development/api/). JavaScript code using the [Axios](https://github.com/axios/axios) library requests data from FarmOS (e.g. a list of fields) or sends new data to FarmOS (e.g. a new planting). When data is received from FarmOS, the Vue.js object is updated, which in turn updates what is displayed in the browser. Conversely, when the user enters data in the browser, that data updates the Vue.js object and that information is used to make requests to the server. +The FarmData2 front end exchanges data with the server using the [FarmOS API](https://v1.farmos.org/development/api/). JavaScript code using the [Axios](https://github.com/axios/axios) library requests data from FarmOS (e.g. a list of fields) or sends new data to FarmOS (e.g. a new planting). When data is received from FarmOS, the Vue.js object is updated, which in turn updates what is displayed in the browser. Conversely, when the user enters data in the browser, that data updates the Vue.js object and that information is used to make requests to the server. - Resources: - [What is an API and how does it work?](https://www.youtube.com/watch?v=Yzx7ihtCGBs): A video introduction to APIs with a few examples.This is a good place to start if you are new to APIs. - [Using Axios to Consume APIs](https://vuejs.org/v2/cookbook/using-axios-to-consume-apis.html): A short example of a `GET` request using Axios and Vue.js. - [Axios](https://github.com/axios/axios): Full documentation for the axios library. This show how to do both `GET` and `POST` requests. - - [FarmOS API](https://farmos.org/development/api/): Documentation for the FarmOS API. + - [FarmOS API](https://v1.farmos.org/development/api/): Documentation for the FarmOS API. - [Hoppscotch](https://hoppscotch.io/): A tool for experimenting with API calls. This can be useful in figuring out how to request what you want from the FarmData2 API and how its responses are formatted. #### Bootstrap #### @@ -158,14 +158,14 @@ The functionality of FarmData2 is tested using the [Cypress framework](https://w The Cypress end-to-end test framework works by controlling the web browser. A test typically consists of a series of steps that are automated by the Cypress tests, called _spec_s. A typical spec consist of the steps: 1. Setup the test (e.g. login, prime the database) 1. Visit a specific page - 1. Query the page for an _html element_ of interest (e.g. button, ext field) + 1. Query the page for an _html element_ of interest (e.g. button, text field) 1. Interact with that element (e.g. click the button, enter some text) 1. Make an assertion about the result (e.g. new information appears on the page) - Resources - [Introduction to Cypress](https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html): As the docs say... "the single most important guide for understanding how to test with Cypress. Read it. Understand it." - [Writing Your First Test](https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Add-a-test-file): A good overview of how a typical cypres test work, what the code looks like and how to use the cypress test runner. - - [Selecting Elements](https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements): Best practices for selecting elements that are manipulated and checked by your tests. Following these will make you tests less brittle. + - [Selecting Elements](https://docs.cypress.io/guides/references/best-practices.html#Selecting-Elements): Best practices for selecting elements that are manipulated and checked by your tests. Following these will make your tests less brittle. - [Selector Playground](https://docs.cypress.io/guides/core-concepts/test-runner.html#Selector-Playground): A tool within the cypress test runner that will help you find good selectors to use for the elements used in your tests. - [Interacting with Elements](https://docs.cypress.io/guides/core-concepts/interacting-with-elements): The main commands in cypress for interacting with elements in the page (e.g. click, select, etc.) - [should](https://docs.cypress.io/api/commands/should.html#Syntax): Documentation for the `should` statement that is used to make assertions in cypress tests. diff --git a/README.md b/README.md index 26c2c3a..4653209 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you are unfamiliar with [Zulip](https://zulip.com/) it is a group chat applic ### History ### -FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://a.different.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. +FarmData2 is both a _second_ edition of it predecessor, FarmData, and the integration of _two_ related projects FarmData and AnimalData. These projects were conceived and built by Tim Wahls, Matt Steiman and many students to support operation of the [Dickinson College Farm](https://not.the.right.link1). The FarmData2 project was initiated as a part of curricular redesign in the Computer Science Department at Dickinson College. It is now an active part of several courses in the curriculum. It provides students in these courses with early and sustained opportunities to learn and practice modern software development within the context of an open source software community. ### Acknowledgements ### @@ -33,7 +33,7 @@ Support and assistance with FarmData2 development has been received from [The No The development of FarmData2 has received partial support from: * The [GNOME Community Engagement Challenge](https://a.different.link3): * [![Phase 1 Badge](media/GNOME-CEC-p1-small.png)](media/GNOME-CEC-p1.png)[![Phase 2 Badge](media/GNOME-CEC-p2-small.png)](media/GNOME-CEC-p2.png) -* The National Science Foundation (DUE-2013069) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. +* The National Science Foundation ([DUE-2013069](https://not.the.right.link4)) - Collaborative Research: Broadening Participation in Computing through Authentic, Collaborative Engagement with Computing for the Greater Good. * [Zulip](https://zulip.com) provides sponsored hosting for [FarmData2 community discussions](https://farmdata2.zulipchat.com/#narrow/stream/270883-general). --- diff --git a/farmdata2_modules/fd2_tabs/fd2_example/README.md b/farmdata2_modules/fd2_tabs/fd2_example/README.md index de15dd3..ef266c3 100644 --- a/farmdata2_modules/fd2_tabs/fd2_example/README.md +++ b/farmdata2_modules/fd2_tabs/fd2_example/README.md @@ -1,6 +1,6 @@ # FarmData2 Modules # -FarmData2 is built using Drupal modules that run within FarmOS. The _FieldKit_ and _BarnKit_ tabs in the FarmData2 interface are created by modules. The _FD2 Example_ tab is created by a sample module and can be used as a sandbox in which to learn about and experiment FarmData2 modules like those that produce the _FieldKit_ and _BarnKit_ tabs. +FarmData2 is built using Drupal modules that run within FarmOS. The _FieldKit_ and _BarnKit_ tabs in the FarmData2 interface are created by modules. The _FD2 Example_ tab is created by a sample module and can be used as a sandbox in which to learn about and experiment with FarmData2 modules like those that produce the _FieldKit_ and _BarnKit_ tabs. ## FarmData2 Module Structure ## @@ -8,7 +8,7 @@ As mentioned, each of the tabs in the FarmData2 interface are created by Drupal A FarmData2 module named `xyz` would include a folder within `farmdata2_modules/fd2_tabs` named `xyz`. That folder will contain at least the following files and directories, where `xyz`, `abc` and `pqr` are simply place holders and should be replaced with module specific names. - `fd2_xyz.info`: Defines the module `xyz` so that it is recognized by Drupal. -- `fd2_xyz.module`: Contains the PHP implementation of the `xyz` module. This code determines where and when the tab is visible based on the user's role (e.g. `admin`, _manager_, _worker_ or _guest_). It also defines the sub-tabs and their content. +- `fd2_xyz.module`: Contains the PHP implementation of the `xyz` module. This code determines where and when the tab is visible based on the user's role (e.g. `admin`, `manager`, `worker` or `guest`). It also defines the sub-tabs and their content. - `abc.html`: The content for a sub-tab `abc` within the `xyz` module (e.g. `info.html`, `ex1.html`). - `abc.spec.js`: A test file containing end-to-end tests for the `abc.html` page. The end-to-end tests are written using the Cypress testing tools (more info below). If multiple test files are used for the `abc.html` file, they should be named `abc.pqr.spec.js` where `pqr` clarifies the testing performed by the file. Multiple additional . and names can be used as necessary, but the filename of the test must end with `.spec.js` in order to be recognized by the FarmData2 Cypress configuration. - `cypress`: A directory containing additional module level end-to-end tests for the `xyz` module. These are tests that are important for the module but that are not associated with a specific sub-tab (i.e. `html` file). These test files must also be named `*.spec.js` to be recognized by the FarmData2 Cypress configuration. @@ -75,7 +75,7 @@ To add a new sub-tab to the `xyz` module: ### JavaScript and CSS Libraries ### -JavaScript and CSS libraries can be included in module by adding them to the module configuration files (i.e. `.info` and `.module`). +JavaScript and CSS libraries can be included in a module by adding them to the module configuration files (i.e. `.info` and `.module`). #### Local Libraries #### @@ -215,4 +215,4 @@ Resources and references for writing Cypress tests for Vue Components can be fou The Cypress test runner (discussed above) also provides support for running Vue Component tests in the same Docker container. The Vue Component tests are run from the `farmdata2_modules` directory using the command: - `./test_runner.bash ct` -As noted above if this is the first time the Cypress test runner is launched it will take a number of minutes. Subsequent launches will be much faster. \ No newline at end of file +As noted above if this is the first time the Cypress test runner is launched it will take a number of minutes. Subsequent launches will be much faster.