Skip to content

Commit f8ab981

Browse files
committed
Update ZenML tutorial extension to version 0.1.3, including changes to package files, Dockerfile, and README for improved user guidance and consistent versioning across components.
1 parent c0a16dd commit f8ab981

File tree

11 files changed

+66
-17
lines changed

11 files changed

+66
-17
lines changed

.github/workflows/build-extensions.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Build theme extension
4242
run: |
4343
echo "Building theme extension..."
44-
cd themes && npx @vscode/vsce package --out ./zenml-color-theme-0.1.1.vsix
44+
cd themes && npx @vscode/vsce package --out ./zenml-color-theme-0.1.3.vsix
4545
4646
- name: Verify extensions were builts
4747
run: |
@@ -54,11 +54,11 @@ jobs:
5454
exit 1
5555
fi
5656
57-
if [ -f "themes/zenml-color-theme-0.1.1.vsix" ]; then
57+
if [ -f "themes/zenml-color-theme-0.1.3.vsix" ]; then
5858
echo "Theme extension built successfully:"
59-
ls -la themes/zenml-color-theme-0.1.1.vsix
59+
ls -la themes/zenml-color-theme-0.1.3.vsix
6060
else
61-
echo "ERROR: zenml-color-theme-0.1.1.vsix not found"
61+
echo "ERROR: zenml-color-theme-0.1.3.vsix not found"
6262
exit 1
6363
fi
6464
@@ -72,7 +72,7 @@ jobs:
7272
uses: actions/upload-artifact@v4
7373
with:
7474
name: theme-extension
75-
path: themes/zenml-color-theme-0.1.1.vsix
75+
path: themes/zenml-color-theme-0.1.3.vsix
7676

7777
- name: Commit and push built extensions
7878
# Only commit on push to main/develop branches, not on PRs
@@ -83,7 +83,7 @@ jobs:
8383
8484
# Add the built extensions to git
8585
git add .devcontainer/extensions/zenml-tutorial-*.vsix
86-
git add themes/zenml-color-theme-0.1.1.vsix
86+
git add themes/zenml-color-theme-0.1.3.vsix
8787
8888
# Check if there are any changes to commit
8989
if git diff --staged --quiet; then

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@ The fastest way to get started - no local setup required.
110110

111111
### Auto-Open Tutorial
112112

113-
By default, the tutorial homepage opens automatically when you start VS Code. You can control this behavior:
113+
The tutorial homepage opens automatically when you start VS Code in the following scenarios:
114+
- **On first install** (always opens the first time you install the extension)
115+
- **In GitHub Codespaces** (when `CODESPACES=true`)
116+
- **When tutorial is enabled** (when `ZENML_ENABLE_TUTORIAL=true`)
117+
- **When user setting is enabled** (see configuration options below)
118+
119+
You can control the user preference behavior:
114120

115121
#### 🔧 Quick Disable
116122
When the welcome message appears, click **"Don't Show Again"** to disable auto-opening.
@@ -121,15 +127,42 @@ When the welcome message appears, click **"Don't Show Again"** to disable auto-o
121127
3. Toggle **"Auto Open Tutorial"** on/off
122128

123129
#### 🔧 Settings JSON
124-
Add to your VS Code settings:
130+
Add to your VS Code settings to enable auto-open (disabled by default):
125131
```json
126132
{
127-
"zenml.autoOpenTutorial": false
133+
"zenml.autoOpenTutorial": true
128134
}
129135
```
130136

131137
**Note**: You can always access the tutorial manually via the ZenML sidebar (book icon) or Command Palette (`Ctrl+Shift+P` → "ZenML: Open ZenML Tutorial Homepage").
132138

