From 277f2d27a544d218452e13b168be4949b16fa810 Mon Sep 17 00:00:00 2001 From: kyrylo Date: Wed, 4 Jan 2023 20:18:01 +0100 Subject: [PATCH 1/3] Update README.md --- README.md | 11 +++++++++++ txmatching/web/frontend/README.md | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/README.md b/README.md index 61416988f..58845f01f 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,17 @@ sudo apt install wget xfonts-75dpi cd /tmp ``` +To successfully install `wkhtmltopdf` you need `libssl1.1.1` +(You may need to install it manually because in newer versions of Ubuntu (e.g. 22.04 LTS) is used newer version of libssl, +which is not compatible with wkhtmltopdf). + +``` +wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.16_amd64.deb +wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb +sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2.16_amd64.deb +sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb +``` + `wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb` (choose your version) `sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb` (of the correct version that you want to install) diff --git a/txmatching/web/frontend/README.md b/txmatching/web/frontend/README.md index 6153dd9a3..46696359f 100644 --- a/txmatching/web/frontend/README.md +++ b/txmatching/web/frontend/README.md @@ -33,6 +33,8 @@ and then: npm -v ``` +Make sure Node.js is of the latest versions (preferably 18.0+). + ### Angular In Terminal or Command line run: @@ -41,6 +43,8 @@ In Terminal or Command line run: npm install -g @angular/cli ``` +(In Ubuntu based system you may need to run it with superuser rights) + It will globally install Angular on your machine. ### OpenAPI Generator @@ -51,6 +55,18 @@ We use _openapi-generator_ to automatically generate TS files from swagger. Plea npm install -g @openapitools/openapi-generator-cli ``` +(In Ubuntu based system you may need to run it with superuser rights) + +Here comes very interesting part: openapi generator from npm comes in quite old version +(at the time it is written) that is not very suitable us. Which shouldn't be a problem, +because it is updated during the first run of `make generate-swagger-all`, +but at least in Ubuntu it cannot be updated without superuser rights, so `make` commands will not work +(by some reason it is not possible to run `make` commands with superuser rights). +So the part of the installation is to run any openapi-generator command with superuser rights. +For example: `sudo openapi-generator-cli validate -i txmatching/web/swagger/swagger.yaml ` - this should +update openapi-generator as well as validate swagger.yaml. Further runs of commands from Makefile related +to swagger should not have any problems. + --- Note: Navigate to `txmatching/web/frontend` before running the commands bellow. From 31bbe3d757c938b72dc24549dfd75c2d129d292c Mon Sep 17 00:00:00 2001 From: kyrylo Date: Wed, 11 Jan 2023 22:09:10 +0100 Subject: [PATCH 2/3] Small corrections --- txmatching/web/frontend/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/txmatching/web/frontend/README.md b/txmatching/web/frontend/README.md index 46696359f..6ffe58b84 100644 --- a/txmatching/web/frontend/README.md +++ b/txmatching/web/frontend/README.md @@ -57,11 +57,11 @@ npm install -g @openapitools/openapi-generator-cli (In Ubuntu based system you may need to run it with superuser rights) -Here comes very interesting part: openapi generator from npm comes in quite old version +Here comes very interesting part: openapi generator from npm comes in a quite old version (at the time it is written) that is not very suitable us. Which shouldn't be a problem, because it is updated during the first run of `make generate-swagger-all`, but at least in Ubuntu it cannot be updated without superuser rights, so `make` commands will not work -(by some reason it is not possible to run `make` commands with superuser rights). +(by some reason it is not possible to run `make` commands with superuser rights in Ubuntu). So the part of the installation is to run any openapi-generator command with superuser rights. For example: `sudo openapi-generator-cli validate -i txmatching/web/swagger/swagger.yaml ` - this should update openapi-generator as well as validate swagger.yaml. Further runs of commands from Makefile related From 738b491911d2319db9fb96319817c6f59425023a Mon Sep 17 00:00:00 2001 From: Kyrylo Stadniuk Date: Mon, 30 Jan 2023 20:16:49 +0100 Subject: [PATCH 3/3] Update for macOS and removing problem description for openapi generator --- README.md | 16 +++++++++++++--- txmatching/web/frontend/README.md | 10 +--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 58845f01f..dad2e567e 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,9 @@ try to remove `node_modules` folder from `txmatching/web/frontend/`, run `npm ca Backend is written in Python. We are using [conda](https://docs.conda.io/en/latest/miniconda.html) for dependency management. To be able to run the project you must have it installed. +If you are using macOS on an ARM-based computer, make sure that you install anaconda for x86_64 architecture using rosetta. +(Some packages still are not built for ARM). + After you have conda ready and setup. Execute `make conda-create` which creates Conda env for you. Finally, activate the environment with `conda activate txmatching` @@ -44,15 +47,22 @@ Finally, activate the environment with `conda activate txmatching` For pdf generation, a [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) is required to be installed. +##### macOS +In macOS it can be installed via brew: +``` +brew install wkhtmltopdf +``` + +##### Linux and WSL +With linux it is a bit more complicated: ``` sudo apt update sudo apt install wget xfonts-75dpi cd /tmp ``` -To successfully install `wkhtmltopdf` you need `libssl1.1.1` -(You may need to install it manually because in newer versions of Ubuntu (e.g. 22.04 LTS) is used newer version of libssl, -which is not compatible with wkhtmltopdf). +Also, you may need to install `libssl1.1.1` because newer versions +of Ubuntu (e.g. 22.04 LTS) use a newer version of libssl, which is not compatible with wkhtmltopdf. ``` wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.16_amd64.deb diff --git a/txmatching/web/frontend/README.md b/txmatching/web/frontend/README.md index 6ffe58b84..e4500f2fb 100644 --- a/txmatching/web/frontend/README.md +++ b/txmatching/web/frontend/README.md @@ -57,15 +57,7 @@ npm install -g @openapitools/openapi-generator-cli (In Ubuntu based system you may need to run it with superuser rights) -Here comes very interesting part: openapi generator from npm comes in a quite old version -(at the time it is written) that is not very suitable us. Which shouldn't be a problem, -because it is updated during the first run of `make generate-swagger-all`, -but at least in Ubuntu it cannot be updated without superuser rights, so `make` commands will not work -(by some reason it is not possible to run `make` commands with superuser rights in Ubuntu). -So the part of the installation is to run any openapi-generator command with superuser rights. -For example: `sudo openapi-generator-cli validate -i txmatching/web/swagger/swagger.yaml ` - this should -update openapi-generator as well as validate swagger.yaml. Further runs of commands from Makefile related -to swagger should not have any problems. +Also make sure that you have Java installed on your machine, as it is required by _openapi-generator_. ---