Skip to content

Commit

Permalink
Merge pull request #8 from oqtopus-team/develop
Browse files Browse the repository at this point in the history
release: 2024-09-05 16:48
  • Loading branch information
orangekame3 authored Sep 5, 2024
2 parents 355338f + 69fd419 commit 294362f
Show file tree
Hide file tree
Showing 16 changed files with 286 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .github/git-pr-release.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Release <%= Time.now.strftime('%Y-%m-%d %H:%M') %>
release: <%= Time.now.strftime('%Y-%m-%d %H:%M') %>
> [!CAUTION]
> **Create Merge Commit** is recommended to merge this PR.
<% pull_requests.each do |pr| -%>
Expand Down
18 changes: 15 additions & 3 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
changelog:
categories:
- title: Enhancement 🎉
- title: New Feature 🎉
labels:
- enhancement
- feature
- title: Bug Fixes 🐛
labels:
- bug
- bugfix
- title: Refactor 🛠
labels:
- refactor
- title: Style 🎨
labels:
- style
- title: Test 🧪
labels:
- test
- title: CI/CD 🚀
labels:
- ci
- title: Documentation 📚
labels:
- documentation
81 changes: 81 additions & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: PR Labeler

on:
pull_request:
types: [opened, synchronize]
branches:
- develop

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch all branches
run: git fetch --all

- name: Extract commit messages
run: |
COMMITS=$(git log --format=%B origin/develop..HEAD)
echo "$COMMITS"
echo "$COMMITS" > commits.txt
- name: Debug - Print commits
run: cat commits.txt

- name: Set labels based on commit messages
id: set-labels
run: |
labels=()
while IFS= read -r commit; do
echo "Processing commit: $commit"
if [[ $commit =~ ^feat ]]; then
labels+=("feature")
elif [[ $commit =~ ^fix ]]; then
labels+=("bugfix")
elif [[ $commit =~ ^docs ]]; then
labels+=("documentation")
elif [[ $commit =~ ^style ]]; then
labels+=("style")
elif [[ $commit =~ ^refactor ]]; then
labels+=("refactor")
elif [[ $commit =~ ^test ]]; then
labels+=("test")
elif [[ $commit =~ ^ci ]]; then
labels+=("ci")
elif [[ $commit =~ ^chore ]]; then
labels+=("chore")
fi
done < commits.txt
# Remove duplicate labels and join them as a newline-separated string
unique_labels=$(printf "%s\n" "${labels[@]}" | sort -u)
# Debug output for unique labels
echo "Unique labels:"
echo "$unique_labels"
# Set the output as a newline-separated string
echo "labels<<EOF" >> $GITHUB_OUTPUT
echo "$unique_labels" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Add labels to PR
uses: actions-ecosystem/action-add-labels@v1
with:
labels: ${{ steps.set-labels.outputs.labels }}

- name: Assign PR creator
uses: actions/github-script@v6
with:
script: |
await github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
assignees: [context.actor]
})
18 changes: 18 additions & 0 deletions .gitmessage
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Overview (Uncomment one of the following templates)
#feat:
# └ A new feature
#fix:
# └ A bug fix
#docs:
# └ Documentation only changes
#style:
# └ Changes that do not affect the meaning of the code
# (white-space, formatting, missing semi-colons, etc)
#refactor:
# └ A code change that neither fixes a bug nor adds a featur
#test:
# └ Adding missing or correcting existing tests
#ci:
# └ Changes to our CI configuration files and scripts
#chore:
# └ Updating grunt tasks etc; no production code change
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"icon": "issue-closed"
}
},
"files.associations": {
".gitmessage": "plaintext"
},
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.autoTestDiscoverOnSaveEnabled": true,
Expand Down
6 changes: 4 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ authors:
given-names: "Norihiro"
- family-names: "Masumoto"
given-names: "Naoyuki"
- family-names: "Mori"
given-names: "Toshio"
- family-names: "Miyaji"
given-names: "Kosuke"
- family-names: "Miyanaga"
given-names: "Takafumi"
orcid: "https://orcid.org/0009-0001-5094-6035"
- family-names: "Mori"
given-names: "Toshio"
- family-names: "Noda"
given-names: "Kunihiro"
- family-names: "Tsukano"
Expand Down
24 changes: 3 additions & 21 deletions docs/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</thead>
</table>

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

