Skip to content

Commit

Permalink
Update for macOS and removing problem description for openapi generator
Browse files Browse the repository at this point in the history
  • Loading branch information
krllstdn committed Jan 30, 2023
1 parent 67391b6 commit 432ea56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
(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`
Expand All @@ -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
Expand Down
10 changes: 1 addition & 9 deletions txmatching/web/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_.

---

Expand Down

0 comments on commit 432ea56

Please sign in to comment.