From f48afd376035f9d076c931a58728c4fce236525c Mon Sep 17 00:00:00 2001 From: Caden Buckhalt Date: Thu, 22 Jun 2023 16:36:57 -0500 Subject: [PATCH 01/11] make rules a ValidatedField component to allow require --- src/components/sections/fields/SkipLogicFields.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/sections/fields/SkipLogicFields.js b/src/components/sections/fields/SkipLogicFields.js index 160b8ffc7..af196a9bd 100644 --- a/src/components/sections/fields/SkipLogicFields.js +++ b/src/components/sections/fields/SkipLogicFields.js @@ -1,5 +1,4 @@ import React from 'react'; -import { Field } from 'redux-form'; import RadioGroup from '@codaco/ui/lib/components/Fields/RadioGroup'; import ValidatedField from '@components/Form/ValidatedField'; import { @@ -27,10 +26,10 @@ const SkipLogicFields = () => ( - From 17ad96d53ff22fcbd7e56e88eba971fa472aa57d Mon Sep 17 00:00:00 2001 From: Caden Buckhalt Date: Thu, 22 Jun 2023 17:06:25 -0500 Subject: [PATCH 02/11] attempt to fix python 2.7 github actions issue --- .github/workflows/dist.yml | 2 ++ .github/workflows/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index c0be8dadb..70570e4d8 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -10,6 +10,8 @@ on: jobs: dist: runs-on: ubuntu-20.04 + container: + image: python:2.7.18-buster steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e394b3f0..ada207606 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,8 @@ on: jobs: test: runs-on: ubuntu-20.04 + container: + image: python:2.7.18-buster steps: - uses: actions/checkout@v3 with: From 443694b7f8583ff6778e81e1923f07d3c245e772 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 23 Jun 2023 12:12:37 +0200 Subject: [PATCH 03/11] remove setup-python step, since we are now using a container runner with python 2.7 built in --- .github/workflows/dist.yml | 10 +++------- .github/workflows/main.yml | 16 ++++++---------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 70570e4d8..6fe2dded6 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -2,7 +2,7 @@ name: Dist on: push: branches: - - 'release/**' + - "release/**" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -16,17 +16,13 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - # Set python version to 2.x due to node-gyp and sass - - uses: actions/setup-python@v4 - with: - python-version: '2.7.18' # update apt cache - name: Update apt cache run: sudo apt-get update -y # Set node version - uses: actions/setup-node@v2 with: - node-version: '14.21.3' + node-version: "14.21.3" - name: Set NPM 7 run: npm install -g npm@8.3.2 # Cache node_modules @@ -34,7 +30,7 @@ jobs: env: cache-name: cache-node-modules with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ada207606..91fb8d92f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,7 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: # Allows you to run this workflow manually from the Actions tab @@ -16,17 +16,13 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - # Set python version to 2.x due to node-gyp and sass - - uses: actions/setup-python@v4 - with: - python-version: '2.7.18' # update apt cache - name: Update apt cache run: sudo apt-get update -y # Set node version - uses: actions/setup-node@v2 with: - node-version: '14.21.3' + node-version: "14.21.3" - name: Set NPM 7 run: npm install -g npm@8.3.2 # Cache node_modules @@ -34,7 +30,7 @@ jobs: env: cache-name: cache-node-modules with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies @@ -59,14 +55,14 @@ jobs: # Set python version to 2.x due to node-gyp and sass - uses: actions/setup-python@v4 with: - python-version: '2.7.18' + python-version: "2.7.18" # update apt cache - name: Update apt cache run: sudo apt-get update -y # Set node version - uses: actions/setup-node@v2 with: - node-version: '14.21.3' + node-version: "14.21.3" - name: Set NPM 7 run: npm install -g npm@8.3.2 # Cache node_modules @@ -74,7 +70,7 @@ jobs: env: cache-name: cache-node-modules with: - path: '**/node_modules' + path: "**/node_modules" key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies From 6a5187517f9968bfee7cb86f04f0d765805f132a Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 23 Jun 2023 12:16:37 +0200 Subject: [PATCH 04/11] install missing sudo package, and add correct container for test action --- .github/workflows/dist.yml | 2 ++ .github/workflows/main.yml | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 6fe2dded6..eed81b489 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -13,6 +13,8 @@ jobs: container: image: python:2.7.18-buster steps: + - name: Install sudo package + run: apt update && apt install sudo - uses: actions/checkout@v3 with: submodules: recursive diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91fb8d92f..e7878593a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,8 @@ jobs: container: image: python:2.7.18-buster steps: + - name: Install sudo package + run: apt update && apt install sudo - uses: actions/checkout@v3 with: submodules: recursive @@ -48,14 +50,14 @@ jobs: build: needs: test runs-on: ubuntu-20.04 + container: + image: python:2.7.18-buster steps: + - name: Install sudo package + run: apt update && apt install sudo - uses: actions/checkout@v3 with: submodules: recursive - # Set python version to 2.x due to node-gyp and sass - - uses: actions/setup-python@v4 - with: - python-version: "2.7.18" # update apt cache - name: Update apt cache run: sudo apt-get update -y From e8869c4a9cb8b8f50d03d06a59498f832cfea671 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 23 Jun 2023 12:19:05 +0200 Subject: [PATCH 05/11] add -y to apt-get install --- .github/workflows/dist.yml | 2 +- .github/workflows/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index eed81b489..21eb7c6e3 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -36,7 +36,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies - run: sudo apt-get install libavahi-compat-libdnssd-dev + run: sudo apt-get install libavahi-compat-libdnssd-dev -y - name: Install node modules run: npm install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7878593a..0a087696a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies - run: sudo apt-get install libavahi-compat-libdnssd-dev + run: sudo apt-get install libavahi-compat-libdnssd-dev -y - name: Install node modules run: npm install @@ -76,7 +76,7 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies - run: sudo apt-get install libavahi-compat-libdnssd-dev + run: sudo apt-get install libavahi-compat-libdnssd-dev -y - name: Install node modules run: npm install From b4d693514f132a081b41a833854eaf359e810ba2 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 23 Jun 2023 12:27:23 +0200 Subject: [PATCH 06/11] attempt to increase action heap size --- .github/workflows/dist.yml | 2 ++ .github/workflows/main.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 21eb7c6e3..c01e90b36 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -39,6 +39,8 @@ jobs: run: sudo apt-get install libavahi-compat-libdnssd-dev -y - name: Install node modules + env: + NODE_OPTIONS: "--max_old_space_size=4096" run: npm install - name: Delete current release assets diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a087696a..7c8bf4ed1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,8 @@ jobs: run: sudo apt-get install libavahi-compat-libdnssd-dev -y - name: Install node modules + env: + NODE_OPTIONS: "--max_old_space_size=4096" run: npm install - name: Lint @@ -79,6 +81,8 @@ jobs: run: sudo apt-get install libavahi-compat-libdnssd-dev -y - name: Install node modules + env: + NODE_OPTIONS: "--max_old_space_size=4096" run: npm install - name: Build From ea9d9399387e034130da5847c72eb30006998d91 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 23 Jun 2023 12:47:21 +0200 Subject: [PATCH 07/11] attempt to chown repo --- .github/workflows/dist.yml | 2 ++ .github/workflows/main.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index c01e90b36..2271cd189 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -18,6 +18,8 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - name: Chown repo + run: sudo chown -R $USER:$USER . # update apt cache - name: Update apt cache run: sudo apt-get update -y diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c8bf4ed1..189a908bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,8 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - name: Chown repo + run: sudo chown -R $USER:$USER . # update apt cache - name: Update apt cache run: sudo apt-get update -y @@ -60,6 +62,8 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - name: Chown repo + run: sudo chown -R $USER:$USER . # update apt cache - name: Update apt cache run: sudo apt-get update -y From 17ffb4877388e906627bb8ec4ae5ed1a36e5206f Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 23 Jun 2023 15:23:45 +0200 Subject: [PATCH 08/11] update for Python 3 compatibility --- .github/workflows/dist.yml | 15 +- .github/workflows/main.yml | 30 +- README.md | 84 +- package-lock.json | 135049 +++++++++++++++++----------------- package.json | 2 +- 5 files changed, 68597 insertions(+), 66583 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 2271cd189..e9cc73721 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -10,16 +10,13 @@ on: jobs: dist: runs-on: ubuntu-20.04 - container: - image: python:2.7.18-buster steps: - - name: Install sudo package - run: apt update && apt install sudo - uses: actions/checkout@v3 with: submodules: recursive - - name: Chown repo - run: sudo chown -R $USER:$USER . + - uses: actions/setup-python@v4 + with: + python-version: "3.10.12" # update apt cache - name: Update apt cache run: sudo apt-get update -y @@ -28,7 +25,7 @@ jobs: with: node-version: "14.21.3" - name: Set NPM 7 - run: npm install -g npm@8.3.2 + run: npm install -g npm@8.19.4 # Cache node_modules - uses: actions/cache@v2 env: @@ -38,11 +35,9 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies - run: sudo apt-get install libavahi-compat-libdnssd-dev -y + run: sudo apt-get install libavahi-compat-libdnssd-dev - name: Install node modules - env: - NODE_OPTIONS: "--max_old_space_size=4096" run: npm install - name: Delete current release assets diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 189a908bd..ee54f70e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,16 +10,13 @@ on: jobs: test: runs-on: ubuntu-20.04 - container: - image: python:2.7.18-buster steps: - - name: Install sudo package - run: apt update && apt install sudo - uses: actions/checkout@v3 with: submodules: recursive - - name: Chown repo - run: sudo chown -R $USER:$USER . + - uses: actions/setup-python@v4 + with: + python-version: "3.10.12" # update apt cache - name: Update apt cache run: sudo apt-get update -y @@ -28,7 +25,7 @@ jobs: with: node-version: "14.21.3" - name: Set NPM 7 - run: npm install -g npm@8.3.2 + run: npm install -g npm@8.19.4 # Cache node_modules - uses: actions/cache@v2 env: @@ -38,11 +35,9 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies - run: sudo apt-get install libavahi-compat-libdnssd-dev -y + run: sudo apt-get install libavahi-compat-libdnssd-dev - name: Install node modules - env: - NODE_OPTIONS: "--max_old_space_size=4096" run: npm install - name: Lint @@ -54,16 +49,13 @@ jobs: build: needs: test runs-on: ubuntu-20.04 - container: - image: python:2.7.18-buster steps: - - name: Install sudo package - run: apt update && apt install sudo - uses: actions/checkout@v3 with: submodules: recursive - - name: Chown repo - run: sudo chown -R $USER:$USER . + - uses: actions/setup-python@v4 + with: + python-version: "3.10.12" # update apt cache - name: Update apt cache run: sudo apt-get update -y @@ -72,7 +64,7 @@ jobs: with: node-version: "14.21.3" - name: Set NPM 7 - run: npm install -g npm@8.3.2 + run: npm install -g npm@8.19.4 # Cache node_modules - uses: actions/cache@v2 env: @@ -82,11 +74,9 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} - name: Install MDNS build dependencies - run: sudo apt-get install libavahi-compat-libdnssd-dev -y + run: sudo apt-get install libavahi-compat-libdnssd-dev - name: Install node modules - env: - NODE_OPTIONS: "--max_old_space_size=4096" run: npm install - name: Build diff --git a/README.md b/README.md index 633871cb7..7d9f4ba88 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,52 @@ # Architect [![Build Status](https://travis-ci.org/complexdatacollective/Architect.svg?branch=master)](https://travis-ci.org/complexdatacollective/Architect) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcomplexdatacollective%2FArchitect.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcomplexdatacollective%2FArchitect?ref=badge_shield) - -Technologies used: -ES6 (via Babel) -React -Redux -Electron -Cordova -SCSS -Jest (Testing suite) -React Scripts -# Operation +Network Canvas Architect is a survey design tool for the [Network Canvas](https://networkcanvas.com) suite of applications. It is built on [Electron](https://electronjs.org/) and [React](https://reactjs.org/). + +**This tool is in maintainance mode.** We are not actively developing new features, but will continue to fix bugs and accept pull requests. Community contributions are very welcome! + +See the [Network Canvas](https://networkcanvas.com) website for more information. + +For questions and support, please visit the [Network Canvas User Community](https://community.networkcanvas.com/). + +## Setting up a development environment + +### Prerequisites + +- [Node.js](https://nodejs.org/en/) (v14.21.3) +- [npm](https://www.npmjs.com/) (v8.19.4) +- [Git](https://git-scm.com/) +- [Python](https://www.python.org/) (v3.10.12) + +### Installation + +1. Clone the repository + +```sh +git clone https://github.com/complexdatacollective/Architect.git +``` + +2. Fetch submodules -## Node/NPM Version +```sh +git submodule update --init --recursive -f +``` -This project currently requires version `14.21.3` of node, and version `8.3.2` of npm. These are the only supported versions for this project. +3. Install NPM packages -As a convenience, the repository contains a `.node-version` file that enables convinient use of a node environment manager. + ```sh + npm install + ``` -## Installation -This repository assumes that `npm` is installed. If you don't have it installed, here are [installation instructions](https://docs.npmjs.com/getting-started/installing-node). +Note: for Apple Silicon users, you need to install the `electron` package manually: -0. Install the correct node and npm versions -1. Clone this repository. -2. Fetch submodules by typing `git submodule update --init --recursive -f`. -3. Enter the directory where the repository is cloned, and install the project dependencies by typing `npm install`. -4. Refer to the development tasks section below to learn how to test and build the app. +```sh + npm install electron --arch=x86 +``` -### Available commands: +# Operation |`npm run