Skip to content

Commit 9f4d5fd

Browse files
committed
Create branch 3.10
0 parents  commit 9f4d5fd

15 files changed

+319
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# issue および pull request について
2+
3+
ドキュメントの未訳の部分や誤訳を見付けて、issue や pull request を作ろうとしてくれた人達へ感謝いたします。
4+
5+
これまでの経緯により、issue は [python-doc-ja レポジトリの issues](https://github.com/python-doc-ja/python-doc-ja/issues)
6+
に集約することにしています。
7+
このレポジトリではなく、python-doc-ja レポジトリで issue の作成をお願いします。
8+
9+
このレポジトリは Transifex にある翻訳データから生成された .po ファイルを保存するためのものです。
10+
そのため pull request をマージしても、そのままでは Transifex には反映されません。
11+
(反映されているとしたら、それは管理者により手作業で Transifex に入力されているのです。)
12+
13+
現時点では pull request 自体を受け付けず、作成された pull request はマージせずに閉じることとしますので、悪しからず。
14+
(将来的に pull request を受け付けるようになる可能性はあります。)

.github/ISSUE_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# issue および pull request について
2+
3+
ドキュメントの未訳の部分や誤訳を見付けて、issue や pull request を作ろうとしてくれた人達へ感謝いたします。
4+
5+
これまでの経緯により、issue は [python-doc-ja レポジトリの issues](https://github.com/python-doc-ja/python-doc-ja/issues)
6+
に集約することにしています。
7+
このレポジトリではなく、python-doc-ja レポジトリで issue の作成をお願いします。
8+
9+
このレポジトリは Transifex にある翻訳データから生成された .po ファイルを保存するためのものです。
10+
そのため pull request をマージしても、そのままでは Transifex には反映されません。
11+
(反映されているとしたら、それは管理者により手作業で Transifex に入力されているのです。)
12+
13+
現時点では pull request 自体を受け付けず、作成された pull request はマージせずに閉じることとしますので、悪しからず。
14+
(将来的に pull request を受け付けるようになる可能性はあります。)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# issue および pull request について
2+
3+
ドキュメントの未訳の部分や誤訳を見付けて、issue や pull request を作ろうとしてくれた人達へ感謝いたします。
4+
5+
これまでの経緯により、issue は [python-doc-ja レポジトリの issues](https://github.com/python-doc-ja/python-doc-ja/issues)
6+
に集約することにしています。
7+
このレポジトリではなく、python-doc-ja レポジトリで issue の作成をお願いします。
8+
9+
このレポジトリは Transifex にある翻訳データから生成された .po ファイルを保存するためのものです。
10+
そのため pull request をマージしても、そのままでは Transifex には反映されません。
11+
(反映されているとしたら、それは管理者により手作業で Transifex に入力されているのです。)
12+
13+
現時点では pull request 自体を受け付けず、作成された pull request はマージせずに閉じることとしますので、悪しからず。
14+
(将来的に pull request を受け付けるようになる可能性はあります。)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Delete docs built with PR
2+
3+
on:
4+
pull_request:
5+
branches: [ "3.9" ]
6+
types:
7+
- closed # PR closed
8+
9+
jobs:
10+
delete_pr_docs:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Prepare environment variables
15+
run: |
16+
ref=${GITHUB_REF#refs/pull/}
17+
pr_num=${ref%/merge}
18+
19+
echo "::set-env name=PR_NUM::${pr_num}"
20+
echo "::set-env name=PR_BUILD_ID::${GITHUB_BASE_REF}/${pr_num}"
21+
echo "::set-env name=DOCS_BASE_DIR::build/html"
22+
echo "::set-env name=DOCS_OUTPUT_DIR::build/html/${GITHUB_BASE_REF}/${pr_num}"
23+
24+
- name: Checkout GitHub Pages
25+
uses: actions/checkout@v2
26+
with:
27+
ref: gh-pages
28+
path: build/html
29+
30+
- name: Delete docs
31+
run: |
32+
cd ${GITHUB_WORKSPACE}/${DOCS_BASE_DIR}
33+
pwd
34+
git rm -r ${GITHUB_WORKSPACE}/${DOCS_OUTPUT_DIR}
35+
git config --local user.name "Autobuild bot on GitHub Actions"
36+
git config --local user.email "githubaction-build-bot@example.com"
37+
pwd
38+
git add .
39+
# if [ $(git status -s | wc -l) -eq 0 ]; then echo "nothing to commit"; exit 0; fi
40+
git commit -m "Delete docs, branch: ${GITHUB_BASE_REF} pr_num: ${PR_NUM}"
41+
git push --quiet "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" gh-pages:gh-pages
42+

.github/workflows/pr_build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: PR build for ver 3.8
2+
3+
on:
4+
pull_request:
5+
branches: [ "3.9" ]
6+
types:
7+
- opened # open PR
8+
- synchronize # update the branch which pulled from
9+
- reopened # re-open PR
10+
11+
jobs:
12+
pr_build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Prepare environment variables
17+
run: |
18+
ref=${GITHUB_REF#refs/pull/}
19+
pr_num=${ref%/merge}
20+
21+
echo "::set-env name=PR_BUILD_ID::${GITHUB_BASE_REF}/${pr_num}"
22+
echo "::set-env name=DOCS_BASE_DIR::build/html"
23+
echo "::set-env name=DOCS_OUTPUT_DIR::build/html/${GITHUB_BASE_REF}/${pr_num}"
24+
25+
- name: Checkout cpython repository
26+
uses: actions/checkout@v2
27+
with:
28+
repository: python-doc-ja/cpython-doc-catalog
29+
ref: catalog-3.8
30+
path: cpython
31+
32+
33+
- name: Checkout PR branch
34+
uses: actions/checkout@v2
35+
with:
36+
ref: ${{ github.ref }}
37+
path: cpython/Doc/locales/ja/LC_MESSAGES
38+
39+
- name: Checkout GitHub Pages
40+
uses: actions/checkout@v2
41+
with:
42+
ref: gh-pages
43+
path: build/html
44+
45+
- name: Install dependencies
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y --no-install-recommends python3-venv
49+
50+
- name: Build docs
51+
run: |
52+
cd cpython/Doc
53+
make venv
54+
rm -rf ${DOCS_OUTPUT_DIR}
55+
make build ALLSPHINXOPTS="-b html -D language=ja -D gettext_compact=0 -E -d build/doctrees . ${GITHUB_WORKSPACE}/${DOCS_OUTPUT_DIR}"
56+
ls -l ${GITHUB_WORKSPACE}/${DOCS_OUTPUT_DIR}
57+
58+
- name: Publish docs
59+
run: |
60+
cd ${GITHUB_WORKSPACE}/${DOCS_BASE_DIR}
61+
git config --local user.name "Autobuild bot on GitHub Actions"
62+
git config --local user.email "githubaction-build-bot@example.com"
63+
git add .
64+
if [ $(git status -s | wc -l) -eq 0 ]; then echo "nothing to commit"; exit 0; fi
65+
git commit -m 'update html'
66+
git push --quiet "https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" gh-pages:gh-pages
67+
68+
- name: Notify the URL of the built docs
69+
uses: thollander/actions-comment-pull-request@master
70+
with:
71+
message: 'Please check the built documentation!!! https://python.github.io/python-docs-ja/${{ env.PR_BUILD_ID }}'
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
secrets_3.10.tar

.travis.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
dist: bionic
2+
language: python
3+
python: '3.8'
4+
branches:
5+
only:
6+
- 3.9
7+
env:
8+
global:
9+
# branch name of python-docs-ja repository
10+
- DOCS_BRANCH=3.9
11+
# branch name of cpython repository
12+
- CPYTHON_BRANCH=3.9
13+
# branch name of cpython-doc-catalog repository
14+
- CATALOG_BRANCH=catalog-3.9
15+
# Transifex project name
16+
- TRANSIFEX_PROJECT=python-39
17+
# Directory where repositories are cloned
18+
- BASEDIR="$(dirname ${TRAVIS_BUILD_DIR})"
19+
# Number of parent commits
20+
- NUM_PARENTS=$(git log --pretty=%P -n 1 HEAD | awk '{ print NF }')
21+
install:
22+
- pip install sphinx
23+
- pip install blurb
24+
- pip install transifex-client
25+
- pip install sphinx-intl
26+
before_script:
27+
- build_type=$(bash ${TRAVIS_BUILD_DIR}/scripts/determine-build-type)
28+
- export build_type
29+
script:
30+
- bash ${TRAVIS_BUILD_DIR}/scripts/${build_type}/main.sh

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Repository to store PO Files
2+
3+
https://www.python.org/dev/peps/pep-0545/#repository-for-po-files
4+
5+
Please see [CONTRIBUTING.md](.github/CONTRIBUTING.md)

scripts/determine-build-type

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -eux
3+
4+
if [[ "${TRAVIS_EVENT_TYPE}" == "push" ]]; then
5+
if [[ ${NUM_PARENTS} == 1 ]]; then
6+
echo push
7+
else
8+
echo pr-merge
9+
fi
10+
elif [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]]; then
11+
echo pr
12+
elif [[ "${TRAVIS_EVENT_TYPE}" == "api" ]]; then
13+
# do not build
14+
echo ""
15+
elif [[ "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
16+
echo push
17+
fi

scripts/pr-merge/main.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -eux
3+
4+
# not yet implemented
5+
exit 0

0 commit comments

Comments
 (0)