From 1e228a0d45c3952ebb5d70281b33223069024a2c Mon Sep 17 00:00:00 2001 From: Christopher Cave-Ayland Date: Thu, 9 Dec 2021 16:00:39 +0000 Subject: [PATCH] Expand instructions for importing code to Anvil --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 7274cba..82d5776 100644 --- a/README.md +++ b/README.md @@ -92,22 +92,64 @@ The spreadsheet metadata includes: - Example Pathways - Output Lever details: names, groups, tooltips -The Anvil App can be edited by using the online Anvil editor. This will require making a free Anvil account and creating your own project then force-pushing this repo to that project. - -Once you have created a new app in Anvil named `Template2050Calculator`, add it as a remote named `anvil` to this repo with: -```bash -git remote add anvil -``` - -Where `` can be found under `Settings->Share App->Clone with Git`. It is the url section (it should begin with `ssh` and end with `.git`). - -Now that you have the remote you will need to create a `master` branch and push that to Anvil: -```bash -git checkout -b master -git push -u anvil master -``` - -Now return to Anvil and refresh the page. The editor should be updated with this repo! You can now begin graphically editing the layout of the graph. Anvil has very detailed [documentation on the Anvil Editor](https://anvil.works/docs/editor). +##### e) Using the Anvil Online Editor + +The Anvil App can be edited by using the online Anvil editor, available at . When prompted create an account. Note that these instructions assume you are using the new Beta version of the Anvil Editor at time of writing. This is currently accessible at however will become the default editor. + +- If you have not already done so install [git][]. Git should now be available + in your terminal or powershell. Test this by running `git --version`. +- Make sure your copy of the Template2050Calculator code is a Git repository: + - From the code directory run `git status`. If you see a fatal error message complete the next step. + - Run the following commands in the Template2050Calculator code directory: + ``` + git init -b main + git remote add -m main -f origin https://github.com/ImperialCollegeLondon/Template2050Calculator.git + git reset refs/remotes/origin/HEAD + git branch -u origin + ``` +- Run the following command to incorporate any changes that may have been made into the + repository: + ``` + git commit -a -m "Updates" + ``` +- To configure authentication with Anvil run the following commands: For Mac/Linux: + ``` + mkdir -p ~/.ssh + cat >> ~/.ssh/config <