139+
#### 📖 Manual Tutorial Access
140+
141+
If the tutorial doesn't open automatically, you can easily access it manually:
142+
143+
**Method 1: Using the ZenML Tutorial Sidebar**
144+
1. Look for the ZenML Tutorial icon (📖) in the Activity Bar (left side of VS Code)
145+
2. Click on it to open the tutorial panel
146+
3. Click "Open Homepage" to start the tutorial
147+
148+
![Tutorial Sidebar](assets/tutorial-sidebar.png)
149+
150+
**Method 2: Using the Main Sidebar**
151+
1. Open the main VS Code sidebar (Explorer view)
152+
2. Scroll down to find "ZenML Tutorial" in the extensions list
153+
3. Click on it to access the tutorial
154+
155+
![Main Sidebar](assets/main-sidebar.png)
156+
157+
**Method 3: Using Command Palette**
158+
1. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac)
159+
2. Type "ZenML: Open ZenML Tutorial Homepage"
160+
3. Press Enter
161+
162+
Once opened, you'll see the welcome screen:
163+
164+
![Tutorial Welcome Screen](assets/tutorial-welcome.png)
165+
133166
### Dashboard URL
134167

135168
Configure the ZenML dashboard URL for pipeline run links:

assets/main-sidebar.png

37.3 KB
Loading

assets/tutorial-sidebar.png

12.3 KB
Loading

assets/tutorial-welcome.png

548 KB
Loading

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"url": "https://github.com/zenml-io/vscode-tutorial-extension"
77
},
88
"description": "Interactive ZenML pipeline tutorials with step-by-step guidance and one-click execution",
9-
"version": "0.1.1",
9+
"version": "0.1.3",
1010
"publisher": "zenml-io",
1111
"engines": {
1212
"vscode": "^1.90.0"

project.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
ARG ZENML_VERSION=latest
22
ARG PROJECT_DIR_NAME
3+
ARG EXTENSION_VERSION=0.1.4
34

45
FROM zenmldocker/zenml-codespace:${ZENML_VERSION}
56

67
# Set build arguments again for use in subsequent commands
78
ARG PROJECT_DIR_NAME
9+
ARG EXTENSION_VERSION
810

911
# Set the working directory for the project
10-
WORKDIR /home/coder/extensions/zenml-io.zenml-tutorial-0.1.1/pipelines
12+
WORKDIR /home/coder/extensions/zenml-io.zenml-tutorial-${EXTENSION_VERSION}-universal/pipelines
1113

1214
# Copy the specific project's requirements file
1315
COPY ./${PROJECT_DIR_NAME}/requirements.txt /tmp/requirements.txt

src/utils/getExtensionUri.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
11
import * as vscode from "vscode";
2+
import * as fs from "fs";
3+
import * as path from "path";
4+
5+
function getExtensionVersion(): string {
6+
try {
7+
const packageJsonPath = path.join(__dirname, "..", "..", "package.json");
8+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
9+
return packageJson.version;
10+
} catch (error) {
11+
console.warn("Could not read package.json version, using fallback", error);
12+
return "0.1.4"; // Fallback version
13+
}
14+
}
215

316
export default function getExtensionUri(context: vscode.ExtensionContext) {
417
if (context.extensionMode === vscode.ExtensionMode.Production) {
518
// Check if ZENML_ENABLE_TUTORIAL is set to true (for codespace containers)
619
const isTutorialEnabled = process.env.ZENML_ENABLE_TUTORIAL === "true";
720
const isCodespace = process.env.CODESPACES === "true";
21+
const version = getExtensionVersion();
822

923
if (isTutorialEnabled) {
1024
// Use the codespace container extension path when tutorial is enabled
1125
return vscode.Uri.file(
12-
"/home/coder/extensions/zenml-io.zenml-tutorial-0.1.1"
26+
`/home/coder/extensions/zenml-io.zenml-tutorial-${version}-universal`
1327
);
1428
} else {
1529
// Use the original logic for other environments
1630
return vscode.Uri.file(
1731
`/root/${
1832
isCodespace ? ".vscode-remote" : ".vscode-server"
19-
}/extensions/zenml-io.zenml-tutorial-0.1.1`
33+
}/extensions/zenml-io.zenml-tutorial-${version}`
2034
);
2135
}
2236
} else {

0 commit comments

Comments
 (0)