Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1692954

Browse files
authored
Merge pull request#96 from PyCampES/make-and-ci
Make and CI
2 parentsbdd7501 +c5f7f4e commit1692954

File tree

200 files changed

+840
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+840
-634
lines changed

‎.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cpython/locale
12
*.mo
23
/_build/
34

@@ -48,3 +49,5 @@ coverage.xml
4849
# Ides
4950
.vscode/
5051
.idea/
52+
53+
.pospell

‎.overrides/CONTRIBUTING.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Guía para contribuir en la traducción
24
=====================================
35

‎.overrides/translation-memory.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
=======================
24
Memoria de traducción
35
=======================

‎.overrides/upgrade-python-version.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
=======================================
24
How to update to a new Python version
35
=======================================

‎.pre-commit-config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ repos:
99
rev:pre-commit
1010
hooks:
1111
-id:pospell
12-
args:['--personal-dict', 'dict', '--modified', '--language', 'es_ES']
12+
args:['--personal-dict', 'dict', '--modified', '--language', 'es_ES', '--language', 'es_AR']
13+
14+
-repo:https://github.com/pre-commit/pre-commit-hooks
15+
rev:v2.5.0
16+
hooks:
17+
-id:file-contents-sorter
18+
files:dict

‎.readthedocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ version: 2
99
sphinx:
1010
configuration:conf.py
1111

12+
build:
13+
image:latest
14+
1215
# Optionally set the version of Python and requirements required to build your docs
1316
python:
14-
version:3.7
17+
version:3.8
1518
install:
1619
-requirements:requirements.txt
1720

