Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.4.4-release #62

Merged
merged 7 commits into from
Aug 24, 2021
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

このガイドでは、Python で書かれたパッケージに対して初めてコミットする方向けに、開発手法のうちのひとつを説明しています。既に何らかの開発手法について理解されている方は、この節を読む必要はありません。

### 1. Python (>= 3.7) をインストールする
### 1. Python (>= 3.8) をインストールする

[Python 公式ページ](https://www.python.org/downloads/) を参照してください。リンク先のページを見てもよくわからない場合は、お使いの OS をキーワードにして検索すると良いでしょう。(例えば Windows を使用している場合、["Python3 Windows インストール方法"](https://www.google.com/search?channel=fs&client=ubuntu&q=Python3+Windows+%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%96%B9%E6%B3%95) で検索する、など)

Expand Down
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# statements-manager

![PyPI](https://img.shields.io/pypi/v/statements-manager) [![Python Versions](https://img.shields.io/pypi/pyversions/statements-manager.svg)](https://pypi.org/project/statements-manager/)

**English description is under preparation. Sorry for inconvenience.**

競技プログラミングの作問時に使用する、問題文管理を便利にするツール
Expand Down Expand Up @@ -175,6 +177,47 @@ ss-manager run [-o OUTPUT] WORKING_DIR
- `pdf`: PDF を出力
- `-o` オプションで `pdf` を指定した場合のみ、セット全体の PDF も出力するようになっています。`WORKING_DIR` 直下に `problemset.pdf` というファイルが出力されます。

## 運用例 (リポジトリにある問題文を半自動で更新する試み)

GitHub Actions などの CI サービスと併用することで、リポジトリに変更が加えられたときに問題文に関する成果物の差分を `push` し、常にリポジトリ内の問題文を最新の状態に保つことが可能です。

設定の一例を以下に示します。これは `master` に `push` された際に `ss-manager run` を実行し、差分を自動で `push` するものです。以下の実装を、リポジトリに `.github/workflows/statements-manager.yml` として保存すると動作するはずです。

```yaml
# statements-manager を動かし、変更点があれば commit & push する
name: update-statements

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install statements-manager
- name: Run statements-manager
run: |
ss-manager run ./
- name: Commit files
run: |
git add --all
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "[ci skip] [bot] Updating to ${{ github.sha }}."
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
```
## Links

- [Rime](https://github.com/icpc-jag/rime)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

setup(
name="statements-manager",
version="1.4.3",
version="1.4.4",
author="Yuya Sugie",
author_email="[email protected]",
url="https://github.com/tsutaj/statements-manager",
license="Apache License 2.0",
description="",
python_requires=">=3.7",
python_requires=">=3.8",
install_requires=[
"google-api-python-client",
"google-auth-httplib2",
Expand Down