diff --git a/.github/workflows/documentation-trigger.yml b/.github/workflows/documentation-trigger.yml deleted file mode 100644 index 7b7e5650..00000000 --- a/.github/workflows/documentation-trigger.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Build Documentation -on: - push: - paths: - - docs/** - branches: - - '**' - -jobs: - publish_release: - if: github.repository_owner == 'synodic' - uses: synodic/.github/.github/workflows/documentation-trigger.yml@stable - with: - repository: synodic/CPPython-Website - secrets: - PAT: ${{ secrets.CPPYTHON_DOC_PAT }} \ No newline at end of file diff --git a/.github/workflows/python-deploy-docs.yml b/.github/workflows/python-deploy-docs.yml new file mode 100644 index 00000000..10c10064 --- /dev/null +++ b/.github/workflows/python-deploy-docs.yml @@ -0,0 +1,27 @@ +name: Publish Website to GitHub Pages +on: + push: + branches: + - stable + + # Manual trigger + workflow_dispatch: + + # External trigger + repository_dispatch: + types: + - docs-deploy + +# Allow one concurrent deployment for the workflow +concurrency: + group: page-deploy + cancel-in-progress: true + +jobs: + build: + permissions: + contents: read + pages: write + id-token: write + if: github.repository_owner == 'synodic' + uses: synodic/.github/.github/workflows/python-deploy-docs.yml@stable diff --git a/docs/antora.yml b/docs/antora.yml deleted file mode 100644 index 7487323a..00000000 --- a/docs/antora.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: cppython -version: 0.1.0 -title: CPPython -nav: - - modules/ROOT/nav.adoc - - modules/plugins/nav.adoc - - modules/tests/nav.adoc diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..f142e1cb --- /dev/null +++ b/docs/index.md @@ -0,0 +1 @@ +# CPPython diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc deleted file mode 100644 index e5f79e60..00000000 --- a/docs/modules/ROOT/nav.adoc +++ /dev/null @@ -1,3 +0,0 @@ -.CPPython -* xref:index.adoc[] -* xref:configuration.adoc[] \ No newline at end of file diff --git a/docs/modules/ROOT/pages/configuration.adoc b/docs/modules/ROOT/pages/configuration.adoc deleted file mode 100644 index 6fb6e458..00000000 --- a/docs/modules/ROOT/pages/configuration.adoc +++ /dev/null @@ -1,16 +0,0 @@ -= Configuration - -== Local Configuration - -Defined within the `pyproject.toml` file, the local configuration is used to customize the behavior of `cppython` for a specific project. The configuration is defined under the `[tool.cppython]` table. - -== Global Configuration - -Configuration exists in four places, each with a different default scope. The order of precedence is as follows: - -1. Configuration file override provided by the CLI or local `pyproject.toml` file. -2. The local configuration file, `cppython.toml`, in the current working directory. -3. The user level configuration file, `cppython.toml`, in the user's home directory. -4. The global configuration file, `cppython.toml`, in the system configuration directory. - -Each configuration file that is found will be merged into the next configuration file found. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc deleted file mode 100644 index c89ed3d2..00000000 --- a/docs/modules/ROOT/pages/index.adoc +++ /dev/null @@ -1,16 +0,0 @@ -= CPPython Documentation - -CPPython is a C++ project management tool that integrates with various build systems, package managers, and development tools through a flexible plugin architecture. - -== Getting Started - -- xref:configuration.adoc[Configuration Guide] - Learn how to configure CPPython for your project -- xref:plugins:index.adoc[Plugin System] - Understand the plugin architecture and available plugins - -== Plugin Documentation - -=== Build System Integration - -- xref:plugins:cmake.adoc[CMake Generator Plugin] - Complete integration with CMake build system - * xref:plugins:cmake-presets.adoc[CMake Presets System] - Advanced preset management - * xref:plugins:cmake-configuration.adoc[Configuration Options] - Detailed configuration reference \ No newline at end of file diff --git a/docs/modules/plugins/nav.adoc b/docs/modules/plugins/nav.adoc deleted file mode 100644 index 6e40db10..00000000 --- a/docs/modules/plugins/nav.adoc +++ /dev/null @@ -1,5 +0,0 @@ -.Plugins -* xref:index.adoc[Plugin System Overview] -* xref:cmake.adoc[CMake Generator Plugin] -** xref:cmake-presets.adoc[CMake Presets System] -** xref:cmake-configuration.adoc[Configuration Options] diff --git a/docs/modules/plugins/pages/cmake-configuration.adoc b/docs/modules/plugins/pages/cmake-configuration.adoc deleted file mode 100644 index c238e1fa..00000000 --- a/docs/modules/plugins/pages/cmake-configuration.adoc +++ /dev/null @@ -1,14 +0,0 @@ -= CMake Configuration Options - -This page provides a comprehensive reference for configuring the CMake Generator Plugin in CPPython. - -== Configuration Location - -CMake plugin configuration is specified in your project's `pyproject.toml` file under the `[tool.cppython.generators.cmake]` section: - -[source,toml] ----- -[tool.cppython.generators.cmake] -preset_file = "CMakePresets.json" -configuration_name = "default" ----- \ No newline at end of file diff --git a/docs/modules/plugins/pages/cmake-presets.adoc b/docs/modules/plugins/pages/cmake-presets.adoc deleted file mode 100644 index f3dbc37f..00000000 --- a/docs/modules/plugins/pages/cmake-presets.adoc +++ /dev/null @@ -1,72 +0,0 @@ -= CMake Presets System - -The CMake Presets System in CPPython provides a sophisticated three-tier architecture for managing CMake configurations across different build scenarios, dependency providers, and user customizations. - -== Architecture Overview - -The preset system is designed around three distinct layers: - -[source,text] ----- -User CMakePresets.json - ↓ (includes) -CPPython Presets (.cppython/cppython.json) - ↓ (includes) -Provider Presets (.cppython/providers/*.json) ----- - -Each layer serves a specific purpose and maintains clear separation of concerns. - -== Provider Preset Layer - -The provider layer contains presets generated by dependency management tools like Conan or vcpkg. These presets include tool-specific configurations and are completely managed by CPPython. - -=== Structure - -Each provider generates **4 configure presets**: - -`{provider}-base`:: -Hidden preset containing common configuration shared by all other presets. Includes toolchain files and top-level includes. - -`{provider}-default`:: -Hidden preset inheriting from base. No specific build type set, making it suitable for multi-config generators. - -`{provider}-release`:: -Hidden preset inheriting from base with `CMAKE_BUILD_TYPE=Release` for single-config generators. - -`{provider}-debug`:: -Hidden preset inheriting from base with `CMAKE_BUILD_TYPE=Debug` for single-config generators. - - -== CPPython Preset Layer - -The CPPython layer standardizes provider configurations and creates both configure and build presets. This layer serves as the primary interface between provider-specific settings and user configurations. - -=== Configure Presets - -The CPPython layer generates **3 configure presets**: - -`default`:: -Public preset inheriting from `{provider}-default`. Designed for multi-config generators. - -`release`:: -Public preset inheriting from `{provider}-release`. Optimized for single-config Release builds. - -`debug`:: -Public preset inheriting from `{provider}-debug`. Optimized for single-config Debug builds. - -=== Build Presets - -The CPPython layer generates **4 build presets** to handle both single-config and multi-config generators: - -`multi-release`:: -Uses the `default` configure preset with `configuration: "Release"`. For multi-config generators. - -`multi-debug`:: -Uses the `default` configure preset with `configuration: "Debug"`. For multi-config generators. - -`release`:: -Uses the `release` configure preset with `configuration: "Release"`. For single-config generators. - -`debug`:: -Uses the `debug` configure preset with `configuration: "Debug"`. For single-config generators. \ No newline at end of file diff --git a/docs/modules/plugins/pages/cmake.adoc b/docs/modules/plugins/pages/cmake.adoc deleted file mode 100644 index 121aa134..00000000 --- a/docs/modules/plugins/pages/cmake.adoc +++ /dev/null @@ -1,7 +0,0 @@ -= CMake Generator Plugin - -**TODO** - -== Overview - -**TODO** \ No newline at end of file diff --git a/docs/modules/plugins/pages/index.adoc b/docs/modules/plugins/pages/index.adoc deleted file mode 100644 index 0a765367..00000000 --- a/docs/modules/plugins/pages/index.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= Plugin System Overview - -CPPython uses a plugin-based architecture to support different build systems, package managers, and source control systems. The plugin system is designed to be extensible and modular, allowing for easy integration of new tools and workflows. - -== Plugin Types - -CPPython supports three main types of plugins: - -=== Generator Plugins - -Generator plugins integrate with build systems like CMake, providing functionality to generate build files and manage build configurations. - -Currently supported generators: -- xref:cmake.adoc[CMake Generator Plugin] - -=== Provider Plugins - -Provider plugins integrate with package managers and dependency providers, handling dependency resolution and environment setup. - -Currently supported providers: -- Conan -- vcpkg - -=== Source Control Manager (SCM) Plugins - -SCM plugins integrate with version control systems to manage project metadata and versioning. - -Currently supported SCM systems: -- Git - -== Plugin Architecture - -The plugin system follows a consistent pattern where each plugin type implements specific interfaces: - -- **Generator Interface**: Handles build system integration -- **Provider Interface**: Manages dependency resolution -- **SCM Interface**: Provides version control integration - -Each plugin can define: -- Configuration schemas using Pydantic models -- Synchronization data structures -- Build and resolution logic -- File generation and management - -== Configuration - -Plugins are configured through the `pyproject.toml` file in the `[tool.cppython]` section. Each plugin type has its own configuration section with specific options and defaults. \ No newline at end of file diff --git a/docs/modules/tests/nav.adoc b/docs/modules/tests/nav.adoc deleted file mode 100644 index a8cd6854..00000000 --- a/docs/modules/tests/nav.adoc +++ /dev/null @@ -1,3 +0,0 @@ -.Testing -* xref:index.adoc[Testing Overview] -* xref:fixtures.adoc[Test Fixtures] \ No newline at end of file diff --git a/docs/modules/tests/pages/fixtures.adoc b/docs/modules/tests/pages/fixtures.adoc deleted file mode 100644 index 121803f5..00000000 --- a/docs/modules/tests/pages/fixtures.adoc +++ /dev/null @@ -1,39 +0,0 @@ -= Fixtures - -Fixtures can be accessed by installing the optional `pytest` module, `cppython.pytest`. - -== Static Fixtures - -=== `install_path` - -=== `pep621_configuration` - -=== `pep621_data` - -=== `cppython_local_configuration` - -=== `cppython_global_configuration` - -=== `plugin_build_data` - -=== `plugin_cppython_data` - -=== `cppython_data` - -=== `core_data` - -=== `project_configuration` - -=== `project_data` - -=== `project` - -== Dynamic Fixtures - -With the pytest feature of `pytest_generate_tests` we register multiple dynamic fixtures for collecting test data, both for plugins and for the test suite itself. - -=== `build_` - -A Path object representing the directory named `` in the build directory. - -* Discovered from `tests/build/` diff --git a/docs/modules/tests/pages/index.adoc b/docs/modules/tests/pages/index.adoc deleted file mode 100644 index fc108621..00000000 --- a/docs/modules/tests/pages/index.adoc +++ /dev/null @@ -1 +0,0 @@ -= Test Documentation \ No newline at end of file diff --git a/pdm.lock b/pdm.lock index b1ff5e74..fa4cee18 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2,10 +2,10 @@ # It is not intended for manual editing. [metadata] -groups = ["default", "cmake", "conan", "git", "lint", "pdm", "pytest", "release", "test"] +groups = ["default", "cmake", "conan", "docs", "git", "lint", "pdm", "pytest", "release", "test"] strategy = [] lock_version = "4.5.0" -content_hash = "sha256:003592f9dc90a509e4177a7123612b87ce3fc731c82415d955af48c1897d542e" +content_hash = "sha256:afd12e054b8dee77403a42e9e5da340cb042fb68f86e1f6c8b4f871e98eb1f06" [[metadata.targets]] requires_python = ">=3.14" @@ -269,6 +269,19 @@ files = [ {file = "coverage-7.10.7.tar.gz", hash = "sha256:f4ab143ab113be368a3e9b795f9cd7906c5ef407d6173fe9675a902e1fffc239"}, ] +[[package]] +name = "deepmerge" +version = "2.0" +requires_python = ">=3.8" +summary = "A toolset for deeply merging Python dictionaries." +dependencies = [ + "typing-extensions; python_version <= \"3.9\"", +] +files = [ + {file = "deepmerge-2.0-py3-none-any.whl", hash = "sha256:6de9ce507115cff0bed95ff0ce9ecc31088ef50cbdf09bc90a09349a318b3d00"}, + {file = "deepmerge-2.0.tar.gz", hash = "sha256:5c3d86081fbebd04dd5de03626a0607b809a98fb6ccba5770b62466fe940ff20"}, +] + [[package]] name = "dep-logic" version = "0.5.1" @@ -491,6 +504,16 @@ files = [ {file = "libcst-1.8.6.tar.gz", hash = "sha256:f729c37c9317126da9475bdd06a7208eb52fcbd180a6341648b45a56b4ba708b"}, ] +[[package]] +name = "markdown" +version = "3.10" +requires_python = ">=3.10" +summary = "Python implementation of John Gruber's Markdown." +files = [ + {file = "markdown-3.10-py3-none-any.whl", hash = "sha256:b5b99d6951e2e4948d939255596523444c0e677c669700b1d17aa4a8a464cb7c"}, + {file = "markdown-3.10.tar.gz", hash = "sha256:37062d4f2aa4b2b6b32aefb80faa300f82cc790cb949a35b8caede34f2b68c0e"}, +] + [[package]] name = "markdown-it-py" version = "3.0.0" @@ -687,6 +710,20 @@ files = [ {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, ] +[[package]] +name = "pymdown-extensions" +version = "10.17.1" +requires_python = ">=3.9" +summary = "Extension pack for Python Markdown." +dependencies = [ + "markdown>=3.6", + "pyyaml", +] +files = [ + {file = "pymdown_extensions-10.17.1-py3-none-any.whl", hash = "sha256:1f160209c82eecbb5d8a0d8f89a4d9bd6bdcbde9a8537761844cfc57ad5cd8a6"}, + {file = "pymdown_extensions-10.17.1.tar.gz", hash = "sha256:60d05fe55e7fb5a1e4740fc575facad20dc6ee3a748e8d3d36ba44142e75ce03"}, +] + [[package]] name = "pyproject-hooks" version = "1.2.0" @@ -1015,3 +1052,33 @@ files = [ {file = "virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11"}, {file = "virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af"}, ] + +[[package]] +name = "zensical" +version = "0.0.7" +requires_python = ">=3.10" +summary = "A modern static site generator built by the creators of Material for MkDocs" +dependencies = [ + "click>=8.1.8", + "deepmerge>=2.0", + "markdown>=3.7", + "pygments>=2.16", + "pymdown-extensions>=10.15", + "pyyaml>=6.0.2", + "tomli>=2.0; python_full_version < \"3.11\"", +] +files = [ + {file = "zensical-0.0.7-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:895ef47444943b4b2dafd4b851fa5f759c1a45cf3df660f430b609a43e6d919d"}, + {file = "zensical-0.0.7-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:522d46093272c8a2f4b8909619228b1f25ebee88e1afe580a0ca706ebd8f9349"}, + {file = "zensical-0.0.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50b2f0a461bd7bb94e7397b887267c1b334ad2c13a2f5214fe56ecf029130589"}, + {file = "zensical-0.0.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b7d63e76f65cd95059d00323a647474ec1ba26cfb6f8ed66ee655416f6a42457"}, + {file = "zensical-0.0.7-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3714c3578083fedf242e37ddb3fac2fdfb1edb260b4b6965900d4b1290efaff2"}, + {file = "zensical-0.0.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:340e71e3237083f5c9fa814fbd845c8bf05e5005f86b95b8a153783f11e1a2da"}, + {file = "zensical-0.0.7-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:467c23873673a2fe2bbc5a6f1e0103a21de302fbcfc0d1f1e2f85a596fd9fc6d"}, + {file = "zensical-0.0.7-cp310-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:86f6ed4f8be7f33d236e56d892e33b24f0fe31063ea1e43d3ed30a0723376465"}, + {file = "zensical-0.0.7-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:1e9ef76eec5b0e7eed11d82b2da4cd474c76711f940cd3947e794dc8210c862c"}, + {file = "zensical-0.0.7-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:90049dea031e870c0381cad99c4108951e06a7526cdb13b36a78256feddb40f2"}, + {file = "zensical-0.0.7-cp310-abi3-win32.whl", hash = "sha256:2dca8951c4768f0484323254292e5db1c1bc61caac2e35196cae2b50a81cd08e"}, + {file = "zensical-0.0.7-cp310-abi3-win_amd64.whl", hash = "sha256:c42682b5611298bf13738253b0ee1b0054c115c4488ae2c14878871c1e3f801d"}, + {file = "zensical-0.0.7.tar.gz", hash = "sha256:4738903eba16a9bc0aa029cfb10e6670d8f031996691a3a9f4a754c49da96e6f"}, +] diff --git a/pyproject.toml b/pyproject.toml index 0003bf48..90007dcd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ cppython = "cppython.test.pytest.fixtures" [dependency-groups] lint = ["ruff>=0.14.5", "pyrefly>=0.41.3"] test = ["pytest>=9.0.1", "pytest-cov>=7.0.0", "pytest-mock>=3.15.1"] +docs = ["zensical>=0.0.7"] [project.scripts] cppython = "cppython.console.entry:app" @@ -101,6 +102,8 @@ format = { shell = "ruff format" } lint = { composite = ["analyze", "format", "type-check"] } test = { shell = "pytest --cov=cppython --verbose tests" } type-check = { shell = "pyrefly check" } +generate = { shell = "zensical build --clean" } +dev = { shell = "zensical serve" } [build-system] build-backend = "pdm.backend" diff --git a/zensical.toml b/zensical.toml new file mode 100644 index 00000000..77467af9 --- /dev/null +++ b/zensical.toml @@ -0,0 +1,5 @@ +[project] +site_name = "CPPython" +site_url = "https://synodic.github.io/CPPython" +docs_dir = "docs" +site_dir = "dist"