From a59f5cf905f0347898b227a070e3dedb499f3fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Manchon?= Date: Thu, 28 May 2026 11:09:37 +0200 Subject: [PATCH 1/5] bump ruby --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index ef538c2..7636e75 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +4.0.5 From 73c9765f1dc94d551f5d9edf0ef725104c539265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Manchon?= Date: Thu, 28 May 2026 11:16:24 +0200 Subject: [PATCH 2/5] update build.rb from data-setup --- build.rb | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/build.rb b/build.rb index 23013e4..7d0298f 100755 --- a/build.rb +++ b/build.rb @@ -1,4 +1,7 @@ #!/usr/bin/env ruby -wU + +require 'open-uri' + CONSTANTS = { 'PYTHON_VERSION' => '3.8.12', # 'PYTHON_CHECKER_URL' => 'https://raw.githubusercontent.com/lewagon/data-setup/master/checks/python_checker.sh', @@ -115,6 +118,7 @@ ] LOCALES = [""] # english +ENGLISH_ONLY = %w[].freeze FILENAMES = { "WINDOWS" => ["WINDOWS", WINDOWS], @@ -132,14 +136,27 @@ } def load_partial(partial, locale) - match_data = partial.match(/setup\/(?[0-9a-z_]+)/) - partial = match_data[:partial] if match_data + match_setup = partial.match(/setup\/(?[0-9a-z_]+)/) + match_de_setup = partial.match(/de_setup\/(?[0-9a-z_]+)/) + if match_de_setup + partial = match_de_setup[:partial] + elsif match_setup + partial = match_setup[:partial] + end partial = File.join(locale, partial) unless locale.empty? file = File.join("_partials", "#{partial}.md") - if match_data - require 'open-uri' + if match_de_setup + content = URI.open(File.join("https://raw.githubusercontent.com/lewagon/data-engineering-setup/main", file)) + .read + # replace data-setup repo relative path by data-engineering-setup repo URL + image_paths = content.scan(/\!\[.*\]\((.*)\)/).flatten + image_paths.reject { |ip| ip.start_with?("http") }.each { |ip| content.gsub!(ip, "https://github.com/lewagon/data-engineering-setup/blob/main/#{ip}")} + # alternative image format + image_paths = content.scan(/src="(images\/.*)"/).flatten + image_paths.each { |ip| content.gsub!(ip, "https://github.com/lewagon/data-engineering-setup/blob/main/#{ip}")} + elsif match_setup content = URI.open(File.join("https://raw.githubusercontent.com/lewagon/setup/master", file)) - .string + .read # replace data-setup repo relative path by setup repo URL image_paths = content.scan(/\!\[.*\]\((.*)\)/).flatten image_paths.each { |ip| content.gsub!(ip, "https://github.com/lewagon/setup/blob/master/#{ip}")} @@ -149,18 +166,23 @@ def load_partial(partial, locale) return content end -# load partials -loaded = FILENAMES.map { |filename, (os_name, partials)| partials }.flatten.uniq -loaded = loaded.map { |partial| LOCALES.map { |locale| [partial, locale]} }.flatten(1) -loaded = loaded.map { |partial, locale| ["#{partial}.#{locale}", load_partial(partial, locale)] }.to_h +# load partials (skip non-English locales for ENGLISH_ONLY configurations) +pairs = FILENAMES.flat_map { |filename, (os_name, partials)| + LOCALES.flat_map { |locale| + next [] if !locale.empty? && ENGLISH_ONLY.include?(filename) + partials.reject { |s| s.start_with?("#") }.map { |partial| [partial, locale] } + } +}.uniq +loaded = pairs.map { |partial, locale| ["#{partial}.#{locale}", load_partial(partial, locale)] }.to_h # write files LOCALES.each do |locale| FILENAMES.each do |filename, (os_name, partials)| + next if !locale.empty? && ENGLISH_ONLY.include?(filename) filename += ".#{locale}" unless locale.empty? filename += ".md" File.open(filename, "w:utf-8") do |f| - partials.each do |partial| + partials.reject { |s| s.start_with?("#") }.each do |partial| content = loaded["#{partial}.#{locale}"].clone # remove the OS dependant blocks removed_blocks = DELIMITERS.keys - [os_name] From fbf226844186d0749c1b2f40b841a4c8a29183ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Manchon?= Date: Thu, 28 May 2026 11:16:33 +0200 Subject: [PATCH 3/5] missing legacy updates --- LINUX.md | 6 ++++-- WINDOWS.md | 6 ++++-- macOS.md | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/LINUX.md b/LINUX.md index 9132fef..d78efd1 100644 --- a/LINUX.md +++ b/LINUX.md @@ -513,7 +513,7 @@ We will use the GitHub CLI (`gh`) to connect to GitHub using *SSH*, a protocol t First in order to **login**, copy-paste the following command in your terminal: -:warning: **DO NOT edit the `email`** +:warning: **DO NOT edit the `email`** — Even though `user:email` looks like a placeholder for your actual email address, it isn't — do not replace it. ```bash gh auth login -s 'user:email' -w --git-protocol ssh @@ -525,7 +525,9 @@ gh auth login -s 'user:email' -w --git-protocol ssh If you already have SSH keys, you will see instead `Upload your SSH public key to your GitHub account?` With the arrows, select your public key file path and press `Enter`. -- `Enter a passphrase for your new SSH key (Optional)`. Type something you want and that you'll remember. It's a password to protect your private key stored on your hard drive. Then press `Enter`. +- `Enter a passphrase for your new SSH key (Optional)`: + - **FOR MOST PEOPLE:** Just press `Enter` to skip. You don't need a passphrase for the bootcamp and it would prompt you every time you use the key. There is a risk, however, that if someone steals your laptop, they could then push to GitHub. + - **IF SECURITY IS REALLY IMPORTANT TO YOU:** Enter a passphrase of your choice and press `Enter`. It's _really_ important that if you enter a passphrase, you write it down somewhere immediately and do not lose/forget it. You will need to enter this frequently. - `Title for your SSH key`. You can leave it at the proposed "GitHub CLI", press `Enter`. diff --git a/WINDOWS.md b/WINDOWS.md index cc6480a..b4b02e4 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -480,7 +480,7 @@ We will use the GitHub CLI (`gh`) to connect to GitHub using *SSH*, a protocol t First in order to **login**, copy-paste the following command in your terminal: -:warning: **DO NOT edit the `email`** +:warning: **DO NOT edit the `email`** — Even though `user:email` looks like a placeholder for your actual email address, it isn't — do not replace it. ```bash gh auth login -s 'user:email' -w --git-protocol ssh @@ -492,7 +492,9 @@ gh auth login -s 'user:email' -w --git-protocol ssh If you already have SSH keys, you will see instead `Upload your SSH public key to your GitHub account?` With the arrows, select your public key file path and press `Enter`. -- `Enter a passphrase for your new SSH key (Optional)`. Type something you want and that you'll remember. It's a password to protect your private key stored on your hard drive. Then press `Enter`. +- `Enter a passphrase for your new SSH key (Optional)`: + - **FOR MOST PEOPLE:** Just press `Enter` to skip. You don't need a passphrase for the bootcamp and it would prompt you every time you use the key. There is a risk, however, that if someone steals your laptop, they could then push to GitHub. + - **IF SECURITY IS REALLY IMPORTANT TO YOU:** Enter a passphrase of your choice and press `Enter`. It's _really_ important that if you enter a passphrase, you write it down somewhere immediately and do not lose/forget it. You will need to enter this frequently. - `Title for your SSH key`. You can leave it at the proposed "GitHub CLI", press `Enter`. diff --git a/macOS.md b/macOS.md index 0cf5e50..d549a47 100644 --- a/macOS.md +++ b/macOS.md @@ -478,7 +478,7 @@ We will use the GitHub CLI (`gh`) to connect to GitHub using *SSH*, a protocol t First in order to **login**, copy-paste the following command in your terminal: -:warning: **DO NOT edit the `email`** +:warning: **DO NOT edit the `email`** — Even though `user:email` looks like a placeholder for your actual email address, it isn't — do not replace it. ```bash gh auth login -s 'user:email' -w --git-protocol ssh @@ -490,7 +490,9 @@ gh auth login -s 'user:email' -w --git-protocol ssh If you already have SSH keys, you will see instead `Upload your SSH public key to your GitHub account?` With the arrows, select your public key file path and press `Enter`. -- `Enter a passphrase for your new SSH key (Optional)`. Type something you want and that you'll remember. It's a password to protect your private key stored on your hard drive. Then press `Enter`. +- `Enter a passphrase for your new SSH key (Optional)`: + - **FOR MOST PEOPLE:** Just press `Enter` to skip. You don't need a passphrase for the bootcamp and it would prompt you every time you use the key. There is a risk, however, that if someone steals your laptop, they could then push to GitHub. + - **IF SECURITY IS REALLY IMPORTANT TO YOU:** Enter a passphrase of your choice and press `Enter`. It's _really_ important that if you enter a passphrase, you write it down somewhere immediately and do not lose/forget it. You will need to enter this frequently. - `Title for your SSH key`. You can leave it at the proposed "GitHub CLI", press `Enter`. From 5b2ab9fa69a92c9863c5dbaf93464681ff2c7864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Manchon?= Date: Thu, 28 May 2026 11:17:09 +0200 Subject: [PATCH 4/5] comment --- LINUX.md | 12 ++++++------ WINDOWS.md | 12 ++++++------ _partials/ssh_key.md | 12 ++++++------ macOS.md | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/LINUX.md b/LINUX.md index d78efd1..cb5d1cc 100644 --- a/LINUX.md +++ b/LINUX.md @@ -76,8 +76,8 @@ We highly recommend installing [Windows Terminal](https://apps.microsoft.com/sto Windows ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen.exe -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen.exe -t ed25519 -C your_email@example.com ``` @@ -85,8 +85,8 @@ ssh-keygen.exe -t ed25519 -C "your_email@example.com" MacOS & Linux ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -C your_email@example.com ``` @@ -108,8 +108,8 @@ If you receive this message, you may already have an SSH Key with the same name To create a separate SSH key to exclusively use for this bootcamp use the following: ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C your_email@example.com ``` Your new SSH Key will be named `de-bootcamp`. Make sure to remember it for later! diff --git a/WINDOWS.md b/WINDOWS.md index b4b02e4..901136b 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -76,8 +76,8 @@ We highly recommend installing [Windows Terminal](https://apps.microsoft.com/sto Windows ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen.exe -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen.exe -t ed25519 -C your_email@example.com ``` @@ -85,8 +85,8 @@ ssh-keygen.exe -t ed25519 -C "your_email@example.com" MacOS & Linux ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -C your_email@example.com ``` @@ -108,8 +108,8 @@ If you receive this message, you may already have an SSH Key with the same name To create a separate SSH key to exclusively use for this bootcamp use the following: ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C your_email@example.com ``` Your new SSH Key will be named `de-bootcamp`. Make sure to remember it for later! diff --git a/_partials/ssh_key.md b/_partials/ssh_key.md index fada4ee..91bfad9 100644 --- a/_partials/ssh_key.md +++ b/_partials/ssh_key.md @@ -16,8 +16,8 @@ We highly recommend installing [Windows Terminal](https://apps.microsoft.com/sto Windows ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen.exe -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen.exe -t ed25519 -C your_email@example.com ``` @@ -25,8 +25,8 @@ ssh-keygen.exe -t ed25519 -C "your_email@example.com" MacOS & Linux ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -C your_email@example.com ``` @@ -48,8 +48,8 @@ If you receive this message, you may already have an SSH Key with the same name To create a separate SSH key to exclusively use for this bootcamp use the following: ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C your_email@example.com ``` Your new SSH Key will be named `de-bootcamp`. Make sure to remember it for later! diff --git a/macOS.md b/macOS.md index d549a47..fad105a 100644 --- a/macOS.md +++ b/macOS.md @@ -76,8 +76,8 @@ We highly recommend installing [Windows Terminal](https://apps.microsoft.com/sto Windows ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen.exe -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen.exe -t ed25519 -C your_email@example.com ``` @@ -85,8 +85,8 @@ ssh-keygen.exe -t ed25519 -C "your_email@example.com" MacOS & Linux ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -C your_email@example.com ``` @@ -108,8 +108,8 @@ If you receive this message, you may already have an SSH Key with the same name To create a separate SSH key to exclusively use for this bootcamp use the following: ```bash -# replace "your_email@example.com" with your GCP account email -ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C "your_email@example.com" +# replace your_email@example.com, this is purely informative and allows you to remember the use of this key +ssh-keygen -t ed25519 -f ~/.ssh/de-bootcamp -C your_email@example.com ``` Your new SSH Key will be named `de-bootcamp`. Make sure to remember it for later! From 21225cd5e7509c031fafd7f07c2736ed0ccd4d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Manchon?= Date: Thu, 28 May 2026 11:20:36 +0200 Subject: [PATCH 5/5] revert --- build.rb | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/build.rb b/build.rb index 7d0298f..23013e4 100755 --- a/build.rb +++ b/build.rb @@ -1,7 +1,4 @@ #!/usr/bin/env ruby -wU - -require 'open-uri' - CONSTANTS = { 'PYTHON_VERSION' => '3.8.12', # 'PYTHON_CHECKER_URL' => 'https://raw.githubusercontent.com/lewagon/data-setup/master/checks/python_checker.sh', @@ -118,7 +115,6 @@ ] LOCALES = [""] # english -ENGLISH_ONLY = %w[].freeze FILENAMES = { "WINDOWS" => ["WINDOWS", WINDOWS], @@ -136,27 +132,14 @@ } def load_partial(partial, locale) - match_setup = partial.match(/setup\/(?[0-9a-z_]+)/) - match_de_setup = partial.match(/de_setup\/(?[0-9a-z_]+)/) - if match_de_setup - partial = match_de_setup[:partial] - elsif match_setup - partial = match_setup[:partial] - end + match_data = partial.match(/setup\/(?[0-9a-z_]+)/) + partial = match_data[:partial] if match_data partial = File.join(locale, partial) unless locale.empty? file = File.join("_partials", "#{partial}.md") - if match_de_setup - content = URI.open(File.join("https://raw.githubusercontent.com/lewagon/data-engineering-setup/main", file)) - .read - # replace data-setup repo relative path by data-engineering-setup repo URL - image_paths = content.scan(/\!\[.*\]\((.*)\)/).flatten - image_paths.reject { |ip| ip.start_with?("http") }.each { |ip| content.gsub!(ip, "https://github.com/lewagon/data-engineering-setup/blob/main/#{ip}")} - # alternative image format - image_paths = content.scan(/src="(images\/.*)"/).flatten - image_paths.each { |ip| content.gsub!(ip, "https://github.com/lewagon/data-engineering-setup/blob/main/#{ip}")} - elsif match_setup + if match_data + require 'open-uri' content = URI.open(File.join("https://raw.githubusercontent.com/lewagon/setup/master", file)) - .read + .string # replace data-setup repo relative path by setup repo URL image_paths = content.scan(/\!\[.*\]\((.*)\)/).flatten image_paths.each { |ip| content.gsub!(ip, "https://github.com/lewagon/setup/blob/master/#{ip}")} @@ -166,23 +149,18 @@ def load_partial(partial, locale) return content end -# load partials (skip non-English locales for ENGLISH_ONLY configurations) -pairs = FILENAMES.flat_map { |filename, (os_name, partials)| - LOCALES.flat_map { |locale| - next [] if !locale.empty? && ENGLISH_ONLY.include?(filename) - partials.reject { |s| s.start_with?("#") }.map { |partial| [partial, locale] } - } -}.uniq -loaded = pairs.map { |partial, locale| ["#{partial}.#{locale}", load_partial(partial, locale)] }.to_h +# load partials +loaded = FILENAMES.map { |filename, (os_name, partials)| partials }.flatten.uniq +loaded = loaded.map { |partial| LOCALES.map { |locale| [partial, locale]} }.flatten(1) +loaded = loaded.map { |partial, locale| ["#{partial}.#{locale}", load_partial(partial, locale)] }.to_h # write files LOCALES.each do |locale| FILENAMES.each do |filename, (os_name, partials)| - next if !locale.empty? && ENGLISH_ONLY.include?(filename) filename += ".#{locale}" unless locale.empty? filename += ".md" File.open(filename, "w:utf-8") do |f| - partials.reject { |s| s.start_with?("#") }.each do |partial| + partials.each do |partial| content = loaded["#{partial}.#{locale}"].clone # remove the OS dependant blocks removed_blocks = DELIMITERS.keys - [os_name]