Skip to content

Commit 37e233a

Browse files
authored
Add link checking workflow and script (and fix some broken links) (#3438)
* Add link checking workflow and script - Introduced a GitHub Actions workflow (`check-links.yml`) to automate the checking of absolute and relative links in markdown files upon push and pull request events. - Added a new script (`check_relative_links.py`) to verify that relative links in markdown files point to existing files in the repository, enhancing documentation integrity. - The script scans markdown files, extracts relative links, and checks their validity without making HTTP requests, providing detailed output for any broken links found. This addition aims to improve the reliability of documentation links and streamline the review process for changes in markdown files. * Fixing static pro links * Fix more pro links * Update internal links in Kubernetes orchestrator documentation - Changed links for the remote artifact store and remote container registry sections to point to the correct README files, ensuring accurate navigation within the documentation. This update aims to enhance the clarity and usability of the Kubernetes orchestrator guide. * Update documentation for CloudpickleMaterializer warning - Clarified the warning regarding the use of the built-in CloudpickleMaterializer, emphasising the potential security risks associated with uploading arbitrary objects. - Improved the link to the custom Materializer documentation for better guidance on creating robust and efficient formats. This update aims to enhance user awareness of security implications and provide clearer instructions for safer practices in ZenML step output handling. * Update internal links in API documentation - Modified links in the OSS and Pro API sections to remove unnecessary README.md suffixes, ensuring cleaner and more direct navigation to the documentation. This update aims to enhance the clarity and usability of the API documentation. * ignore mailto links * Don't check local urls * Fix SDK docs links * Fix SDK docs links * Update CI checker script * Enhance GitHub Actions workflow for link checking - Updated the check-links.yml workflow to ignore changes in the 'src' and 'tests' directories, as well as Python files, during push and pull request events on the main branch. This aims to streamline the link checking process by focusing on relevant changes only. This update improves the efficiency of the CI workflow by reducing unnecessary checks. * Handle backslashes in docs better * Fix links broken in projects renaming * Fix broken links * Link checker in CI should actually fail now * Update documentation links for clarity and accuracy - Changed the reference from the "starter guide" to the "production guide" in the migration guide. - Updated the service connector link to point to the correct section on infrastructure deployment in the remote storage documentation. - Minor formatting adjustment in the workspaces documentation for consistency. These changes ensure that users have access to the most relevant and accurate resources. * Refine paths-ignore syntax in CI workflow - Updated the paths-ignore entries in the check-links.yml workflow to use double quotes for consistency. - Ensured that the Python version is specified with double quotes as well. These changes enhance the readability and maintainability of the workflow configuration.
1 parent 81d87db commit 37e233a

File tree

91 files changed

+638
-198
lines changed

Some content is hidden

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

91 files changed

+638
-198
lines changed

.github/workflows/check-links.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
name: Check Links
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
paths-ignore: [src/**, tests/**, "**.py"]
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
paths-ignore: [src/**, tests/**, "**.py"]
11+
concurrency:
12+
# New commit on branch cancels running workflows of the same branch
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
jobs:
16+
check-absolute-links:
17+
if: github.event.pull_request.draft == false
18+
runs-on: ubuntu-latest
19+
outputs:
20+
exit_code: ${{ steps.check-absolute.outputs.exit_code }}
21+
steps:
22+
- name: Checkout Repository
23+
uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.11"
28+
- name: Install dependencies
29+
run: pip install requests
30+
- name: Check Absolute Links
31+
id: check-absolute
32+
run: |
33+
# Only check absolute links (http/https), not relative links
34+
python docs/link_checker.py --dir docs/book --substring "http" --validate-links --timeout 15 --ci-mode
35+
echo "exit_code=$?" >> $GITHUB_OUTPUT
36+
# Continue on error so both checks can run to completion
37+
continue-on-error: true
38+
check-relative-links:
39+
if: github.event.pull_request.draft == false
40+
runs-on: ubuntu-latest
41+
outputs:
42+
exit_code: ${{ steps.check-relative.outputs.exit_code }}
43+
steps:
44+
- name: Checkout Repository
45+
uses: actions/checkout@v4
46+
- name: Set up Python
47+
uses: actions/setup-python@v4
48+
with:
49+
python-version: "3.11"
50+
- name: Check Relative Links
51+
id: check-relative
52+
run: |
53+
# Check if relative links resolve within the repository
54+
python scripts/check_relative_links.py --dir docs/book
55+
echo "exit_code=$?" >> $GITHUB_OUTPUT
56+
# Continue on error so both checks can run to completion
57+
continue-on-error: true
58+
summary:
59+
needs: [check-absolute-links, check-relative-links]
60+
if: always() && github.event.pull_request.draft == false
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Create Summary
64+
run: |-
65+
echo "# Documentation Link Check Results" >> $GITHUB_STEP_SUMMARY
66+
67+
# Check for failures in absolute links job
68+
if [[ "${{ needs.check-absolute-links.outputs.exit_code }}" != "0" ]]; then
69+
echo "❌ **Absolute links check failed**" >> $GITHUB_STEP_SUMMARY
70+
echo "There are broken absolute links in the documentation. Please check the job logs for details." >> $GITHUB_STEP_SUMMARY
71+
FAILED=true
72+
else
73+
echo "✅ **Absolute links check passed**" >> $GITHUB_STEP_SUMMARY
74+
fi
75+
76+
# Check for failures in relative links job
77+
if [[ "${{ needs.check-relative-links.outputs.exit_code }}" != "0" ]]; then
78+
echo "❌ **Relative links check failed**" >> $GITHUB_STEP_SUMMARY
79+
echo "There are broken relative links in the documentation. Please check the job logs for details." >> $GITHUB_STEP_SUMMARY
80+
FAILED=true
81+
else
82+
echo "✅ **Relative links check passed**" >> $GITHUB_STEP_SUMMARY
83+
fi
84+
85+
# Exit with failure if any checks failed
86+
if [[ "$FAILED" == "true" ]]; then
87+
echo "::error::One or more link checks failed. Please fix the broken links."
88+
exit 1
89+
fi

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ And finally, here are some other examples and use cases for inspiration:
266266

267267
1. [E2E Batch Inference](examples/e2e/): Feature engineering, training, and inference pipelines for tabular machine learning.
268268
2. [Basic NLP with BERT](examples/e2e_nlp/): Feature engineering, training, and inference focused on NLP.
269-
3. [LLM RAG Pipeline with Langchain and OpenAI](https://github.com/zenml-io/zenml-projects/tree/main/llm-agents): Using Langchain to create a simple RAG pipeline.
269+
3. [LLM RAG Pipeline with Langchain and OpenAI](https://github.com/zenml-io/zenml-projects/tree/main/zenml-support-agent): Using Langchain to create a simple RAG pipeline.
270270
4. [Huggingface Model to Sagemaker Endpoint](https://github.com/zenml-io/zenml-projects/tree/main/huggingface-sagemaker): Automated MLOps on Amazon Sagemaker and HuggingFace
271271
5. [LLMops](https://github.com/zenml-io/zenml-projects/tree/main/llm-complete-guide): Complete guide to do LLM with ZenML
272272

@@ -341,8 +341,8 @@ our GitHub repo.
341341
## 📚 LLM-focused Learning Resources
342342

343343
1. [LL Complete Guide - Full RAG Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/llm-complete-guide) - Document ingestion, embedding management, and query serving
344-
2. [LLM Fine-Tuning Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/llm-finetuning) - From data prep to deployed model
345-
3. [LLM Agents Example](https://github.com/zenml-io/zenml-projects/tree/main/llm-agents) - Track conversation quality and tool usage
344+
2. [LLM Fine-Tuning Pipeline](https://github.com/zenml-io/zenml-projects/tree/main/zencoder) - From data prep to deployed model
345+
3. [LLM Agents Example](https://github.com/zenml-io/zenml-projects/tree/main/zenml-support-agent) - Track conversation quality and tool usage
346346

347347
## 🤖 AI-Friendly Documentation with llms.txt
348348

docs/book/api-docs/toc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## OSS API
66

7-
* [OSS API](oss-api-docs/README.md)
7+
* [OSS API](oss-api-docs)
88
* [Artifacts](oss-api-docs/v1/artifacts.md)
99
* [Artifact versions](oss-api-docs/v1/artifact-versions/README.md)
1010
* [Batch](oss-api-docs/v1/artifact-versions/batch.md)
@@ -55,7 +55,7 @@
5555

5656
## Pro API
5757

58-
* [Pro API](pro-api-docs/README.md)
58+
* [Pro API](pro-api-docs)
5959
* [API reference](pro-api-docs/api-reference/README.md)
6060
* [Tenants](pro-api-docs/api-reference/tenants/README.md)
6161
* [Deploy](pro-api-docs/api-reference/tenants/deploy.md)
@@ -105,4 +105,4 @@
105105
* [Resource members](pro-api-docs/api-reference/rbac/resource-members.md)
106106
* [Server](pro-api-docs/api-reference/server/README.md)
107107
* [Info](pro-api-docs/api-reference/server/info.md)
108-
* [Pro API Specification](https://cloudapi.zenml.io/openapi.json)
108+
* [Pro API Specification](https://cloudapi.zenml.io/openapi.json)

docs/book/component-guide/alerters/discord.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ directly from within your ZenML pipelines.
99

1010
The `discord` integration contains the following two standard steps:
1111

12-
* [discord\_alerter\_post\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord/#zenml.integrations.discord.steps.discord_alerter_post_step.discord_alerter_post_step)\
12+
* [discord\_alerter\_post\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord.html#zenml.integrations.discord)\
1313
takes a string message, posts it to a Discord channel, and returns whether the\
1414
operation was successful.
15-
* [discord\_alerter\_ask\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord/#zenml.integrations.discord.steps.discord_alerter_ask_step.discord_alerter_ask_step)\
15+
* [discord\_alerter\_ask\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord.html#zenml.integrations.discord)\
1616
also posts a message to a Discord channel, but waits for user feedback, and\
1717
only returns `True` if a user explicitly approved the operation from within\
1818
Discord (e.g., by sending "approve" / "reject" to the bot in response).
@@ -98,8 +98,8 @@ permissions:
9898
### How to Use the Discord Alerter
9999

100100
After you have a `DiscordAlerter` configured in your stack, you can directly import\
101-
the [discord\_alerter\_post\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord/#zenml.integrations.discord.steps.discord_alerter_post_step.discord_alerter_post_step)\
102-
and [discord\_alerter\_ask\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord/#zenml.integrations.discord.steps.discord_alerter_ask_step.discord_alerter_ask_step)\
101+
the [discord\_alerter\_post\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord.html#zenml.integrations.discord)\
102+
and [discord\_alerter\_ask\_step](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord.html#zenml.integrations.discord)\
103103
steps and use them in your pipelines.
104104

105105
Since these steps expect a string message as input (which needs to be the output of another step), you typically also\
@@ -131,7 +131,7 @@ if __name__ == "__main__":
131131
```
132132

133133
For more information and a full list of configurable attributes of the Discord alerter, check out\
134-
the [SDK Docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord/#zenml.integrations.discord.alerters.discord_alerter.DiscordAlerter)\
134+
the [SDK Docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-discord.html#zenml.integrations.discord)\
135135
.
136136

137137
<figure><img src="https://static.scarf.sh/a.png?x-pxid=f0b4f458-0a54-4fcd-aa95-d5ee424815bc" alt="ZenML Scarf"><figcaption></figcaption></figure>

docs/book/component-guide/alerters/slack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,6 @@ if __name__ == "__main__":
231231
```
232232

233233
For more information and a full list of configurable attributes of the Slack
234-
alerter, check out the [SDK Docs](https://sdkdocs.zenml.io/latest/integration\_code\_docs/integrations-slack/#zenml.integrations.slack.alerters.slack\_alerter.SlackAlerter) .
234+
alerter, check out the [SDK Docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-slack.html#zenml.integrations.slack) .
235235

236236
<figure><img src="https://static.scarf.sh/a.png?x-pxid=f0b4f458-0a54-4fcd-aa95-d5ee424815bc" alt="ZenML Scarf"><figcaption></figcaption></figure>

docs/book/component-guide/artifact-stores/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ All ZenML Artifact Stores implement [the same IO API](custom.md) that resembles
7070

7171
Accessing the low-level Artifact Store API can be done through the following Python modules:
7272

73-
* `zenml.io.fileio` provides low-level utilities for manipulating Artifact Store objects (e.g. `open`, `copy`, `rename` , `remove`, `mkdir`). These functions work seamlessly across Artifact Stores types. They have the same signature as the [Artifact Store abstraction methods](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores/#zenml.artifact_stores.base_artifact_store.BaseArtifactStore) ( in fact, they are one and the same under the hood).
74-
* [zenml.utils.io\_utils](https://sdkdocs.zenml.io/latest/core_code_docs/core-utils/#zenml.utils.io_utils) includes some higher-level helper utilities that make it easier to find and transfer objects between the Artifact Store and the local filesystem or memory.
73+
* `zenml.io.fileio` provides low-level utilities for manipulating Artifact Store objects (e.g. `open`, `copy`, `rename` , `remove`, `mkdir`). These functions work seamlessly across Artifact Stores types. They have the same signature as the [Artifact Store abstraction methods](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores.html#zenml.artifact_stores.base_artifact_store) ( in fact, they are one and the same under the hood).
74+
* [zenml.utils.io\_utils](https://sdkdocs.zenml.io/latest/core_code_docs/core-utils.html#zenml.utils.io_utils) includes some higher-level helper utilities that make it easier to find and transfer objects between the Artifact Store and the local filesystem or memory.
7575

7676
{% hint style="info" %}
7777
When calling the Artifact Store API, you should always use URIs that are relative to the Artifact Store root path, otherwise, you risk using an unsupported protocol or storing objects outside the store. You can use the `Repository` singleton to retrieve the root path of the active Artifact Store and then use it as a base path for artifact URIs, e.g.:

docs/book/component-guide/artifact-stores/azure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ zenml stack register custom_stack -a az_store ... --set
218218
{% endtab %}
219219
{% endtabs %}
220220

221-
For more, up-to-date information on the Azure Artifact Store implementation and its configuration, you can have a look at [the SDK docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-azure/#zenml.integrations.azure.artifact_stores) .
221+
For more, up-to-date information on the Azure Artifact Store implementation and its configuration, you can have a look at [the SDK docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-azure.html#zenml.integrations.azure) .
222222

223223
### How do you use it?
224224

docs/book/component-guide/artifact-stores/custom.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ZenML comes equipped with [Artifact Store implementations](./#artifact-store-fla
1212

1313
### Base Abstraction
1414

15-
The Artifact Store establishes one of the main components in every ZenML stack. Now, let us take a deeper dive into the fundamentals behind its abstraction, namely [the `BaseArtifactStore` class](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores/#zenml.artifact_stores.base_artifact_store.BaseArtifactStore):
15+
The Artifact Store establishes one of the main components in every ZenML stack. Now, let us take a deeper dive into the fundamentals behind its abstraction, namely [the `BaseArtifactStore` class](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores.html#zenml.artifact_stores.base_artifact_store):
1616

1717
1. As ZenML only supports filesystem-based artifact stores, it features a configuration parameter called `path`, which will indicate the root path of the artifact store. When registering an artifact store, users will have to define this parameter.
1818
2. Moreover, there is another variable in the config class called `SUPPORTED_SCHEMES`. This is a class variable that needs to be defined in every subclass of the base artifact store configuration. It indicates the supported file path schemes for the corresponding implementation. For instance, for the Azure artifact store, this set will be defined as `{"abfs://", "az://"}`.
@@ -126,7 +126,7 @@ class BaseArtifactStoreFlavor(Flavor):
126126
```
127127

128128
{% hint style="info" %}
129-
This is a slimmed-down version of the base implementation which aims to highlight the abstraction layer. In order to see the full implementation and get the complete docstrings, please check the [SDK docs](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores/#zenml.artifact_stores.base_artifact_store.BaseArtifactStore) .
129+
This is a slimmed-down version of the base implementation which aims to highlight the abstraction layer. In order to see the full implementation and get the complete docstrings, please check the [SDK docs](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores.html#zenml.artifact_stores.base_artifact_store) .
130130
{% endhint %}
131131

132132
**The effect on the `zenml.io.fileio`**
@@ -139,7 +139,7 @@ This means that when you utilize a method such as `fileio.open(...)` with a file
139139

140140
If you want to implement your own custom Artifact Store, you can follow the following steps:
141141

142-
1. Create a class that inherits from [the `BaseArtifactStore` class](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores/#zenml.artifact_stores.base_artifact_store.BaseArtifactStore) and implements the abstract methods.
142+
1. Create a class that inherits from [the `BaseArtifactStore` class](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores.html#zenml.artifact_stores.base_artifact_store) and implements the abstract methods.
143143
2. Create a class that inherits from [the `BaseArtifactStoreConfig` class](custom.md) and fill in the `SUPPORTED_SCHEMES` based on your file system.
144144
3. Bring both of these classes together by inheriting from [the `BaseArtifactStoreFlavor` class](custom.md).
145145

docs/book/component-guide/artifact-stores/gcp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ zenml stack register custom_stack -a gs_store ... --set
190190
{% endtab %}
191191
{% endtabs %}
192192

193-
For more, up-to-date information on the GCS Artifact Store implementation and its configuration, you can have a look at [the SDK docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-gcp/#zenml.integrations.gcp.artifact_stores.gcp_artifact_store) .
193+
For more, up-to-date information on the GCS Artifact Store implementation and its configuration, you can have a look at [the SDK docs](https://sdkdocs.zenml.io/latest/integration_code_docs/integrations-gcp.html#zenml.integrations.gcp) .
194194

195195
### How do you use it?
196196

docs/book/component-guide/artifact-stores/local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ zenml stack register custom_stack -o default -a custom_local --set
7575
Same as all other Artifact Store flavors, the local Artifact Store does take in a `path` configuration parameter that can be set during registration to point to a custom path on your machine. However, it is highly recommended that you rely on the default `path` value, otherwise, it may lead to unexpected results. Other local stack components depend on the convention used for the default path to be able to access the local Artifact Store.
7676
{% endhint %}
7777

78-
For more, up-to-date information on the local Artifact Store implementation and its configuration, you can have a look at [the SDK docs](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores/#zenml.artifact_stores.local_artifact_store) .
78+
For more, up-to-date information on the local Artifact Store implementation and its configuration, you can have a look at [the SDK docs](https://sdkdocs.zenml.io/latest/core_code_docs/core-artifact_stores.html#zenml.artifact_stores.local_artifact_store) .
7979

8080
### How do you use it?
8181

0 commit comments

Comments
 (0)