Skip to content

Replaces most links and Hamilton references #1339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a bug report to help us improve Hamilton.
about: Create a bug report to help us improve Apache Hamilton.
title: Bug Report
labels: triage
assignees: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- PR TEMPLATE INSTRUCTIONS (1) ---

Looking to submit a Hamilton Dataflow to the sf-hamilton-contrib module? If so go the the `Preview` tab and select the appropriate sub-template:
Looking to submit a Apache Hamilton Dataflow to the sf-hamilton-contrib module? If so go the the `Preview` tab and select the appropriate sub-template:
* [sf-hamilton-contrib template](?expand=1&template=HAMILTON_CONTRIB_PR_TEMPLATE.md)

Else, if not, please remove this block of text.
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE/HAMILTON_CONTRIB_PR_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Do you have the following?
- [ ] Added an __init__.py file under my username directory.
- [ ] Added a new folder for my dataflow under my username directory.
- [ ] Added a README.md file under my dataflow directory that follows the standard headings and is filled out.
- [ ] Added a __init__.py file under my dataflow directory that contains the Hamilton code.
- [ ] Added a requirements.txt under my dataflow directory that contains the required packages outside of Hamilton.
- [ ] Added a __init__.py file under my dataflow directory that contains the Apache Hamilton code.
- [ ] Added a requirements.txt under my dataflow directory that contains the required packages outside of Apache Hamilton.
- [ ] Added tags.json under my dataflow directory to curate my dataflow.
- [ ] Added valid_configs.jsonl under my dataflow directory to specify the valid configurations.
- [ ] Added a dag.png that shows one possible configuration of my dataflow.
Expand Down
146 changes: 146 additions & 0 deletions .github/workflows/sphinx-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Build Sphinx Documentation

on:
push:
branches: [ "main", "update_references"]
paths:
- 'docs/**'
- '.github/workflows/sphinx-docs.yml'
pull_request:
branches: [ "main", "update_references" ]
paths:
- 'docs/**'
- '.github/workflows/sphinx-docs.yml'
workflow_dispatch:

concurrency:
group: "doc-pages"
cancel-in-progress: true

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz

- name: Upgrade pip and setuptools
run: |
python -m pip install --upgrade --no-cache-dir pip setuptools

- name: Install Sphinx and dependencies
run: |
python -m pip install --upgrade --no-cache-dir sphinx sphinx-rtd-theme sphinx-simplepdf
python -m pip install --upgrade --upgrade-strategy only-if-needed --no-cache-dir .[docs]

- name: Build Sphinx documentation
working-directory: ./docs
run: |
python -m sphinx -T -W --keep-going -b dirhtml -d _build/doctrees -D language=en . _build/html

- name: Build PDF documentation
working-directory: ./docs
run: |
# Build PDF using simplepdf
python -m sphinx -T -b simplepdf -d _build/doctrees -D language=en . _build/pdf

- name: Upload HTML artifact
uses: actions/upload-artifact@v4
with:
name: sphinx-docs-html
path: docs/_build/html/
retention-days: 5

- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: sphinx-docs-pdf
path: docs/_build/pdf/
retention-days: 5

- name: Deploy documentation
working-directory: ./docs
run: |
# Set target branch based on current branch
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
TARGET_BRANCH="asf-site"
echo "Deploying to production (asf-site) branch"
else
TARGET_BRANCH="asf-staging"
echo "Deploying to staging (asf-staging) branch"
fi

# Configure git
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"

# Create a temporary directory
mkdir -p /tmp/gh-pages

# Store current directory
CURRENT_DIR=$(pwd)
ls -lsa $CURRENT_DIR

# Try to clone the repository with the target branch
if ! git clone --branch $TARGET_BRANCH --single-branch \
https://github.com/${{ github.repository }}.git /tmp/gh-pages 2>/dev/null; then
# If branch doesn't exist, initialize a new repository and create the branch
echo "Branch $TARGET_BRANCH doesn't exist. Creating it..."
rm -rf /tmp/gh-pages
mkdir -p /tmp/gh-pages
cd /tmp/gh-pages
git init
git config --local init.defaultBranch $TARGET_BRANCH
git checkout -b $TARGET_BRANCH
git remote add origin https://github.com/${{ github.repository }}.git
cd "$CURRENT_DIR"
else
echo "CD'ing into $CURRENT_DIR"
cd "$CURRENT_DIR"
fi

# Remove existing content directory if it exists
rm -rf /tmp/gh-pages/content

# # Ensure build directories exist
# mkdir -p "$CURRENT_DIR/_build/html"
# mkdir -p "$CURRENT_DIR/_build/pdf"

# Copy the built HTML documentation to the content directory
mkdir -p /tmp/gh-pages/content
cp -r "$CURRENT_DIR/_build/html/"* /tmp/gh-pages/content/ 2>/dev/null || echo "No HTML files to copy"

# Copy the PDF documentation to the content/pdf directory
mkdir -p /tmp/gh-pages/content/pdf
cp -r "$CURRENT_DIR/_build/pdf/Hamilton.pdf" /tmp/gh-pages/content/_static/ 2>/dev/null || echo "No PDF file to copy"

# Add, commit and push the changes
cd /tmp/gh-pages
git status
ls -lhsa content
# Create a README if it doesn't exist
if [ ! -f README.md ]; then
echo "# Documentation for $TARGET_BRANCH" > README.md
echo "This branch contains the built documentation." >> README.md
fi
git add -A
git status
# Check if there are changes to commit (including untracked files)
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Deploy documentation from ${{ github.sha }}"
git push https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git $TARGET_BRANCH
echo "Changes pushed to $TARGET_BRANCH branch"
else
echo "No changes to deploy"
fi
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ own fork, and then submit a pull request. All new code should have associated
unit tests that validate implemented features and the presence or lack of defects.
Additionally, the code should follow any stylistic and architectural guidelines
prescribed by the project. For us here, this means you install a pre-commit hook and use
the given style files. Basically, you should mimic the styles and patterns in the Hamilton code-base.
the given style files. Basically, you should mimic the styles and patterns in the Apache Hamilton code-base.

In terms of getting setup to develop, we invite you to read our [developer setup guide](developer_setup.md).

Expand Down
Loading
Loading