FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
HydroModPy/poly.py at dev · HydroModPy/HydroModPy · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
HydroModPy
/
HydroModPy
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
11
Code
Issues
18
Pull requests
1
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
HydroModPy
/
poly.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (40 loc) · 1.6 KB
Breadcrumbs
HydroModPy
/
poly.py
Copy path
File metadata and controls
53 lines (40 loc) · 1.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""sphinx-polyversion driver for HydroModPy.
Builds the HTML documentation for the published branches and tags into a
single merged site under ``docs/build/html``. That merged tree is what the
Pages deploy publishes at https://docs.hydromodpy.fr/, one folder per version.
Run locally::
mamba activate hmp_refact
python -m sphinx_polyversion poly.py
Add ``-l`` (or ``--local``) to render only the current working tree without
checking out any other revision (useful while iterating)::
python -m sphinx_polyversion poly.py -l
"""
from
__future__
import
annotations
from
pathlib
import
Path
from
sphinx_polyversion
import
DefaultDriver
from
sphinx_polyversion
.
environment
import
Environment
from
sphinx_polyversion
.
git
import
Git
,
file_predicate
from
sphinx_polyversion
.
sphinx
import
SphinxBuilder
ROOT
=
Path
(
__file__
).
parent
# Branches whose `docs/source` is built into the merged site. main + dev
# are the current trunks. archive-v1 is the frozen legacy documentation line.
BRANCH_REGEX
=
r"(main|dev|archive-v1|maint/\d+\.x)"
# Tags follow ``vMAJOR.MINOR.PATCH`` plus optional PEP 440 pre-release suffix.
TAG_REGEX
=
r"v\d+\.\d+\.\d+(?:a\d+|b\d+|rc\d+)?"
# Only rebuild a revision when files inside the docs source tree changed.
DOCS_SOURCE
=
"docs/source"
DefaultDriver
(
ROOT
,
ROOT
/
"docs"
/
"build"
/
"html"
,
vcs
=
Git
(
branch_regex
=
BRANCH_REGEX
,
tag_regex
=
TAG_REGEX
,
buffer_size
=
1024
*
1024
,
predicate
=
file_predicate
([
DOCS_SOURCE
]),
),
builder
=
SphinxBuilder
(
DOCS_SOURCE
,
args
=
[
"-j"
,
"auto"
,
"-b"
,
"html"
],
),
env
=
Environment
,
).
run
()
Back
|
FazBrowse Home
|
New Git URL