Expand Down Expand Up @@ -64,27 +64,9 @@

## 引用

OQTOPUS Cloudを研究で使用する場合は、以下のGitHubリポジトリを引用してください
OQTOPUS Cloudを研究に引用する際には、以下のDOIをご利用いただけます

### APA

```apacite
Aso, N., Gokita, S., Kakuko, N., Masumoto, N., Mori, T., Miyanaga, T., Noda, K., Tsukano, S., & Ymaguchi, M. (2024). OQTOPUS Cloud (Version 0.1.0) [Computer software]. https://github.com/oqtopus-team/oqtopus-cloud
```

### BibTeX

```bibtex
@software{Aso_OQTOPUS_Cloud_2024,
author = {Aso, Noriyasu and Gokita, Shun and Kakuko, Norihiro and Masumoto, Naoyuki and Mori, Toshio and Miyanaga, Takafumi and Noda, Kunihiro and Tsukano, Satoyuki and Ymaguchi, Masaomi},
license = {Apache-2.0},
month = sep,
title = {{OQTOPUS Cloud}},
url = {https://github.com/oqtopus-team/oqtopus-cloud},
version = {0.1.0},
year = {2024}
}
```
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13677665.svg)](https://doi.org/10.5281/zenodo.13677665)

引用情報は[CITATION](../CITATION.cff)ファイルにも記載されています。

Expand Down
26 changes: 4 additions & 22 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</thead>
</table>

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

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

- **Quantum Computing as a Service (QCaaS)**: Provides a cloud quantum computer system.
- **Quantum Task Management**: Manages quantum tasks and their states.
- **Quatntum Device Management**: Manages quantum devices and their states.
- **Quantum Device Management**: Manages quantum devices and their states.

## Documentation

Expand Down Expand Up @@ -64,27 +64,9 @@ By using it in conjunction with various OSS provided by [@oqtopus-team](https://

## CITATION

If you use OQTOPUS Cloud in your research, please cite the following GitHub repository:
You can use the DOI to cite OQTOPUS Cloud in your research.

### APA

```apacite
Aso, N., Gokita, S., Kakuko, N., Masumoto, N., Mori, T., Miyanaga, T., Noda, K., Tsukano, S., & Ymaguchi, M. (2024). OQTOPUS Cloud (Version 0.1.0) [Computer software]. https://github.com/oqtopus-team/oqtopus-cloud
```

### BibTeX

```bibtex
@software{Aso_OQTOPUS_Cloud_2024,
author = {Aso, Noriyasu and Gokita, Shun and Kakuko, Norihiro and Masumoto, Naoyuki and Mori, Toshio and Miyanaga, Takafumi and Noda, Kunihiro and Tsukano, Satoyuki and Ymaguchi, Masaomi},
license = {Apache-2.0},
month = sep,
title = {{OQTOPUS Cloud}},
url = {https://github.com/oqtopus-team/oqtopus-cloud},
version = {0.1.0},
year = {2024}
}
```
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13677665.svg)](https://doi.org/10.5281/zenodo.13677665)

Citation information is also available in the [CITATION](../CITATION.cff) file.

Expand Down
62 changes: 61 additions & 1 deletion docs/en/developer_guidelines/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,67 @@ While there are no strict rules, the following naming conventions are recommende
- `bugfix/xxx`: (xxx represents the bug being fixed)
- `hotfix/xxx`: (xxx represents the urgent fix)

### Merging
## Conventional Commits

The commit messages should preferably follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) guidelines.

### Commit Message Format

By using `.gitmessage`, a template for commit messages is provided. This template can be enabled locally for this project by configuring `git config --local`.

```bash
git config --local commit.template .gitmessage
```

Once configured, running `git commit` will display the contents of `.gitmessage` in your editor (Vim by default).

```bash
git commit
# Overview (Uncomment one of the following templates)
#feat:
# └ A new feature
#fix:
# └ A bug fix
#docs:
# └ Documentation only changes
#style:
# └ Changes that do not affect the meaning of the code
# (white-space, formatting, missing semi-colons, etc)
#refactor:
# └ A code change that neither fixes a bug nor adds a featur
#test:
# └ Adding missing or correcting existing tests
#ci:
# └ Changes to our CI configuration files and scripts
#chore:
# └ Updating grunt tasks etc; no production code change

```

Select the appropriate template and uncomment it, then write your commit message.

```bash
docs: Update README.md
# └ Documentation only changes
```

## Correspondence between Commit Messages and Labels

When creating a PR to the `develop` branch, labels are automatically assigned based on the commit messages.
Below is the correspondence between prefixes and labels:

| Prefix | Label | Description |
|---|---|---|
|feat: | `feature` | Adding a new feature |
|fix: | `bugfix` | Bug fixes |
|docs: | `documentation` | Documentation only changes |
|style: | `style` | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |
|refactor: | `refactor` | Code changes that neither fix a bug nor add a feature |
|test: | `test` | Adding or correcting existing tests |
|ci: | `ci` | Adding or updating CI configuration and scripts |
|chore: | `chore` | Minor changes or maintenance tasks |

## Merging

Follow the principles below for merging:

Expand Down
4 changes: 2 additions & 2 deletions docs/en/developer_guidelines/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ paths:
- The paths directly under the resource should refer to the `root` in the files placed in the `paths` directory.
- Deeper nested paths should be defined as `root.{path_name}.{path_name}`.

!!! note
Define as `task/{taskId}` instead of `task/{task_id}`.
> [!NOTE]
> Define as `task/{taskId}` instead of `task/{task_id}`.

## How to Write `paths`

Expand Down
26 changes: 4 additions & 22 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</thead>
</table>

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

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

- **Quantum Computing as a Service (QCaaS)**: Provides a cloud quantum computer system.
- **Quantum Task Management**: Manages quantum tasks and their states.
- **Quatntum Device Management**: Manages quantum devices and their states.
- **Quantum Device Management**: Manages quantum devices and their states.

## Documentation

Expand Down Expand Up @@ -64,27 +64,9 @@ By using it in conjunction with various OSS provided by [@oqtopus-team](https://

## CITATION

If you use OQTOPUS Cloud in your research, please cite the following GitHub repository:
You can use the DOI to cite OQTOPUS Cloud in your research.

### APA

```apacite
Aso, N., Gokita, S., Kakuko, N., Masumoto, N., Mori, T., Miyanaga, T., Noda, K., Tsukano, S., & Ymaguchi, M. (2024). OQTOPUS Cloud (Version 0.1.0) [Computer software]. https://github.com/oqtopus-team/oqtopus-cloud
```

### BibTeX

```bibtex
@software{Aso_OQTOPUS_Cloud_2024,
author = {Aso, Noriyasu and Gokita, Shun and Kakuko, Norihiro and Masumoto, Naoyuki and Mori, Toshio and Miyanaga, Takafumi and Noda, Kunihiro and Tsukano, Satoyuki and Ymaguchi, Masaomi},
license = {Apache-2.0},
month = sep,
title = {{OQTOPUS Cloud}},
url = {https://github.com/oqtopus-team/oqtopus-cloud},
version = {0.1.0},
year = {2024}
}
```
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13677665.svg)](https://doi.org/10.5281/zenodo.13677665)

Citation information is also available in the [CITATION](../CITATION.cff) file.

Expand Down
15 changes: 12 additions & 3 deletions docs/en/operation/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,20 @@ make test-provider

We are adopting [Semantic Versioning](https://semver.org/).

The creation of release notes is automated, so you can tag and create release notes by executing the following commands:
The creation of release notes is automated, so release notes will be generated when a tag is created.

Since releases are performed on the main branch, make sure to switch to the main branch beforehand.

### Steps

1. Review the pull request for the release and merge develop into main. When doing so, select Create Merge Commit to tidy up the commit log.

2. Run the following commands in the terminal (adjust the version number as needed):

```bash
git tag v1.0.0
git push origin v1.0.0
git checkout main
git tag v0.1.0
git push origin v0.1.0
```

## List of Commands
Expand Down
Loading

0 comments on commit 294362f

Please sign in to comment.