‎.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
language:python
2-
dist:xenial
3-
python:3.7
2+
dist:bionic
3+
python:3.8
44
before_install:
55
-sudo apt-get update
66
-sudo apt-get install -y hunspell hunspell-es
77
install:
8-
-pip install pospell "powrap>=0.3.0"
8+
-make setup
99
-pospell --version
1010
-powrap --version
1111
script:
1212
-powrap --check --quiet **/*.po
13-
-pospell -p dict -l es_ES **/*.po
13+
-pospell -p dict -les_AR -les_ES **/*.po
1414
-make build
15+
branches:
16+
only:
17+
-/3\.\d/

‎Makefile

Lines changed: 25 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,29 @@
88
# Configuration
99

1010
CPYTHON_PATH := cpython#Current commit for this upstream repo is setted by the submodule
11-
BRANCH := 3.7
11+
BRANCH := 3.8
1212
LANGUAGE_TEAM := python-docs-es
1313
LANGUAGE := es
1414

1515
# Internal variables
1616
VENV :=$(shell realpath ./venv)
1717
PYTHON :=$(shell which python3)
18-
WORKDIRS :=$(VENV)/workdirs
19-
CPYTHON_WORKDIR :=$(WORKDIRS)/cpython
20-
LOCALE_DIR :=$(WORKDIRS)/locale
21-
JOBS := auto
22-
SPHINXERRORHANDLING := "-W"
23-
TRANSIFEX_PROJECT := python-newest
18+
CPYTHON_WORKDIR := cpython
19+
OUTPUT_DOCTREE :=$(CPYTHON_WORKDIR)/Doc/_build/doctree
20+
OUTPUT_HTML :=$(CPYTHON_WORKDIR)/Doc/_build/html
21+
LOCALE_DIR :=$(CPYTHON_WORKDIR)/locale
22+
TRANSIFEX_PROJECT := python-docs-es
2423
POSPELL_TMP_DIR := .pospell
2524

2625

2726
.PHONY: help
2827
help:
2928
@echo"Please use 'make <target>' where <target> is one of:"
3029
@echo" build Build an local version in html, with warnings as errors"
31-
@echo" push Update translations and Transifex config in the repository"
32-
@echo" pull Download translations from Transifex; calls 'venv'"
33-
@echo" tx-config Recreate an up-to-date project .tx/config; calls 'pot'"
34-
@echo" pot Create/Update POT files from source files"
3530
@echo" serve Serve a built documentation on http://localhost:8000"
36-
@echo" spell Check spelling, storing output in$(POSPELL_TMP_DIR)"
37-
@echo" progress To compute current progression on the tutorial"
31+
@echo" spell Check spelling"
32+
@echo" wrap Wrap all the PO files to a fixed column width"
33+
@echo" progress To compute current progression on the tutorial"
3834
@echo""
3935

4036

@@ -44,86 +40,9 @@ help:
4440
# treated as errors, which is good to skip simple Sphinx syntax mistakes.
4541
.PHONY: build
4642
build: setup
47-
$(MAKE) -C$(CPYTHON_WORKDIR)/Doc/\
48-
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv\
49-
PYTHON=$(PYTHON)\
50-
SPHINXERRORHANDLING=$(SPHINXERRORHANDLING)\
51-
SPHINXOPTS='-q --keep-going -j$(JOBS) \
52-
-D locale_dirs=$(LOCALE_DIR)\
53-
-D language=$(LANGUAGE)\
54-
-D gettext_compact=0\
55-
-D latex_engine=xelatex\
56-
-D latex_elements.inputenc=\
57-
-D latex_elements.fontenc=' \
58-
html;
59-
60-
@echo"Success! Open file://$(CPYTHON_WORKDIR)/Doc/build/html/index.html,"\
61-
"or run 'make serve' to see them in http://localhost:8000";
62-
63-
64-
# push: push new translation files and Transifex config files to repository,
65-
# if any. Do nothing if there is no file changes. If GITHUB_TOKEN is set,
66-
# then assumes we are in GitHub Actions, requiring different push args
67-
.PHONY: push
68-
push:
69-
if! git status -s| egrep'\.po|\.tx/config';then \
70-
echo"Nothing to commit";\
71-
exit 0;\
72-
else\
73-
git add*.po**/*.po .tx/config;\
74-
git commit -m'Update translations from Transifex';\
75-
if [$(GITHUB_TOKEN)!="" ];then \
76-
header="$(echo -n token:"$(GITHUB_TOKEN)"| base64)";\
77-
git -c http.extraheader="AUTHORIZATION: basic$(header)" push;\
78-
else\
79-
git push;\
80-
fi;\
81-
fi
82-
83-
84-
# pull: Download translations files from Transifex, and apply line wrapping.
85-
# For downloading new translation files, first run "tx-config" target
86-
# to update the translation file mapping.
87-
.PHONY: pull
88-
pull: venv
89-
$(VENV)/bin/tx pull --force --language=$(LANGUAGE) --parallel
90-
$(VENV)/bin/powrap --quiet*.po**/*.po
91-
92-
93-
# tx-config: After running "pot", create a new Transifex config file by
94-
# reading pot files generated, then tweak this config file to
95-
# LANGUAGE.
96-
.PHONY: tx-config
97-
tx-config: pot
98-
cd$(CPYTHON_WORKDIR)/Doc/locales;\
99-
rm -rf .tx;\
100-
$(VENV)/bin/sphinx-intl create-txconfig;\
101-
$(VENV)/bin/sphinx-intl update-txconfig-resources\
102-
--transifex-project-name=$(TRANSIFEX_PROJECT)\
103-
--locale-dir.\
104-
--pot-dir pot;
105-
106-
cd$(OLDPWD)
107-
mv$(CPYTHON_WORKDIR)/Doc/locales/.tx/config .tx/config
108-
109-
sed -i .tx/config\
110-
-e'/^source_file/d'\
111-
-e's|<lang>/LC_MESSAGES/||'\
112-
-e"s|^file_filter|trans.$(LANGUAGE)|"
113-
114-
115-
# pot: After running "setup" target, run a cpython Makefile's target
116-
# to generate .pot files under $(CPYTHON_WORKDIR)/Doc/locales/pot
117-
.PHONY: pot
118-
pot: setup
119-
$(MAKE) -C$(CPYTHON_WORKDIR)/Doc/\
120-
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv\
121-
PYTHON=$(PYTHON)\
122-
ALLSPHINXOPTS='-E -b gettext \
123-
-D gettext_compact=0\
124-
-d build/.doctrees.\
125-
locales/pot' \
126-
build
43+
sphinx-build -j auto -b html -d$(OUTPUT_DOCTREE) -D language=$(LANGUAGE).$(OUTPUT_HTML)
44+
@echo"Success! Open file://`pwd`/$(OUTPUT_HTML)/index.html,"\
45+
"or run 'make serve' to see them in http://localhost:8000";
12746

12847

12948
# setup: After running "venv" target, prepare that virtual environment with
@@ -132,39 +51,19 @@ pot: setup
13251
# the translation files copy which could have new/updated files.
13352
.PHONY: setup
13453
setup: venv
135-
# Setup the main clone
13654
git submodule sync
13755
git submodule update --init --force$(CPYTHON_PATH)
138-
# Setup the current work directory
139-
if! [-d$(CPYTHON_WORKDIR) ];then \
140-
rm -fr$(WORKDIRS);\
141-
mkdir -p$(WORKDIRS);\
142-
git clone$(CPYTHON_PATH)$(CPYTHON_WORKDIR);\
143-
$(MAKE) -C$(CPYTHON_WORKDIR)/Doc\
144-
VENVDIR=$(CPYTHON_WORKDIR)/Doc/venv\
145-
PYTHON=$(PYTHON) venv;\
146-
fi
147-
148-
# Setup translation files
149-
if! [-d$(LOCALE_DIR)/$(LANGUAGE)/LC_MESSAGES/ ];then \
150-
mkdir -p$(LOCALE_DIR)/$(LANGUAGE)/LC_MESSAGES/;\
151-
fi;\
152-
cp --parents*.po**/*.po$(LOCALE_DIR)/$(LANGUAGE)/LC_MESSAGES/\
15356

