Skip to content

Commit d815805

Browse files
authored
Merge pull request #48 from PyNumLab/website
prepare for website
2 parents fb6a809 + 2b40c96 commit d815805

286 files changed

Lines changed: 15293 additions & 9241 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- ".github/workflows/docs.yml"
8+
- "README.md"
9+
- "docs/**"
10+
- "mkdocs.yml"
11+
- "pyproject.toml"
12+
- "tests/docs/**"
13+
- "tools/mkdocs_publication.py"
14+
pull_request:
15+
paths:
16+
- ".github/workflows/docs.yml"
17+
- "README.md"
18+
- "docs/**"
19+
- "mkdocs.yml"
20+
- "pyproject.toml"
21+
- "tests/docs/**"
22+
- "tools/mkdocs_publication.py"
23+
workflow_dispatch:
24+
25+
permissions:
26+
contents: read
27+
28+
concurrency:
29+
group: pages
30+
cancel-in-progress: true
31+
32+
jobs:
33+
build:
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: read
37+
pages: write
38+
steps:
39+
- name: Check out repository
40+
uses: actions/checkout@v4
41+
42+
- name: Set up Python
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: "3.12"
46+
cache: pip
47+
cache-dependency-path: pyproject.toml
48+
49+
- name: Install documentation dependencies
50+
run: python -m pip install -e ".[docs,qa]"
51+
52+
- name: Run documentation tests
53+
run: python -m pytest -q tests/docs
54+
55+
- name: Build reviewed documentation
56+
run: python -m mkdocs build --strict
57+
58+
- name: Configure GitHub Pages
59+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
60+
uses: actions/configure-pages@v5
61+
62+
- name: Upload GitHub Pages artifact
63+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
64+
uses: actions/upload-pages-artifact@v4
65+
with:
66+
path: site
67+
68+
deploy:
69+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
70+
environment:
71+
name: github-pages
72+
url: ${{ steps.deployment.outputs.page_url }}
73+
runs-on: ubuntu-latest
74+
needs: build
75+
permissions:
76+
pages: write
77+
id-token: write
78+
steps:
79+
- name: Deploy GitHub Pages
80+
id: deployment
81+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ mutants/
1010
.ruff_cache/
1111
.benchmarks/
1212
htmlcov/
13+
site/
1314

1415
*.pyc
1516
*.pyo

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ When updating tests, remove obsolete tests that only assert removed/old implemen
1717

1818
Before `x2py/semantics/ir2ast.py` runs, the post-IR policy stage must have completed every semantic decision needed by wrapper generation, including object kind, ownership, transfer, destruction, mutability/writeback, nullability, output projection, release responsibility, contract-value storage mode (`stack`, `heap`, or `alias`), getter behavior, native setter assignment, and Python setter exposure. Bridge and binding generators may only dispatch from those completed decisions into small named implementation methods. They must not infer or override semantic policy from datatype, `intent`, dotted-variable shape, `is_alias`, or local memory checks, and they must not contain a fallback that silently chooses a different behavior. When such a decision is found in bridge or binding code, remove it there and move it into post-IR policy completion. Backend-local helper temporaries may still be created inside the selected implementation method because they are emitted-code details, not semantic policy.
1919

20+
For behavior changes, first try to express the change in completed semantic
21+
policy or the shared wrapper plan. Change binding or bridge lowering only when
22+
the selected plan requires a genuinely new emitted-code mechanism; those
23+
generators should otherwise keep reusing and dispatching existing planned
24+
paths.
25+
2026
After every implementation task, the final summary must include a breakdown of
2127
the stages that actually changed. Relevant stages include parsing, semantic IR
2228
construction, post-IR policy completion, IR-to-AST/lowering, binding

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ X2PY_C_DOCS_END -->
344344

345345
For diagnostic and inspection commands beyond the main build path, start with
346346
`python3 -m x2py --help`, then continue to the
347-
[Fortran wrapper guide](docs/user/guide/fortran-wrapper.md).
347+
[CLI command reference](docs/user/reference/cli-commands.md).
348348

349349
<!-- X2PY_C_DOCS_START
350350
The runtime build path accepts one or more ordered Fortran sources. C parsing,
@@ -557,9 +557,8 @@ ownership, callback lifetime, ABI shims, or Python-visible projections.
557557
- **[Getting Started](docs/user/getting-started/index.md)** — Installation, verification, standalone procedures, modules, and rebuild workflow
558558
- **[User Guide](docs/user/guide/index.md)** — Detailed guidance on data types, functions, subroutines, modules, arrays, derived types, callbacks, ownership, runtime behavior, and packaging
559559
<!--
560-
- **[Tutorials](docs/user/tutorials/)** — Step-by-step walkthroughs
561-
- **[Examples Cookbook](docs/user/examples/verified-cookbook.md)** — Ready-to-use Fortran wrapper patterns and recipes
562-
- **[CLI Reference](docs/user/reference/cli.md)** — Complete command-line documentation
560+
- **[Tutorials](docs/user/tutorials/index.md)** — Step-by-step walkthroughs
561+
- **[CLI Reference](docs/user/reference/cli-commands.md)** — Complete command-line documentation
563562
- **[Language Support](docs/user/language-support/index.md)** — What is supported, partially supported, or planned
564563
- **[FAQ](docs/user/faq/index.md)** — Concise answers to common questions
565564
- **[Troubleshooting](docs/user/troubleshooting/index.md)** — Solutions for installation, compiler, build, runtime, and platform issues

docs/developer/adding-a-code-generation-backend.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ audience: developers, contributors
44
prerequisites: code generation design, internal architecture
55
related: adding-a-feature.md, build-system.md
66
status: planned-documentation
7+
publication: draft
78
---
89

910
# Adding A New Code Generation Backend

docs/developer/adding-a-feature.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ audience: developers, contributors
44
prerequisites: testing strategy, documentation architecture
55
related: adding-a-fortran-construct.md, coding-standards.md
66
status: planned-documentation
7+
publication: draft
78
---
89

910
# Adding A New Feature

docs/developer/adding-a-fortran-construct.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ audience: developers, contributors
44
prerequisites: parser architecture, semantic analysis
55
related: adding-a-feature.md, fortran-parser-reference.md
66
status: planned-documentation
7+
publication: draft
78
---
89

910
# Adding A New Fortran Construct

docs/developer/build-system.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ audience: developers, contributors
44
prerequisites: repository structure
55
related: testing-strategy.md, ../user/reference/configuration-files.md
66
status: planned-documentation
7+
publication: draft
78
---
89

910
# Build System

docs/developer/c-parser-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ audience: developers
55
prerequisites: repository structure, parser architecture
66
related: adding-a-feature.md, repository-structure.md
77
status: maintained
8+
publication: draft
89
---
910

1011
<!-- X2PY_C_DOCS_START

docs/developer/coding-standards.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ audience: contributors
44
prerequisites: repository structure
55
related: testing-strategy.md, quality-assurance.md
66
status: planned-documentation
7+
publication: draft
78
---
89

910
# Coding Standards

0 commit comments

Comments
 (0)