Skip to content

Commit 82cdb82

Browse files
committed
Merge remote-tracking branch 'origin/main' into 335-broken-link-or-missing-page-in-api-documentation
2 parents 8d43736 + d75b34c commit 82cdb82

38 files changed

+1248
-1380
lines changed

.github/workflows/build_client.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/build_client_sdk_with_poetry.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/generate_requirements_for_clever_cloud.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.9' # Choose your Python version
24+
python-version: '3.12' # Choose your Python version
2525

2626
- name: Install Poetry
2727
run: |
@@ -33,14 +33,14 @@ jobs:
3333
- name: Install dependencies
3434
run: poetry install
3535

36-
36+
3737
- name: Export requirements.txt
3838
run: |
3939
poetry export --without-hashes --format=requirements.txt > requirements.txt
4040
4141
- run: |
4242
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
43-
git config --local user.name "github-actions[bot]"
43+
git config --local user.name "github-actions[bot]"
4444
- run: git add requirements.txt
4545
- run: git commit --m 'generate requirements.txt from poetry' || exit 0
4646
- run: git push

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Python
2727
uses: actions/setup-python@v5
2828
with:
29-
python-version: '3.9'
29+
python-version: '3.12'
3030

3131
- name: Install pipenv
3232
run: |
@@ -42,7 +42,7 @@ jobs:
4242
if: steps.cache-pipenv.outputs.cache-hit != 'true'
4343
run: |
4444
make install
45-
45+
4646
- name: Run test suite
4747
run: make test
4848

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
test:
2727
strategy:
2828
matrix:
29-
version: ["3.9", "3.10", "3.11"]
29+
version: ["3.10", "3.11", "3.12"]
3030
runs-on: ubuntu-latest
3131
steps:
3232
- uses: actions/checkout@v4

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG PY_VERSION=3.9
1+
ARG PY_VERSION=3.12
22
FROM python:$PY_VERSION-slim AS build-env
33

44
ARG VERSION
@@ -26,8 +26,8 @@ ENV LC_ALL=C.UTF-8
2626
ENV LANG=C.UTF-8
2727

2828
COPY --from=build-env /app /app
29-
COPY --from=build-env /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
30-
ENV PYTHONPATH=/usr/local/lib/python3.9/site-packages
29+
COPY --from=build-env /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
30+
ENV PYTHONPATH=/usr/local/lib/python3.12/site-packages
3131

3232
WORKDIR /app
3333

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
CURRENT_VERSION := $(shell poetry version -s || sed -n '3s/.*version = "\(.*\)"/\1/p' pyproject.toml)
2-
TIMESTAMP := $(shell date "+%H.%M-%m-%d-%y")
2+
TIMESTAMP := $(shell date "+%m-%d-%y")
33
DOCKER_NAME := boavizta/boaviztapi:${CURRENT_VERSION}
44
SEMVERS := major minor patch
55

6-
MINIMUM_PY_VERSION=3.9
7-
MAXIMUM_PY_VERSION=3.11
6+
MINIMUM_PY_VERSION=3.10
7+
MAXIMUM_PY_VERSION=3.12
88

99
clean:
1010
find . -name "*.pyc" -exec rm -rf {} \;
@@ -64,3 +64,6 @@ docker-build:
6464

6565
docker-build-development:
6666
docker build -t boavizta/boaviztapi:${TIMESTAMP} . --build-arg VERSION=${TIMESTAMP}
67+
68+
docker-run-development:
69+
docker run -p 5000:5000 boavizta/boaviztapi:${TIMESTAMP}

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Boavizta integrates various data and methodologies, which are combined and made
2222

2323
Transparency and the popularization of scientific knowledge are of utmost importance in this project, and key aspects include open-sourcing the code, versioning the impact factors, and thoroughly documenting the project.
2424

25-
In the interest of transparency and scientific popularization, the opening of the code, the versioning of the impact factors and the documentation of the project are critical points.
25+
In the interest of transparency and scientific popularization, the opening of the code, the versioning of the impact factors and the documentation of the project are critical points.
2626

2727
The system follows a bottom-up approach in its development, organized into layers. The initial layer focuses on equipment. The second layer focues on the impacts of digital services (e.g. cloud instances) or systems. However, assessing the overall global impact of ICT is currently beyond the project's scope.
2828

2929
## :fast_forward: Test it yourself (no installation)
3030

31-
* See our pedagogical front-end app (using the API) : <https://datavizta.boavizta.org/serversimpact>
31+
* See our pedagogical front-end app (using the API): <https://datavizta.boavizta.org/serversimpact>
3232

3333
* See the OpenAPI specification: <https://api.boavizta.org/docs>
3434

@@ -44,15 +44,15 @@ The system follows a bottom-up approach in its development, organized into layer
4444
$ docker run -p 5000:5000 ghcr.io/boavizta/boaviztapi:latest
4545
```
4646

47-
Access API at http://localhost:5000
47+
Access the API at http://localhost:5000.
4848

4949
### Install using pip package
5050

5151
```bash
5252
$ pip3 install boaviztapi
5353
```
5454

55-
Then you can run the server locally with :
55+
Run the server locally with:
5656

5757
```bash
5858
$ uvicorn boaviztapi.main:app --host=localhost --port 5000
@@ -62,17 +62,17 @@ $ uvicorn boaviztapi.main:app --host=localhost --port 5000
6262

