Meta infos

Gitlab project

Issues

Pipelines

root directory

$ ls -als
total 188
4 drwxr-xr-x 17   4096 oct.  27 18:47 .
4 drwxr-xr-x  3   4096 oct.  27 18:34 ..
4 drwxr-xr-x  7   4096 oct.  27 18:34 afrique
4 drwxr-xr-x  5   4096 oct.  27 18:43 ameriques
4 drwxr-xr-x  6   4096 oct.  27 18:43 asie
4 -rwxr-xr-x  1   3677 oct.  27 18:44 conf.py
4 drwxr-xr-x  3   4096 oct.  27 18:34 coordination_rouge_et_noire
4 drwxr-xr-x 11   4096 oct.  27 18:42 europe
4 -rw-r--r--  1     96 oct.  27 18:40 feed.xml
4 drwxr-xr-x  8   4096 oct.  27 18:47 .git
4 -rwxr-xr-x  1     49 oct.  27 18:34 .gitignore
4 -rw-r--r--  1    211 oct.  27 18:45 .gitlab-ci.yml
4 drwxr-xr-x  6   4096 oct.  27 18:34 icl_cit
4 drwxr-xr-x  2   4096 oct.  27 18:34 images
4 drwxr-xr-x  2   4096 oct.  19 18:09 index
4 -rwxr-xr-x  1   1349 oct.  27 18:43 index.rst
4 -rw-r--r--  1   1154 mars  30  2020 Makefile
4 drwxr-xr-x  2   4096 oct.  27 18:47 meta
4 drwxr-xr-x  3   4096 oct.  27 18:42 orga_internationales
84 -rw-r--r--  1  85097 oct.  27 18:47 poetry.lock
4 -rw-r--r--  1   1016 oct.  27 18:45 .pre-commit-config.yaml
4 -rw-rw-rw-  1    334 oct.  27 18:41 pyproject.toml
4 -rw-r--r--  1    559 oct.  27 18:34 requirements.txt
4 drwxr-xr-x  3   4096 oct.  27 18:43 reseau_euro_mediterraneen
4 drwxr-xr-x  2   4096 oct.  27 18:43 reseau_europeen_alternatifs
4 drwxr-xr-x  2   4096 oct.  27 18:34 secretariat_international
4 drwxr-xr-x  2   4096 oct.  26 17:11 _static

pyproject.toml

 1[tool.poetry]
 2name = "cntf_international"
 3version = "0.1.0"
 4description = "International"
 5authors = ["Noam <noamsw@pm.me>"]
 6
 7[tool.poetry.dependencies]
 8python = "^3.12"
 9sphinx-material = "*"
10sphinx-copybutton = "*"
11
12[tool.poetry.dev-dependencies]
13
14[build-system]
15requires = ["poetry-core>=1.0.0"]
16build-backend = "poetry.core.masonry.api"

conf.py

  1# Configuration file for the Sphinx documentation builder.
  2#
  3# This file only contains a selection of the most common options. For a full
  4# list see the documentation:
  5# http://www.sphinx-doc.org/en/master/config
  6# -- Path setup --------------------------------------------------------------
  7# If extensions (or modules to document with autodoc) are in another directory,
  8# add these directories to sys.path here. If the directory is relative to the
  9# documentation root, use os.path.abspath to make it absolute, like shown here.
 10#
 11# import os
 12# import sys
 13# sys.path.insert(0, os.path.abspath('.'))
 14import platform
 15from datetime import datetime
 16from zoneinfo import ZoneInfo
 17
 18import sphinx
 19import sphinx_material
 20
 21project = "ASSR International"
 22html_title = project
 23
 24author = f"Scribe CNT-F"
 25html_logo = "images/cnt.jpg"
 26html_favicon = "images/cnt.jpg"
 27release = "0.1.0"
 28now = datetime.now(tz=ZoneInfo("Europe/Paris"))
 29version = f"{now.year}-{now.month:02}-{now.day:02} {now.hour:02}H ({now.tzinfo})"
 30today = version
 31
 32extensions = [
 33    "sphinx.ext.autodoc",
 34    "sphinx.ext.doctest",
 35    "sphinx.ext.extlinks",
 36    "sphinx.ext.intersphinx",
 37    "sphinx.ext.todo",
 38    "sphinx.ext.mathjax",
 39    "sphinx.ext.viewcode",
 40    "sphinx_copybutton",
 41]
 42autosummary_generate = True
 43autoclass_content = "class"
 44
 45# Add any paths that contain templates here, relative to this directory.
 46templates_path = ["_templates"]
 47exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
 48html_static_path = ["_static"]
 49html_show_sourcelink = True
 50html_sidebars = {
 51    "**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
 52}
 53extensions.append("sphinx_material")
 54html_theme_path = sphinx_material.html_theme_path()
 55html_context = sphinx_material.get_html_context()
 56html_theme = "sphinx_material"
 57
 58extensions.append("sphinx.ext.intersphinx")
 59intersphinx_mapping = {
 60    "congres": ("https://cntf.frama.io/congres-confederaux/", None),
 61    "statuts_conf": ("https://cntf.frama.io/statuts/", None),
 62    "syndicats": ("https://cntf.frama.io/syndicats/", None),
 63    "rhone_alpes": ("http://cntf.frama.io/rhone-alpes", None),
 64    "ildefrance": ("http://cntf.frama.io/iledefrance", None),
 65    "juridique": ("https://cntf.frama.io/juridique/", None),
 66    "livret": ("https://cntf.frama.io/livret-accueil/", None),
 67}
 68
 69extensions.append("sphinx.ext.todo")
 70todo_include_todos = True
 71
 72# material theme options (see theme.conf for more information)
 73html_theme_options = {
 74    "base_url": "https://cntf.frama.io/international/",
 75    "repo_url": "https://framagit.org/cntf/international",
 76    "repo_name": project,
 77    "html_minify": False,
 78    "html_prettify": True,
 79    "css_minify": True,
 80    "repo_type": "gitlab",
 81    "globaltoc_depth": -1,
 82    "color_primary": "black",
 83    "color_accent": "cyan",
 84    "touch_icon": "images/cnt.jpg",
 85    "theme_color": "#2196f3",
 86    "master_doc": False,
 87    "nav_title": f"{project} ({today})",
 88    "nav_links": [
 89        {
 90            "href": "genindex",
 91            "internal": True,
 92            "title": "Index",
 93        },
 94        {
 95            "href": "https://cntf.frama.io/statuts/",
 96            "internal": False,
 97            "title": "Statuts CNT-F",
 98        },
 99    ],
100    "heroes": {
101        "index": "ASSR international",
102    },
103    "table_classes": ["plain"],
104}
105
106language = "fr"
107html_last_updated_fmt = ""
108
109todo_include_todos = True
110
111html_use_index = True
112html_domain_indices = True
113html_css_files = [
114    "css/custom.css",
115]
116
117copyright = f"2009-{now.year}, {author} Built with sphinx {sphinx.__version__} Python {platform.python_version()}"
118

gitlab-ci.yaml

 1image: python:3.12.0-slim-bookworm
 2
 3pages:
 4  script:
 5  - pip install -r requirements.txt
 6  - sphinx-build -d _build/doctrees . _build/html
 7  - mv _build/html public
 8  artifacts:
 9    paths:
10    - public
11  only:
12  - main

.pre-commit-config.yaml

 1---
 2
 3# .pre-commit-config.yaml
 4# ========================
 5#
 6# pre-commit clean
 7# pre-commit install
 8# pre-commit install-hooks
 9#
10# precommit hooks installation
11#
12# - pre-commit autoupdate
13#
14# - pre-commit run black
15#
16# continuous integration
17# ======================
18#
19# - pre-commit run --all-files
20#
21
22repos:
23  - repo: https://github.com/pre-commit/pre-commit-hooks
24    rev: v4.0.1
25    hooks:
26    - id: trailing-whitespace
27    - id: end-of-file-fixer
28    - id: check-yaml
29    - id: check-json
30    - id: fix-encoding-pragma
31      args: ['--remove']
32    - id: forbid-new-submodules
33    - id: mixed-line-ending
34      args: ['--fix=lf']
35      description: Forces to replace line ending by the UNIX 'lf' character.
36    # - id: pretty-format-json
37    #  args: ['--no-sort-keys']
38    - id: check-added-large-files
39      args: ['--maxkb=1000']
40    - id: no-commit-to-branch
41      args: [--branch, staging]
42
43  - repo: https://github.com/ambv/black
44    rev: 21.10b0
45    hooks:
46    - id: black
47      language_version: python3.9
48
49  - repo: https://github.com/asottile/reorder_python_imports
50    rev: v2.6.0
51    hooks:
52      - id: reorder-python-imports

Makefile

 1# Minimal makefile for Sphinx documentation
 2#
 3
 4# You can set these variables from the command line.
 5SPHINXOPTS    =
 6SPHINXBUILD   = sphinx-build
 7SPHINXPROJ    = Tutopython
 8SOURCEDIR     = .
 9BUILDDIR      = _build
10
11THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
12
13# Put it first so that "make" without argument is like "make help".
14help:
15	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
16	@echo " "
17	@echo "Targets:"
18	@echo " "
19	@echo "- make check_all"
20	@echo "- make req"
21	@echo "- make updatetools"
22	@echo "- make update"
23	@echo "- make clearcache"
24	@echo " "
25
26clearcache:
27	poetry cache clear --all pypi
28
29
30check_all:
31	pre-commit run --all-files
32
33req:
34	poetry env info --path
35	poetry show --tree
36	poetry check
37	poetry export -f requirements.txt --without-hashes  > requirements.txt
38	cat requirements.txt
39
40update:
41	poetry update
42	@$(MAKE) -f $(THIS_MAKEFILE) req
43	git diff requirements.txt
44
45updatetools:
46	pre-commit autoupdate
47
48.PHONY: help Makefile
49
50# Catch-all target: route all unknown targets to Sphinx using the new
51# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
52%: Makefile
53	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)