Skip to content

Commit

Permalink
Merge pull request #23 from oqtopus-team/develop
Browse files Browse the repository at this point in the history
release: 2024-10-11 14:45
  • Loading branch information
orangekame3 authored Oct 11, 2024
2 parents daf5cad + 47c733e commit 7433455
Show file tree
Hide file tree
Showing 60 changed files with 1,923 additions and 1,590 deletions.
5 changes: 5 additions & 0 deletions .github/git-pr-release.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
release: <%= Time.now.strftime('%Y-%m-%d %H:%M') %>
> [!CAUTION]
> **Create Merge Commit** is recommended to merge this PR.
> before merging, update the appropriate version of `pyproject.toml`
> you can use the following command to update the version.
> update-version="x.y.z"
> comment in the PR.

<% pull_requests.each do |pr| -%>
- #<%= pr.number %> <%= pr.mention %>
<% end -%>
39 changes: 39 additions & 0 deletions .github/workflows/update_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Update pyproject.toml Version

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]

jobs:
update-version:
if: startsWith(github.event.comment.body, 'update-version=')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Extract version from comment
id: extract_version
run: |
echo "Requested comment: ${{ github.event.comment.body }}"
VERSION=$(echo "${{ github.event.comment.body }}" | sed 's/update-version=//')
echo "VERSION: $VERSION"
echo "::set-output name=version::$VERSION"
- name: Update version in pyproject.toml
run: |
sed -i 's/version = "[^"]*"/version = "${{ steps.extract_version.outputs.version }}"/' pyproject.toml
- name: Display pyproject.toml after modification
run: cat pyproject.toml

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-version-${{ steps.extract_version.outputs.version }}
base: develop
title: "release: update version to ${{ steps.extract_version.outputs.version }}"
body: "This PR updates the version in pyproject.toml to ${{ steps.extract_version.outputs.version }}."
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.4
3.12.3
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- python -m pip install poetry
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

# Build documentation with mkdocs
mkdocs:
configuration: mkdocs.yaml
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ copy: generate-oas terraform-docs
@cp .github/CONTRIBUTING.md ./docs/en/CONTRIBUTING.md
@cp .github/CODE_OF_CONDUCT.md ./docs/en/CODE_OF_CONDUCT.md
@cp .github/SECURITY.md ./docs/en/SECURITY.md
@cp ./docs/README.md ./docs/en/index.md
@cp ./docs/README.ja.md ./docs/ja/index.md

docs: copy ## Build MkDocs
@poetry run mkdocs build
Expand Down
49 changes: 5 additions & 44 deletions docs/README.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@

<h1> 🐙 OQTOPUS Cloud </h1>

<table>
<thead>
<tr>
<th style="text-align:center"><a href="./README.md">🇺🇸English</a></th>
<th style="text-align:center"><a href="./README.ja.md">🇯🇵日本語</a></th>
</tr>
</thead>
</table>
</div>

[![Python CI](https://github.com/oqtopus-team/oqtopus-cloud/actions/workflows/python-ci.yaml/badge.svg)](https://github.com/oqtopus-team/oqtopus-cloud/actions/workflows/python-ci.yaml) [![TFLint](https://github.com/oqtopus-team/oqtopus-cloud/actions/workflows/tflint.yaml/badge.svg)](https://github.com/oqtopus-team/oqtopus-cloud/actions/workflows/tflint.yaml) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

</div>

## Overview

**O**pen **Q**uantum **T**oolchain for **OP**erators & **US**ers (**OQTOPUS**) is a project that provides the architecture of cloud quantum computers as an open-source software (OSS).
By using it in conjunction with various OSS provided by [@oqtopus-team](https://github.com/oqtopus-team), you can build a cloud quantum computer system.

![OQTOPUS Cloud](./asset/aws_system_architecture_diagram_overview.drawio.png)
![OQTOPUS Cloud](docs/asset/aws_system_architecture_diagram_overview.drawio.png)

## Features

Expand All @@ -30,45 +21,15 @@ By using it in conjunction with various OSS provided by [@oqtopus-team](https://

## Documentation

### Architecture

- [AWS System Architecture Diagram](./en/architecture/aws_system_architecture_diagram.md)
- [Sequence Diagram](./en/architecture/sequence_diagram.md)
- [Task State Transition Diagram](./en/architecture/task_state_transition_diagram.md)

### Developer Guidelines

- [Development Flow](./en/developer_guidelines/index.md)
- [Setup Development Environment](./en/developer_guidelines/setup.md)
- [OpenAPI Specification-Based Code Generation](./en/developer_guidelines/openapi.md)
- [Backend Implementation](./en/developer_guidelines/backend.md)
- [Terraform Guidelines](./en/developer_guidelines/terraform_guidelines.md)
- [Terraform Modules](./terraform_modules/README.md)
- [DB Schema](./schema/README.md)

### OpenAPI Specifications

- [User API](./oas/user/openapi.yaml)
- [Provider API](./oas/provider/openapi.yaml)

### Operations

- [Initial Setup](./en/operation/setup.md)
- [Deployment](./en/operation/deployment.md)

### Others

- [How to Contribute](./en/CONTRIBUTING.md)
- [Code of Conduct](./en/CODE_OF_CONDUCT.md)
- [Security](./en/SECURITY.md)
- [Documentation Home](https://readthedocs.org/projects/oqtopus-cloud/)

## CITATION

You can use the DOI to cite OQTOPUS Cloud in your research.

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13677664.svg)](https://doi.org/10.5281/zenodo.13677664)

Citation information is also available in the [CITATION](../CITATION.cff) file.
Citation information is also available in the [CITATION](https://github.com/oqtopus-team/oqtopus-cloud/blob/main/CITATION.cff) file.

## Contact

Expand All @@ -79,4 +40,4 @@ or you can contact us by email:

## LICENSE

OQTOPUS Cloud is released under the [Apache License 2.0](../LICENSE).
OQTOPUS Cloud is released under the [Apache License 2.0](https://github.com/oqtopus-team/oqtopus-cloud/blob/main/LICENSE).
12 changes: 8 additions & 4 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ generate:
@poetry run datamodel-codegen \
--use-schema-description \
--target-python-version 3.12 \
--enable-version-header \
--field-constraints \
--use-annotated \
--use-field-description \
--input ${INPUT} \
--input-file-type openapi \
--output-model-type pydantic_v2.BaseModel \
--enum-field-as-literal all \
--disable-timestamp \
--use-standard-collections \
--strict-nullable \
--use-default \
Expand All @@ -43,16 +43,20 @@ export ENV=local
export DB_HOST=localhost
export DB_NAME=main
export DB_CONNECTOR=mysql+pymysql

export ALLOW_ORIGINS=http://127.0.0.1:8000# pass the allowed origins -> http://localhost:3000,http://localhost:3001
export ALLOW_CREDENTIALS=true
export ALLOW_METHODS=*# pass the allowed methods -> GET,POST,PUT,DELETE
export ALLOW_HEADERS=*# pass the allowed headers -> Content-Type,Authorization
export LOG_LEVEL=DEBUG
run-user: ## Start the User API
@export POWERTOOLS_METRICS_NAMESPACE=user-api && \
export POWERTOOLS_SERVICE_NAME=user-api && \
poetry run uvicorn oqtopus_cloud.user.lambda_function:app --host 0.0.0.0 --port 8080 --reload
poetry run uvicorn oqtopus_cloud.user.lambda_function:app --host 0.0.0.0 --port 8080 --reload --log-level debug

run-provider: ## Start the Provider API
@export POWERTOOLS_METRICS_NAMESPACE=provider-api && \
export POWERTOOLS_SERVICE_NAME=provider-api && \
poetry run uvicorn oqtopus_cloud.provider.lambda_function:app --host 0.0.0.0 --port 8888 --reload
poetry run uvicorn oqtopus_cloud.provider.lambda_function:app --host 0.0.0.0 --port 8888 --reload --log-level debug

up: ## Start the DB
@docker compose up
Expand Down
8 changes: 4 additions & 4 deletions backend/oas/provider/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ components:
description: Parameter mandatory and valid for status 'NOT_AVAILABLE'
type: string
format: date-time
example: '2023-09-10T14:00:00Z'
example: '2023-09-10T14:00:00+09:00'
devices.DevicePendingTasksUpdate:
type: object
properties:
Expand Down Expand Up @@ -513,7 +513,7 @@ components:
description: Parameter mandatory and valid if calibrationData not null
type: string
format: date-time
example: '2023-09-10T14:00:00Z'
example: '2023-09-10T14:00:00+09:00'
devices.DeviceDataUpdate:
discriminator:
propertyName: command
Expand Down Expand Up @@ -710,7 +710,7 @@ components:
createdAt:
type: string
format: date-time
example: '2022-10-19 11:45:34'
example: '2022-10-19T11:45:34+09:00'
required:
- taskId
- code
Expand Down Expand Up @@ -739,7 +739,7 @@ components:
optimizationBlockSize: 1
optimizationSwapLevel: 1
status: QUEUED_FETCHED
createdAt: '2022-10-19 11:45:34'
createdAt: '2022-10-19T11:45:34+09:00'
tasks.TaskStatusUpdate:
type: object
properties:
Expand Down
4 changes: 2 additions & 2 deletions backend/oas/provider/schemas/devices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ devices.DeviceStatusUpdate:
description: "Parameter mandatory and valid for status 'NOT_AVAILABLE'"
type: string
format: date-time
example: "2023-09-10T14:00:00Z"
example: "2023-09-10T14:00:00+09:00"

devices.DevicePendingTasksUpdate:
type: object
Expand All @@ -57,7 +57,7 @@ devices.DeviceCalibrationUpdate:
description: "Parameter mandatory and valid if calibrationData not null"
type: string
format: date-time
example: "2023-09-10T14:00:00Z"
example: "2023-09-10T14:00:00+09:00"

components:
schemas:
Expand Down
12 changes: 0 additions & 12 deletions backend/oas/provider/schemas/hello.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions backend/oas/provider/schemas/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ tasks.TaskInfo:
createdAt:
type: string
format: date-time
example: "2022-10-19 11:45:34"
example: "2022-10-19T11:45:34+09:00"
required: [
taskId, code, device, action, skipTranspilation, status, createdAt
]
Expand All @@ -164,7 +164,7 @@ tasks.TaskInfo:
optimizationSwapLevel: 1
}
status: QUEUED_FETCHED
createdAt: '2022-10-19 11:45:34'
createdAt: "2022-10-19T11:45:34+09:00"

tasks.TaskStatusUpdate:
type: object
Expand Down
Loading

0 comments on commit 7433455

Please sign in to comment.