15457

15558
# venv: create a virtual environment which will be used by almost every
15659
# other target of this script
15760
.PHONY: venv
15861
venv:
159-
if [!-d$(VENV) ];then\
62+
if [!-d$(VENV) ];then \
16063
$(PYTHON) -m venv --prompt$(LANGUAGE_TEAM)$(VENV);\
16164
fi
162-
163-
$(VENV)/bin/python -m pip install -q -r requirements.txt2>$(VENV)/pip-install.log
164-
165-
if grep -q'pip install --upgrade pip'$(VENV)/pip-install.log;then \
166-
$(VENV)/bin/pip install -q --upgrade pip;\
167-
fi
65+
66+
$(VENV)/bin/python -m pip install -q -r requirements.txt
16867

16968

17069
# serve: serve the documentation in a simple local web server, using cpython
@@ -174,28 +73,6 @@ serve:
17473
$(MAKE) -C$(CPYTHON_WORKDIR)/Doc serve
17574

17675

177-
# list files for spellchecking
178-
SRCS :=$(wildcard*.po**/*.po)
179-
DESTS =$(addprefix$(POSPELL_TMP_DIR)/out/,$(patsubst%.po,%.txt,$(SRCS)))
180-
181-
182-
# spell: run spell checking tool in all po files listed in SRCS variable,
183-
# storing the output in text files DESTS for proofreading. The
184-
# DESTS target run the spellchecking, while the typos.txt target
185-
# gather all reported issues in one file, sorted without redundancy
186-
.PHONY: spell
187-
spell: venv$(DESTS)$(POSPELL_TMP_DIR)/typos.txt
188-
189-
$(POSPELL_TMP_DIR)/out/%.txt:%.po dict
190-
@echo"Checking $< ..."
191-
@mkdir -p$(@D)
192-
@$(VENV)/bin/pospell -l$(LANGUAGE) -p dict$<>$@||true
193-
194-
$(POSPELL_TMP_DIR)/typos.txt:
195-
@echo"Gathering all typos in$(POSPELL_TMP_DIR)/typos.txt ..."
196-
@cut -d: -f3-$(DESTS)| sort -u>$@
197-
198-
19976
# clean: remove all .mo files and the venv directory that may exist and
20077
# could have been created by the actions in other targets of this script
20178
.PHONY: clean
@@ -207,3 +84,13 @@ clean:
20784
.PHONY: progress
20885
progress: venv
20986
$(VENV)/bin/potodo --offline --path tutorial/
87+
88+
89+
.PHONY: spell
90+
spell: venv
91+
$(VENV)/bin/pospell -p dict -l es_ES**/*.po
92+
93+
94+
.PHONY: wrap
95+
wrap: venv
96+
$(VENV)/bin/powrap**/*.po

‎c-api/abstract.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/allocation.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/apiabiversion.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/bool.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/descriptor.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/index.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/iterator.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/none.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/objbuffer.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

‎c-api/objimpl.po

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ msgstr ""
1212
"POT-Creation-Date:2019-05-06 11:59-0400\n"
1313
"PO-Revision-Date:YEAR-MO-DA HO:MI+ZONE\n"
1414
"Last-Translator:FULL NAME <EMAIL@ADDRESS>\n"
15-
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es.python.org)\n"
15+
"Language-Team:python-doc-es (https://mail.python.org/mailman3/lists/docs-es."
16+
"python.org)\n"
1617
"MIME-Version:1.0\n"
1718
"Content-Type:text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding:8bit\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp