diff --git a/.asf.yaml b/.asf.yaml index 5985167d..a237f693 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -22,10 +22,11 @@ github: description: "Apache Iceberg C++" - homepage: https://iceberg.apache.org/ + homepage: https://cpp.iceberg.apache.org/ labels: - iceberg - apache + - cpp enabled_merge_buttons: merge: false squash: true @@ -47,6 +48,8 @@ github: - raulcd - wgtmac - zhjwpku + ghp_branch: gh-pages + ghp_path: / notifications: commits: commits@iceberg.apache.org diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..d1886276 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,61 @@ +name: "Release Docs" + +on: + workflow_dispatch: + pull_request: + branches: + - main + paths: + - 'mkdocs/**' + - 'src/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + docs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v6 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install mkdocs-material + sudo apt-get update + sudo apt-get install -y doxygen + + - name: Build API documentation with Doxygen + run: | + cd mkdocs + mkdir -p docs/api + doxygen Doxyfile + echo "Doxygen output created in docs/api/" + + - name: Build docs + run: | + cd mkdocs + mkdocs build --clean + echo "MkDocs site built in site/" + + - name: Copy + working-directory: ./mkdocs + run: | + echo "Copying site contents to /tmp/site" + mv ./site /tmp/site/ + + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v4.0.0 + if: github.event_name == 'pull_request' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./mkdocs/site + publish_branch: gh-pages diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 7635f505..00000000 --- a/docs/README.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# Documentation - -To build the documentation: - -1. Install [Doxygen](https://www.doxygen.nl/). -1. From this directory, run `doxygen`. - -The output will be in `./build/html`. diff --git a/mkdocs/CNAME b/mkdocs/CNAME new file mode 100644 index 00000000..3018be15 --- /dev/null +++ b/mkdocs/CNAME @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +cpp.iceberg.apache.org diff --git a/docs/Doxyfile b/mkdocs/Doxyfile similarity index 99% rename from docs/Doxyfile rename to mkdocs/Doxyfile index 75d69394..75e5ee23 100644 --- a/docs/Doxyfile +++ b/mkdocs/Doxyfile @@ -91,7 +91,7 @@ PROJECT_ICON = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = build +OUTPUT_DIRECTORY = docs/api # If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 # sub-directories (in 2 levels) under the output directory of each output format @@ -1315,7 +1315,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = html +HTML_OUTPUT = . # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/mkdocs/build-docs.sh b/mkdocs/build-docs.sh new file mode 100755 index 00000000..6917d339 --- /dev/null +++ b/mkdocs/build-docs.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +cd "$PROJECT_ROOT" + +echo "Building Iceberg C++ documentation..." +echo "Working directory: $(pwd)" + +if ! command -v mkdocs &> /dev/null; then + echo "Error: mkdocs is not installed" + exit 1 +fi + +echo "Installing dependencies..." +pip install mkdocs-material + +# Check if doxygen is available +if ! command -v doxygen &> /dev/null; then + echo "Warning: doxygen is not installed, skipping API documentation generation" +else + echo "Building API documentation with Doxygen..." + cd mkdocs + mkdir -p docs/api + doxygen Doxyfile + cd .. +fi + +echo "Building MkDocs documentation..." +cd mkdocs +mkdocs build --clean + +echo "Documentation build completed successfully!" +echo "MkDocs site: docs/site/" diff --git a/mkdocs/docs/assert/iceberg-logo-icon.png b/mkdocs/docs/assert/iceberg-logo-icon.png new file mode 100644 index 00000000..e4a99c39 Binary files /dev/null and b/mkdocs/docs/assert/iceberg-logo-icon.png differ diff --git a/mkdocs/docs/index.md b/mkdocs/docs/index.md new file mode 100644 index 00000000..2eb73c48 --- /dev/null +++ b/mkdocs/docs/index.md @@ -0,0 +1,199 @@ + + +# Contributing + +We welcome contributions to Apache Iceberg! To learn more about contributing to Apache Iceberg, please refer to the official Iceberg contribution guidelines. These guidelines are intended as helpful suggestions to make the contribution process as seamless as possible, and are not strict rules. + +If you would like to discuss your proposed change before contributing, we encourage you to visit our Community page. There, you will find various ways to connect with the community, including Slack and our mailing lists. Alternatively, you can open a new issue directly in the GitHub repository. + +For first-time contributors, feel free to check out our good first issues for an easy way to get started. + +## Contributing to Iceberg C++ + +The Iceberg C++ Project is hosted on GitHub at [https://github.com/apache/iceberg-cpp](https://github.com/apache/iceberg-cpp). + +### Development Setup + +#### Prerequisites + +- CMake 3.25 or higher +- C++23 compliant compiler (GCC 11+, Clang 14+, MSVC 2022+) +- Git + +#### Building from Source + +Clone the repository for local development: + +```bash +git clone https://github.com/apache/iceberg-cpp.git +cd iceberg-cpp +``` + +Build the core libraries: + +```bash +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_STATIC=ON -DICEBERG_BUILD_SHARED=ON +cmake --build build +ctest --test-dir build --output-on-failure +cmake --install build +``` + +Build with bundled dependencies: + +```bash +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON +cmake --build build +ctest --test-dir build --output-on-failure +cmake --install build +``` + +### Code Standards + +#### C++ Coding Standards + +We follow modern C++ best practices: + +- **C++23 Standard**: Use C++23 features where appropriate +- **Naming Conventions**: + - Classes: `PascalCase` (e.g., `TableScanBuilder`) + - Functions: `snake_case` (e.g., `find_field_by_name`) + - Variables: `snake_case` (e.g., `file_io`) + - Constants: `UPPER_SNAKE_CASE` (e.g., `MAX_RETRIES`) +- **Memory Management**: Prefer smart pointers (`std::unique_ptr`, `std::shared_ptr`) +- **Error Handling**: Use `Result` types for error propagation +- **Documentation**: Use Doxygen-style comments for public APIs + +#### API Compatibility + +It is important to keep the C++ public API compatible across versions. Public methods should have no leading underscores and should not be removed without deprecation notice. + +If you want to remove a method, please add a deprecation notice: + +```cpp +[[deprecated("This method will be removed in version 2.0.0. Use new_method() instead.")]] +void old_method(); +``` + +#### Code Formatting + +We use `clang-format` for code formatting. The configuration is defined in `.clang-format` file. + +Format your code before submitting: + +```bash +clang-format -i src/**/*.{h,cc} +``` + +### Testing + +#### Running Tests + +Run all tests: + +```bash +ctest --test-dir build --output-on-failure +``` + +Run specific test: + +```bash +ctest --test-dir build -R test_name +``` + +#### Test Coverage + +We aim for high test coverage. Run tests with coverage: + +```bash +cmake -S . -B build -DICEBERG_BUILD_COVERAGE=ON +cmake --build build +ctest --test-dir build +``` + +### Linting + +Install the python package `pre-commit` and run once `pre-commit install`: + +```bash +pip install pre-commit +pre-commit install +``` + +This will setup a git pre-commit-hook that is executed on each commit and will report the linting problems. To run all hooks on all files use `pre-commit run -a`. + +### Submitting Changes + +#### Git Workflow + +1. **Fork the repository** on GitHub +2. **Create a feature branch** from `main`: + ```bash + git checkout -b feature/your-feature-name + ``` +3. **Make your changes** following the coding standards +4. **Add tests** for your changes +5. **Run tests** to ensure everything passes +6. **Commit your changes** with a clear commit message +7. **Push to your fork** and create a Pull Request + +#### Commit Message Format + +Use clear, descriptive commit messages: + +``` +feat: add support for S3 file system +fix: resolve memory leak in table reader +docs: update API documentation +test: add unit tests for schema validation +``` + +#### Pull Request Process + +1. **Create a Pull Request** with a clear description +2. **Link related issues** if applicable +3. **Ensure CI passes** - all tests must pass +4. **Request review** from maintainers +5. **Address feedback** and update the PR as needed +6. **Squash commits** if requested by reviewers + +### Community + +The Apache Iceberg community is built on the principles described in the [Apache Way](https://www.apache.org/theapacheway/index.html) and all who engage with the community are expected to be respectful, open, come with the best interests of the community in mind, and abide by the Apache Foundation [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). + +#### Getting Help + +- **Submit Issues**: [GitHub Issues](https://github.com/apache/iceberg-cpp/issues/new) for bug reports or feature requests +- **Mailing List**: [dev@iceberg.apache.org](mailto:dev@iceberg.apache.org) for discussions + - [Subscribe](mailto:dev-subscribe@iceberg.apache.org?subject=(send%20this%20email%20to%20subscribe)) + - [Unsubscribe](mailto:dev-unsubscribe@iceberg.apache.org?subject=(send%20this%20email%20to%20unsubscribe)) + - [Archives](https://lists.apache.org/list.html?dev@iceberg.apache.org) +- **Slack**: [Apache Iceberg Slack #cpp channel](https://join.slack.com/t/apache-iceberg/shared_invite/zt-1zbov3k6e-KtJfoaxp97YfX6dPz1Bk7A) + +#### Good First Issues + +New to the project? Check out our [good first issues](https://github.com/apache/iceberg-cpp/labels/good%20first%20issue) for an easy way to get started. + +### Release Process + +Releases are managed by the Apache Iceberg project maintainers. For information about the release process, please refer to the main Iceberg project documentation. + +## License + +Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/mkdocs/docs/releases.md b/mkdocs/docs/releases.md new file mode 100644 index 00000000..a2e1b4d1 --- /dev/null +++ b/mkdocs/docs/releases.md @@ -0,0 +1,146 @@ + + +# Releases + +Apache Iceberg C++ releases are available for download from our GitHub releases page. + +## Latest Release + +### Apache Iceberg C++ 0.1.0 + +**Released:** September 15, 2024 + +**Download:** [v0.1.0](https://github.com/apache/iceberg-cpp/releases/tag/v0.1.0) + +#### What's New + +This is the first official release of Apache Iceberg C++. This release includes: + +- **Core Libraries**: Basic CMake support and iceberg library structure +- **Data Types**: Support for primitive types (int, long, string, boolean, etc.) +- **Schema Management**: Schema field definitions and schema conversion +- **Table Metadata**: Table metadata reading and writing capabilities +- **File I/O**: Local file system support using Arrow FileSystem +- **Avro Support**: Avro file reading and schema conversion +- **Arrow Integration**: Arrow C Data Interface and schema conversion +- **Partitioning**: Partition field and partition spec support +- **Sorting**: Sort order and sort field definitions +- **Expressions**: Basic expression support and literal types +- **Catalog**: In-memory catalog implementation +- **Table Scanning**: Basic table scan planning +- **Testing**: Comprehensive test suite with GoogleTest +- **Documentation**: API documentation generation with Doxygen + +#### Key Features + +- **C++23 Support**: Modern C++ features and standards +- **Cross-Platform**: Support for Linux, macOS, and Windows +- **Arrow Integration**: Seamless integration with Apache Arrow +- **Avro Compatibility**: Full Avro file format support +- **Memory Safety**: Smart pointer usage and RAII patterns +- **Error Handling**: Comprehensive error handling with Result types +- **Performance**: Optimized for high-performance data processing + +#### Installation + +Download the release from GitHub and follow the installation instructions in our [Contributing guide](index.md). + +#### Breaking Changes + +This is the first release, so there are no breaking changes from previous versions. + +## All Releases + +For a complete list of all releases, including release notes and download links, visit our [GitHub Releases page](https://github.com/apache/iceberg-cpp/releases). + +### Release History + +| Version | Release Date | Status | Download | +|---------|-------------|--------|----------| +| [v0.1.0](https://github.com/apache/iceberg-cpp/releases/tag/v0.1.0) | September 15, 2024 | Latest | [Download](https://github.com/apache/iceberg-cpp/releases/tag/v0.1.0) | + +## Release Process + +Apache Iceberg C++ follows the Apache Software Foundation release process: + +1. **Release Candidates**: Pre-release versions for testing +2. **Community Review**: Community feedback and testing period +3. **Vote**: Apache PMC vote on release approval +4. **Release**: Official release announcement and distribution + +## Download Options + +### Source Code + +Download the source code from our GitHub releases page: + +```bash +# Download latest release +wget https://github.com/apache/iceberg-cpp/archive/refs/tags/v0.1.0.tar.gz + +# Extract and build +tar -xzf v0.1.0.tar.gz +cd iceberg-cpp-0.1.0 +``` + +### Pre-built Binaries + +Pre-built binaries are available for select platforms. Check the [GitHub Releases page](https://github.com/apache/iceberg-cpp/releases) for available binary distributions. + +### Package Managers + +We are working on package manager support. Stay tuned for updates on: + +- Conan package manager +- vcpkg package manager +- Homebrew (macOS) +- APT/YUM (Linux distributions) + +## Verification + +All releases are cryptographically signed. Verify the integrity of downloads using the provided checksums and signatures. + +### Checksums + +Release checksums are available in the release assets on GitHub. + +### GPG Signatures + +Releases are signed with the Apache Iceberg project GPG key. Verify signatures using: + +```bash +# Import the Apache Iceberg GPG key +gpg --keyserver keyserver.ubuntu.com --recv-keys B5690EEEBB952194 + +# Verify the signature +gpg --verify iceberg-cpp-0.1.0.tar.gz.asc iceberg-cpp-0.1.0.tar.gz +``` + +## Support + +For questions about releases or to report issues: + +- **GitHub Issues**: [Report bugs or request features](https://github.com/apache/iceberg-cpp/issues) +- **Mailing List**: [dev@iceberg.apache.org](mailto:dev@iceberg.apache.org) +- **Slack**: [Apache Iceberg Slack #cpp channel](https://join.slack.com/t/apache-iceberg/shared_invite/zt-1zbov3k6e-KtJfoaxp97YfX6dPz1Bk7A) + +## License + +All releases are licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). diff --git a/mkdocs/mkdocs.yml b/mkdocs/mkdocs.yml new file mode 100644 index 00000000..f81ca17e --- /dev/null +++ b/mkdocs/mkdocs.yml @@ -0,0 +1,59 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +site_name: Iceberg C++ +site_url: https://cpp.iceberg.apache.org/ +repo_url: "https://github.com/apache/iceberg-cpp" +repo_name: "apache/iceberg-cpp" + +theme: + name: material + logo: assert/iceberg-logo-icon.png + favicon: assert/iceberg-logo-icon.png + features: + - navigation.expand + - navigation.tabs + - navigation.tabs.sticky + - content.code.copy + palette: + - scheme: default + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - scheme: slate + toggle: + icon: material/brightness-4 + name: Switch to light mode + +markdown_extensions: + - admonition + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.superfences + - toc: + permalink: true + +nav: + - Contributing: index.md + - Releases: releases.md + - API Documentation: api/index.html + +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/apache/iceberg-cpp + - icon: fontawesome/brands/slack + link: https://apache-iceberg.slack.com/