6363
### Prerequisite
6464

65-
Python 3 mandatory, python >=3.9 recommended, poetry recommended
65+
Python 3 mandatory, Python >=3.10 and [Poetry](https://python-poetry.org/) strongly recommended.
6666

6767
### Setup poetry
6868

69-
Install poetry.
69+
Install poetry (see the [install instructions](https://python-poetry.org/docs/) for more details):
7070

7171
```bash
7272
$ pip3 install poetry
7373
```
7474

75-
Install dependencies and create a python virtual environment.
75+
Install dependencies and create a Python virtual environment:
7676

7777
```bash
7878
$ make install
@@ -83,23 +83,23 @@ $ poetry shell
8383

8484
**Once in the poetry environment**
8585

86-
Development server uses [uvicorn](https://www.uvicorn.org/) and [fastapi](https://fastapi.tiangolo.com/), you can launch development server with the `uvicorn` CLI.
86+
The development server uses [uvicorn](https://www.uvicorn.org/) and [FastAPI](https://fastapi.tiangolo.com/). You can launch the development server with the `uvicorn` CLI.
8787

8888
```bash
8989
$ uvicorn boaviztapi.main:app --host=localhost --port 5000
9090
```
9191

92-
You can run the tests with `pytest`.
92+
You can run the tests with `pytest` via `make test`.
9393

9494
### Create your own docker image and run it
9595

96-
Build application package
96+
Build application package:
9797

9898
```sh
9999
make install
100100
```
101101

102-
Build docker image
102+
Build Docker image:
103103

104104
```sh
105105
# using the makefile (recommended)
@@ -109,16 +109,18 @@ make docker-build
109109
docker build --build-arg VERSION=`poetry version -s` .
110110
```
111111

112-
Run docker image
112+
Run Docker image:
113113

114114
```sh
115-
docker run -p 5000:5000/tcp boavizta/boaviztapi:latest
115+
docker run -p 5000:5000/tcp boavizta/boaviztapi:`poetry version -s`
116116
```
117117

118118
#### Alternative (if you don't have Python or Poetry)
119119

120120
```sh
121121
make docker-build-development
122+
123+
make docker-run-development
122124
```
123125

124126
### Deploy to AWS as serverless application
@@ -146,7 +148,7 @@ Once API server is launched API swagger is available at [httsp://localhost:5000/
146148

147149
## :woman: Contributing
148150

149-
See [contributing.md](./CONTRIBUTING.md)
151+
See [contributing.md](./CONTRIBUTING.md).
150152

151153
You can build a source distribution (installable with pip) with `make build`.
152154

@@ -162,10 +164,10 @@ We use [Semantic Versioning 2.0.0](https://semver.org/)
162164

163165
## :two: Publishing
164166

165-
You can run :
167+
You can run:
166168

167169
```shell
168-
API_TOKEN=<your_token> make distribute
170+
API_TOKEN=<your_token> make distribute
169171
```
170172

171173
## :scroll: License

boaviztapi/data/archetypes/cloud/aws.csv

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,12 @@ inf2.xlarge,4,16,0,0,1,inf2.48xlarge,
308308
inf2.8xlarge,32,128,0,0,1,inf2.48xlarge,
309309
inf2.24xlarge,96,384,0,0,6,inf2.48xlarge,
310310
inf2.48xlarge,192,768,0,0,12,inf2.48xlarge,
311-
is4gen.medium,1,6,937,0,0,is4gen.8xlarge,
312-
is4gen.large,2,12,1875,0,0,is4gen.8xlarge,
313-
is4gen.xlarge,4,24,3750,0,0,is4gen.8xlarge,
314-
is4gen.2xlarge,8,48,7500,0,0,is4gen.8xlarge,
315-
is4gen.4xlarge,16,96,15000,0,0,is4gen.8xlarge,
316-
is4gen.8xlarge,32,192,30000,0,0,is4gen.8xlarge,
311+
is4gen.medium,1,6,937,0,0,is4gen.metal,
312+
is4gen.large,2,12,1875,0,0,is4gen.metal,
313+
is4gen.xlarge,4,24,3750,0,0,is4gen.metal,
314+
is4gen.2xlarge,8,48,7500,0,0,is4gen.metal,
315+
is4gen.4xlarge,16,96,15000,0,0,is4gen.metal,
316+
is4gen.8xlarge,32,192,30000,0,0,is4gen.metal,
317317
db.m1.medium,1,3.75,0,0,0,platform_aws_m1,https://aws.amazon.com/ec2/previous-generation/
318318
m1.medium,1,3.75,410,0,0,platform_aws_m1,https://aws.amazon.com/ec2/previous-generation/
319319
db.m1.small,1,1.7,0,0,0,platform_aws_m1,https://aws.amazon.com/ec2/previous-generation/

0 commit comments

Comments
 (0)