Archive legacy pycompact.py python bindings and update documentation with historical context
All checks were successful
CI Test Suite / run-tests (push) Successful in 1m11s
Deploy Documentation / build-and-deploy (push) Successful in 53s

This commit is contained in:
ignis 2026-06-03 12:00:43 +00:00
parent 09e52eeee6
commit 2b3362a927
8 changed files with 30 additions and 12 deletions

View file

@ -67,15 +67,16 @@ graph TD
F[post.f90 / Main Driver] -->|Orchestrates calculations| C
F -->|Parallelizes domain| G[m_openmpi.f90]
F -->|Loads run configuration| H[m_parameters.f90]
I[pycompact.py / Bindings] -->|Wraps CPU calculations| C
I[pycompact.py / Legacy Bindings - Archived] -.->|Transitional| C
```
---
## Navigation Guide
- **[Python API Reference](python/code_gen.md)**: Automatically parsed API and signatures for the DSL parsers, topological compiler stages, and Python wrappers.
- **[Python API Reference](python/code_gen.md)**: Automatically parsed API and signatures for the DSL parsers, topological compiler stages, and code generation routines.
- **[Fortran Core Reference](fortran.md)**: Standard documentation compiled by `FORD` covering tridiagonal compact solvers, math kernels, and MPI bindings.
- **[Archived Python Bindings](archive/pycompact.md)**: Legacy bindings wrapping calculation kernels.
*Generated automatically using industry-standard tools: FORD, MkDocs, and Material theme.*
""")
@ -109,8 +110,7 @@ The Fortran core elements have been fully documented and compiled using **FORD**
# 3. Create Python stubs for mkdocstrings
python_modules = [
("code_gen", "Code Generator (`code_gen.py`)"),
("post", "Compiler Stages (`post.py`)"),
("pycompact", "Python Bindings (`pycompact.py`)")
("post", "Compiler Stages (`post.py`)")
]
for mod_name, title in python_modules:
stub_path = os.path.join(docs_dir, "python", f"{mod_name}.md")
@ -119,6 +119,19 @@ The Fortran core elements have been fully documented and compiled using **FORD**
f.write(f"""# {title}
::: {mod_name}
""")
# Create Archived Python Bindings stub
os.makedirs(os.path.join(docs_dir, "archive"), exist_ok=True)
archive_stub_path = os.path.join(docs_dir, "archive", "pycompact.md")
print(f"Creating Archived Python Bindings stub: {archive_stub_path}")
with open(archive_stub_path, 'w', encoding='utf-8') as f:
f.write("""# Archived Python Bindings (`pycompact.py`)
!!! warning "Archived/Legacy Component"
**Historical Note**: Originally, researchers manually wrote post-processing Fortran codes. To reduce this maintenance overhead, python bindings (`pycompact.py`) were introduced as a transitional wrapper. However, since the bindings did not significantly improve ease of use, we subsequently defined a custom DSL (Domain Specific Language) for describing post-processing operations and developed a compiler (`code_gen.py` & `post.py`) to generate highly optimized Fortran codes. As a result, the python bindings are now archived.
::: pycompact
""")
# 4. Environment validation

View file

@ -0,0 +1,6 @@
# Archived Python Bindings (`pycompact.py`)
!!! warning "Archived/Legacy Component"
**Historical Note**: Originally, researchers manually wrote post-processing Fortran codes. To reduce this maintenance overhead, python bindings (`pycompact.py`) were introduced as a transitional wrapper. However, since the bindings did not significantly improve ease of use, we subsequently defined a custom DSL (Domain Specific Language) for describing post-processing operations and developed a compiler (`code_gen.py` & `post.py`) to generate highly optimized Fortran codes. As a result, the python bindings are now archived.
::: pycompact

View file

@ -17,14 +17,15 @@ graph TD
F[post.f90 / Main Driver] -->|Orchestrates calculations| C
F -->|Parallelizes domain| G[m_openmpi.f90]
F -->|Loads run configuration| H[m_parameters.f90]
I[pycompact.py / Bindings] -->|Wraps CPU calculations| C
I[pycompact.py / Legacy Bindings - Archived] -.->|Transitional| C
```
---
## Navigation Guide
- **[Python API Reference](python/code_gen.md)**: Automatically parsed API and signatures for the DSL parsers, topological compiler stages, and Python wrappers.
- **[Python API Reference](python/code_gen.md)**: Automatically parsed API and signatures for the DSL parsers, topological compiler stages, and code generation routines.
- **[Fortran Core Reference](fortran.md)**: Standard documentation compiled by `FORD` covering tridiagonal compact solvers, math kernels, and MPI bindings.
- **[Archived Python Bindings](archive/pycompact.md)**: Legacy bindings wrapping calculation kernels.
*Generated automatically using industry-standard tools: FORD, MkDocs, and Material theme.*

View file

@ -1,3 +0,0 @@
# Python Bindings (`pycompact.py`)
::: pycompact

View file

@ -5,7 +5,7 @@ author: Google DeepMind Team & Ignis
version: 1.0.0
src_dir: ./code
output_dir: ./docs/fortran_api
exclude: **/pycompact/**
exclude: **/archive/**
preprocess: true
display: public
---

View file

@ -28,7 +28,7 @@ plugins:
default_handler: python
handlers:
python:
paths: [code, code/code_gen, code/pycompact]
paths: [code, code/code_gen, code/archive/pycompact]
options:
docstring_style: google
show_source: true
@ -40,7 +40,8 @@ nav:
- Python API Reference:
- Code Generator: python/code_gen.md
- Compiler Stages: python/post.md
- Python Bindings: python/pycompact.md
- Archived Components:
- Python Bindings: archive/pycompact.md
- Fortran Core Reference:
- Modules & Procedures: fortran.md