Archive legacy pycompact.py python bindings and update documentation with historical context
This commit is contained in:
parent
09e52eeee6
commit
2b3362a927
8 changed files with 30 additions and 12 deletions
|
|
@ -67,15 +67,16 @@ graph TD
|
||||||
F[post.f90 / Main Driver] -->|Orchestrates calculations| C
|
F[post.f90 / Main Driver] -->|Orchestrates calculations| C
|
||||||
F -->|Parallelizes domain| G[m_openmpi.f90]
|
F -->|Parallelizes domain| G[m_openmpi.f90]
|
||||||
F -->|Loads run configuration| H[m_parameters.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
|
## 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.
|
- **[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.*
|
*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
|
# 3. Create Python stubs for mkdocstrings
|
||||||
python_modules = [
|
python_modules = [
|
||||||
("code_gen", "Code Generator (`code_gen.py`)"),
|
("code_gen", "Code Generator (`code_gen.py`)"),
|
||||||
("post", "Compiler Stages (`post.py`)"),
|
("post", "Compiler Stages (`post.py`)")
|
||||||
("pycompact", "Python Bindings (`pycompact.py`)")
|
|
||||||
]
|
]
|
||||||
for mod_name, title in python_modules:
|
for mod_name, title in python_modules:
|
||||||
stub_path = os.path.join(docs_dir, "python", f"{mod_name}.md")
|
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}
|
f.write(f"""# {title}
|
||||||
|
|
||||||
::: {mod_name}
|
::: {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
|
# 4. Environment validation
|
||||||
|
|
|
||||||
6
docs/archive/pycompact.md
Normal file
6
docs/archive/pycompact.md
Normal 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
|
||||||
|
|
@ -17,14 +17,15 @@ graph TD
|
||||||
F[post.f90 / Main Driver] -->|Orchestrates calculations| C
|
F[post.f90 / Main Driver] -->|Orchestrates calculations| C
|
||||||
F -->|Parallelizes domain| G[m_openmpi.f90]
|
F -->|Parallelizes domain| G[m_openmpi.f90]
|
||||||
F -->|Loads run configuration| H[m_parameters.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
|
## 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.
|
- **[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.*
|
*Generated automatically using industry-standard tools: FORD, MkDocs, and Material theme.*
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Python Bindings (`pycompact.py`)
|
|
||||||
|
|
||||||
::: pycompact
|
|
||||||
2
ford.md
2
ford.md
|
|
@ -5,7 +5,7 @@ author: Google DeepMind Team & Ignis
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
src_dir: ./code
|
src_dir: ./code
|
||||||
output_dir: ./docs/fortran_api
|
output_dir: ./docs/fortran_api
|
||||||
exclude: **/pycompact/**
|
exclude: **/archive/**
|
||||||
preprocess: true
|
preprocess: true
|
||||||
display: public
|
display: public
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ plugins:
|
||||||
default_handler: python
|
default_handler: python
|
||||||
handlers:
|
handlers:
|
||||||
python:
|
python:
|
||||||
paths: [code, code/code_gen, code/pycompact]
|
paths: [code, code/code_gen, code/archive/pycompact]
|
||||||
options:
|
options:
|
||||||
docstring_style: google
|
docstring_style: google
|
||||||
show_source: true
|
show_source: true
|
||||||
|
|
@ -40,7 +40,8 @@ nav:
|
||||||
- Python API Reference:
|
- Python API Reference:
|
||||||
- Code Generator: python/code_gen.md
|
- Code Generator: python/code_gen.md
|
||||||
- Compiler Stages: python/post.md
|
- Compiler Stages: python/post.md
|
||||||
- Python Bindings: python/pycompact.md
|
- Archived Components:
|
||||||
|
- Python Bindings: archive/pycompact.md
|
||||||
- Fortran Core Reference:
|
- Fortran Core Reference:
|
||||||
- Modules & Procedures: fortran.md
|
- Modules & Procedures: fortran.md
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue