forked from jan/debianmemberportfolio
Maintenance tasks
- switch to Poetry - document translations - update ChangeLog
This commit is contained in:
parent
d02f4906e1
commit
362b6dff35
13 changed files with 1497 additions and 173 deletions
60
docs/doc-requirements.txt
Normal file
60
docs/doc-requirements.txt
Normal file
|
@ -0,0 +1,60 @@
|
|||
alabaster==0.7.13 ; python_version >= "3.8" and python_version < "4.0"
|
||||
babel==2.12.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
cachecontrol[filecache]==0.12.11 ; python_version >= "3.8" and python_version < "4.0"
|
||||
cachy==0.3.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
certifi==2023.5.7 ; python_version >= "3.8" and python_version < "4.0"
|
||||
cffi==1.15.1 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "linux"
|
||||
charset-normalizer==3.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
cleo==1.0.0a5 ; python_version >= "3.8" and python_version < "4.0"
|
||||
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
|
||||
crashtest==0.3.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
cryptography==41.0.1 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "linux"
|
||||
distlib==0.3.6 ; python_version >= "3.8" and python_version < "4.0"
|
||||
docutils==0.17.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
entrypoints==0.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
filelock==3.12.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
html5lib==1.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
idna==3.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
imagesize==1.4.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
importlib-metadata==6.6.0 ; python_version >= "3.8" and python_version < "3.12"
|
||||
importlib-resources==5.12.0 ; python_version >= "3.8" and python_version < "3.9"
|
||||
jaraco-classes==3.2.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
jeepney==0.8.0 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "linux"
|
||||
jinja2==3.1.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
keyring==23.13.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
lockfile==0.12.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
markupsafe==2.1.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
more-itertools==9.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
msgpack==1.0.5 ; python_version >= "3.8" and python_version < "4.0"
|
||||
packaging==20.9 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pexpect==4.8.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pkginfo==1.9.6 ; python_version >= "3.8" and python_version < "4.0"
|
||||
platformdirs==3.5.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
poetry-babel-plugin==0.1.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
poetry-core==1.6.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
poetry==1.2.0b1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
ptyprocess==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pycparser==2.21 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "linux"
|
||||
pygments==2.15.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pylev==1.4.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pyparsing==3.0.9 ; python_version >= "3.8" and python_version < "4.0"
|
||||
pytz==2023.3 ; python_version >= "3.8" and python_version < "3.9"
|
||||
pywin32-ctypes==0.2.0 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"
|
||||
requests-toolbelt==0.9.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
requests==2.31.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
secretstorage==3.3.3 ; python_version >= "3.8" and python_version < "4.0" and sys_platform == "linux"
|
||||
shellingham==1.5.0.post1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
snowballstemmer==2.2.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinx==5.1.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.8" and python_version < "4.0"
|
||||
sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.8" and python_version < "4.0"
|
||||
tomlkit==0.11.8 ; python_version >= "3.8" and python_version < "4.0"
|
||||
urllib3==1.26.16 ; python_version >= "3.8" and python_version < "4.0"
|
||||
virtualenv==20.23.0 ; python_version >= "3.8" and python_version < "4.0"
|
||||
webencodings==0.5.1 ; python_version >= "3.8" and python_version < "4.0"
|
||||
zipp==3.15.0 ; python_version >= "3.8" and python_version < "3.12"
|
|
@ -39,14 +39,14 @@ templates_path = ["_templates"]
|
|||
|
||||
# General information about the project.
|
||||
project = "Debian Member Portfolio Service"
|
||||
copyright = "2009-2021, Jan Dittberner"
|
||||
copyright = "2009-2023, Jan Dittberner"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = "0.7.2"
|
||||
version = "0.7.4-dev"
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
||||
|
@ -87,15 +87,15 @@ htmlhelp_basename = "DebianMemberPortfolioServicedoc"
|
|||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, document class
|
||||
# [howto/manual]).
|
||||
latex_documents = [
|
||||
(
|
||||
"index",
|
||||
"DebianMemberPortfolioService.tex",
|
||||
"Debian Member Portfolio Service Documentation",
|
||||
"Jan Dittberner",
|
||||
"manual",
|
||||
),
|
||||
]
|
||||
#latex_documents = [
|
||||
# (
|
||||
# "index",
|
||||
# "DebianMemberPortfolioService.tex",
|
||||
# "Debian Member Portfolio Service Documentation",
|
||||
# "Jan Dittberner",
|
||||
# "manual",
|
||||
# ),
|
||||
#]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
|
|
|
@ -21,38 +21,18 @@ To start working on the source code you need to have `git`_ installed::
|
|||
.. _git: http://www.git-scm.com/
|
||||
|
||||
The canonical git repository for the Debian Member Portfolio Service is
|
||||
available at https://debianstuff.dittberner.info/git/debianmemberportfolio.git.
|
||||
available at https://git.dittberner.info/jan/debianmemberportfolio
|
||||
To get a clone of the source code you change to a directory of your choice and
|
||||
invoke git clone::
|
||||
|
||||
cd ~/src
|
||||
git clone https://debianstuff.dittberner.info/git/debianmemberportfolio.git
|
||||
git clone https://git.dittberner.info/jan/debianmemberportfolio.git
|
||||
|
||||
You should use `venv`_ to separate the development environment from your
|
||||
system wide Python installation. You can install virtualenv using::
|
||||
We use `Poetry <https://python-poetry.org/>`_ for dependency management. Run::
|
||||
|
||||
sudo aptitude install python3-venv
|
||||
poetry install
|
||||
|
||||
.. _venv: https://docs.python.org/3/library/venv.html
|
||||
|
||||
When you have :command:`pyvenv` installed you should create a virtual
|
||||
environment for Debian Member Portfolio Service development and install the
|
||||
requirements using `pip <https://pypi.python.org/pypi/pip>`_::
|
||||
|
||||
mkdir ~/.virtualenvs
|
||||
pyvenv ~/.virtualenvs/dmportfolio
|
||||
. ~/.virtualenvs/dmportfolio/bin/activate
|
||||
cd ~/src/debianmemberportfolio
|
||||
pip install -r stretchreq.pip
|
||||
|
||||
.. note::
|
||||
|
||||
The Debian Member Portfolio Service instance at http://portfolio.debian.net/
|
||||
is running on a Debian Stretch server, therefore :file:`stretchreq.pip`
|
||||
contains dependency versions matching that Debian release.
|
||||
|
||||
The dependency download and installation into the virtual environment takes
|
||||
some time.
|
||||
to install all required dependencies in a Poetry managed virtual environment.
|
||||
|
||||
Debian Member Portfolio Service needs the JQuery JavaScript library to function
|
||||
properly. The JQuery library is not included in the git clone and must be
|
||||
|
@ -80,9 +60,8 @@ use by the code.
|
|||
|
||||
When you have both installed you can run::
|
||||
|
||||
. ~/.virtualenvs/dmportfolio/bin/activate
|
||||
./synckeyrings.sh
|
||||
python3 debianmemberportfolio/model/keyringanalyzer.py
|
||||
poetry run python3 debianmemberportfolio/model/keyringanalyzer.py
|
||||
|
||||
The first synchronizes the keyrings in :file:`$HOME/debian/keyring.debian.org`
|
||||
with files on the `keyring.debian.org <http://keyring.debian.org>`_ host. And
|
||||
|
@ -94,7 +73,7 @@ Run a development server
|
|||
|
||||
You can run a development server using::
|
||||
|
||||
python3 run.py
|
||||
poetry run python3 run.py
|
||||
|
||||
The output of this command should look like the following::
|
||||
|
||||
|
@ -152,3 +131,28 @@ the :py:func:`~debianmemberportfolio.model.dddatabuilder.build_data` function
|
|||
of the module :py:mod:`debianmemberportfolio.model.dddatabuilder`, which uses
|
||||
several helper functions from :py:mod:`debianmemberportfolio.model.keyfinder`
|
||||
to access the key information.
|
||||
|
||||
Update translations
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To update the translations you need to include the weblate repository as git remote::
|
||||
|
||||
git remote add weblate https://hosted.weblate.org/git/debian-member-portfolio-service/translations/
|
||||
git fetch --all
|
||||
|
||||
Run the following to merge the latest translations into your local branch::
|
||||
|
||||
git merge weblate main
|
||||
|
||||
|
||||
To extract translations from source files use::
|
||||
|
||||
poetry run pybabel extract --mapping-file=mapping.cfg --output-file=messages.pot --input-dirs=.
|
||||
|
||||
To merge translations with existing catalogs use::
|
||||
|
||||
poetry run pybabel update -i messages.pot -d debianmemberportfolio/translations
|
||||
|
||||
Compile the translations to gettext's .mo format using::
|
||||
|
||||
poetry run pybabel compile -d debianmemberportfolio/translations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue