Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
venv-${{ runner.os }}-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
env:
UV_MALWARE_CHECK: "1"
run: |
uv sync --frozen --no-install-project
- name: Run typecheck
Expand Down Expand Up @@ -61,6 +63,8 @@ jobs:
venv-${{ runner.os }}-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
env:
UV_MALWARE_CHECK: "1"
run: |
uv sync --frozen --no-install-project
- name: Run guardrail checks
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/astral-sh/uv:0.11.18@sha256:78bc42400d77b0678ba95765305c826652ed5431f399257271dda681d0318f03 AS uv
FROM ghcr.io/astral-sh/uv:0.11.19@sha256:b46b03ddfcfbf8f547af7e9eaefdf8a39c8cebcba7c98858d3162bd28cf536f6 AS uv

FROM ubuntu:24.04@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS builder

Expand Down Expand Up @@ -55,7 +55,7 @@ RUN echo '. $HOME/.venv/bin/activate' >> ~apl/.bashrc
COPY --chown=apl:apl . /app/ibet-Wallet-API
RUN cd /app/ibet-Wallet-API \
&& uv venv $UV_PROJECT_ENVIRONMENT \
&& uv sync --frozen --no-install-project --no-dev \
&& UV_MALWARE_CHECK=1 uv sync --frozen --no-install-project --no-dev \
&& PYTHON_BIN="$(uv python find $PYTHON_VERSION)" \
&& PYTHON_ROOT="$(dirname "$(dirname "$PYTHON_BIN")")" \
&& rm -f "$PYTHON_ROOT"/bin/pip "$PYTHON_ROOT"/bin/pip3 "$PYTHON_ROOT"/bin/pip3.* \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: format lint typecheck doc test test_guardrail_check test_guardrail test_migrations run

install:
uv sync --frozen --no-install-project --all-extras
UV_MALWARE_CHECK=1 uv sync --frozen --no-install-project --all-extras
uv run pre-commit install

update:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $ uv venv

Install python packages with:
```bash
$ uv sync --frozen --no-install-project --no-dev
$ make install
```

### Dependency update policy
Expand All @@ -78,12 +78,12 @@ See [DB Migration Guide](migrations/README.md).

## Starting and Stopping the Server

You can start (or stop) the API server with:
You can start the API server with:
```bash
$ ./bin/run_server.sh start(stop)
$ make run
```

Open your browser at [http://0.0.0.0:5000](http://0.0.0.0:5000).
Open your browser at [http://127.0.0.1:8000](http://127.0.0.1:8000).

You will see the JSON response as:
```json
Expand All @@ -101,15 +101,15 @@ $ ./bin/run_processor.sh

#### Swagger UI

Now go to [http://0.0.0.0:5000/docs](http://0.0.0.0:5000/docs).
Now go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).

You will see the automatic interactive API documentation provided by Swagger UI:

![swagger](https://user-images.githubusercontent.com/963333/209300544-00afcea0-3deb-43a7-9b07-c77650459f5e.png)

#### ReDoc

And now, go to [http://0.0.0.0:5000/redoc](http://0.0.0.0:5000/redoc).
And now, go to [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc).

You will see the alternative automatic documentation provided by ReDoc:

Expand All @@ -125,7 +125,7 @@ $ uv venv

Install packages with:
```bash
$ uv sync --frozen --no-install-project
$ make install
```

You can run the tests with:
Expand Down
10 changes: 5 additions & 5 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $ uv venv

ไปฅไธ‹ใฎใ‚ณใƒžใƒณใƒ‰ใง Python ใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใพใ™ใ€‚
```bash
$ uv sync --frozen --no-install-project --no-dev
$ make install
```

### ไพๅญ˜้–ขไฟ‚ใฎๆ›ดๆ–ฐใƒใƒชใ‚ทใƒผ
Expand All @@ -84,7 +84,7 @@ API ใ‚ตใƒผใƒใƒผใฎ่ตทๅ‹•๏ผˆๅœๆญข๏ผ‰
$ ./bin/run_server.sh start(stop)
```

ใƒ–ใƒฉใ‚ฆใ‚ถใงใ€[http://0.0.0.0:5000](http://0.0.0.0:5000) ใ‚’้–‹ใใจใ€ไปฅไธ‹ใฎJSONใฎใƒฌใ‚นใƒใƒณใ‚นใ‚’็ขบ่ชใงใใ‚‹ใฏใšใงใ™ใ€‚
ใƒ–ใƒฉใ‚ฆใ‚ถใงใ€[http://127.0.0.1:8000](http://127.0.0.1:8000) ใ‚’้–‹ใใจใ€ไปฅไธ‹ใฎJSONใฎใƒฌใ‚นใƒใƒณใ‚นใ‚’็ขบ่ชใงใใ‚‹ใฏใšใงใ™ใ€‚
```json
{"server":"ibet-Wallet-API"}
```
Expand All @@ -99,7 +99,7 @@ $ ./bin/run_processor.sh

#### Swagger UI

ใ‚ตใƒผใƒใƒผใ‚’่ตทๅ‹•ใ—ใŸ็Šถๆ…‹ใงใ€[http://0.0.0.0:5000/docs](http://0.0.0.0:5000/docs) ใ‚’้–‹ใ„ใฆใใ ใ•ใ„ใ€‚
ใ‚ตใƒผใƒใƒผใ‚’่ตทๅ‹•ใ—ใŸ็Šถๆ…‹ใงใ€[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) ใ‚’้–‹ใ„ใฆใใ ใ•ใ„ใ€‚

Swagger UI ๅฝขๅผใฎใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใ‚’ๅ‚็…งใ™ใ‚‹ใ“ใจใŒใงใใ‚‹ใฏใšใงใ™ใ€‚

Expand All @@ -108,7 +108,7 @@ Swagger UI ๅฝขๅผใฎใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใ‚’ๅ‚็…งใ™ใ‚‹ใ“ใจใŒใงใใ‚‹ใฏใšใง

#### ReDoc

ๅŒๆง˜ใซใ€[http://0.0.0.0:5000/redoc](http://0.0.0.0:5000/redoc) ใ‚’้–‹ใ„ใฆใใ ใ•ใ„ใ€‚
ๅŒๆง˜ใซใ€[http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc) ใ‚’้–‹ใ„ใฆใใ ใ•ใ„ใ€‚

ReDoc ๅฝขๅผใฎใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใ‚’ๅ‚็…งใ™ใ‚‹ใ“ใจใŒใงใใ‚‹ใฏใšใงใ™ใ€‚

Expand All @@ -124,7 +124,7 @@ $ uv venv

ใƒ†ใ‚นใƒˆใงๅˆฉ็”จใ™ใ‚‹ใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใพใ™ใ€‚
```bash
$ uv sync --frozen --no-install-project
$ make install
```

ไปฅไธ‹ใฎใ‚ˆใ†ใซใƒ†ใ‚นใƒˆใ‚’ๅฎŸ่กŒใ—ใพใ™ใ€‚
Expand Down
4 changes: 2 additions & 2 deletions tests/Dockerfile_unittest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/astral-sh/uv:0.11.18@sha256:78bc42400d77b0678ba95765305c826652ed5431f399257271dda681d0318f03 AS uv
FROM ghcr.io/astral-sh/uv:0.11.19@sha256:b46b03ddfcfbf8f547af7e9eaefdf8a39c8cebcba7c98858d3162bd28cf536f6 AS uv

FROM ubuntu:24.04@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS builder

Expand Down Expand Up @@ -55,7 +55,7 @@ RUN echo '. $HOME/.venv/bin/activate' >> ~apl/.bashrc
COPY --chown=apl:apl . /app/ibet-Wallet-API
RUN cd /app/ibet-Wallet-API \
&& uv venv $UV_PROJECT_ENVIRONMENT \
&& uv sync --frozen --no-install-project \
&& UV_MALWARE_CHECK=1 uv sync --frozen --no-install-project \
&& PYTHON_BIN="$(uv python find $PYTHON_VERSION)" \
&& PYTHON_ROOT="$(dirname "$(dirname "$PYTHON_BIN")")" \
&& rm -f "$PYTHON_ROOT"/bin/pip "$PYTHON_ROOT"/bin/pip3 "$PYTHON_ROOT"/bin/pip3.* \
Expand Down
Loading