Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,40 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml

Deploy-Pages:
permissions:
contents: write
runs-on: ubuntu-latest
needs:
- Static-Check
- Run-Unit-Tests
- Run-Integration-Tests
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- uses: actions/setup-python@v5
with:
python-version: "3.12"
architecture: "x64"

- name: Install packages and dependencies
run: pip install hatch

- name: Deploy Docs
run: |
git config user.name "oss-integrations-bot"
git config user.email "oss-integrations-bot@astronomer.io"

git fetch origin gh-pages --depth=1

if [[ $GITHUB_EVENT_NAME == "release" && $GITHUB_EVENT_ACTION == "published" ]]; then
hatch run docs:gh-release
else
hatch run docs:gh-deploy
fi

Publish-Package:
if: github.event_name == 'release'
name: Build and publish Python 🐍 distributions 📦 to PyPI
Expand Down
36 changes: 15 additions & 21 deletions docs/contributing/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This document describes how to contribute to DAG Factory, covering:

To contribute to the DAG Factory project:

1. Please create a [GitHub Issue](https://github.com/astronomer/dag-factory/issues) describing a bug, enhancement, or feature request.
1. Please create a [GitHub Issue](https://github.com/astronomer/dag-factory/issues) describing a bug, enhancement, or feature request.
2. Open a branch off of the `main` branch and create a Pull Request into the `main` branch from your feature branch.
3. Link your issue to the pull request.
4. After you complete development on your feature branch, request a review. A maintainer will merge your PR after all reviewers approve it.
Expand All @@ -28,9 +28,9 @@ To contribute to the DAG Factory project:

### Requirements

* [Git](https://git-scm.com/)
* [Python](https://www.python.org/) <= 3.12 (due to dependencies, such as ``google-re2`` not supporting Python 3.13 yet)
* [Hatch](https://hatch.pypa.io/latest/)
- [Git](https://git-scm.com/)
- [Python](https://www.python.org/) <= 3.12 (due to dependencies, such as ``google-re2`` not supporting Python 3.13 yet)
- [Hatch](https://hatch.pypa.io/latest/)

Clone the **DAG Factory** repository and change the current working directory to the repo's root directory:

Expand All @@ -41,22 +41,22 @@ cd dag-factory/

After cloning the project, there are two options for setting up the local development environment:

* Use a Python virtual environment, or
* Use Docker
- Use a Python virtual environment, or
- Use Docker

### Using a Python virtual environment for local development

1. Install the project dependencies:

```bash
make setup
```
```bash
make setup
```

2. Activate the local python environment:

```bash
source venv/bin/activate
```
```bash
source venv/bin/activate
```

3. Set [Apache Airflow®](https://airflow.apache.org/) home to the ``dev/``, so you can see DAG Factory example DAGs.
Disable loading Airflow standard example DAGs:
Expand Down Expand Up @@ -160,22 +160,16 @@ We use Markdown to author DAG Factory documentation.

Similar to running tests, we also use hatch to manage the documentation.

To build the documentation locally:

```bash
hatch run docs:build
```

To serve the documentation locally in `localhost:8080`:
To build and serve the documentation locally:

```bash
hatch run docs:serve
hatch run docs:dev
```

To release the documentation with the current project version and set it to the latest:

```bash
hatch run docs:release
hatch run docs:gh-release
```

## Releasing
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ dependencies = [
]

[tool.hatch.envs.docs.scripts]
build = "mike deploy --push dev"
serve = "mike serve"
release = "version=$(python -W ignore -c 'import dagfactory; print(dagfactory.__version__)') && mike deploy --push --update-aliases $version latest"
dev = "mkdocs build && mkdocs serve" # For local development and preventing publishing
Comment thread
pankajastro marked this conversation as resolved.
gh-deploy = "mike deploy --push dev"
gh-release = "version=$(python -W ignore -c 'import dagfactory; print(dagfactory.__version__)') && mike deploy --push --update-aliases $version latest"

######################################
# THIRD PARTY TOOLS
Expand Down