From a33db0601b9c3510dc267890b89d0028a19cee26 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 8 Mar 2026 21:05:03 -0400 Subject: [PATCH 1/3] update doc tooling to Zensical --- .github/workflows/deploy.docs.yml | 30 +- .github/workflows/tests.yml | 8 +- .gitignore | 3 +- CONTRIBUTING.md | 2 +- README.md | 14 +- .../content/docs/assets/javascripts/custom.js | 105 ------- .../docs/assets/javascripts/termynal.js | 264 ------------------ .../docs/assets/stylesheets/custom.css | 23 -- .../docs/assets/stylesheets/pygeoapi.css | 5 +- .../docs/assets/stylesheets/termynal.css | 108 ------- workshop/content/docs/index.md | 4 - workshop/content/docs/index.pt.md | 6 +- workshop/content/mkdocs.yml | 112 -------- workshop/content/requirements.txt | 5 +- workshop/content/zensical.toml | 115 ++++++++ 15 files changed, 153 insertions(+), 651 deletions(-) delete mode 100644 workshop/content/docs/assets/javascripts/custom.js delete mode 100644 workshop/content/docs/assets/javascripts/termynal.js delete mode 100644 workshop/content/docs/assets/stylesheets/custom.css delete mode 100644 workshop/content/docs/assets/stylesheets/termynal.css delete mode 100644 workshop/content/mkdocs.yml create mode 100644 workshop/content/zensical.toml diff --git a/.github/workflows/deploy.docs.yml b/.github/workflows/deploy.docs.yml index b4258648..5b8465ad 100644 --- a/.github/workflows/deploy.docs.yml +++ b/.github/workflows/deploy.docs.yml @@ -7,22 +7,34 @@ on: paths: - 'workshop/content/**' -defaults: - run: - working-directory: workshop/content - jobs: build: name: Build and Deploy Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@master + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install requirements 📦 run: | python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Deploy 📦 - run: mkdocs gh-deploy --config-file mkdocs.yml --strict --force --clean --message 'update website via GitHub Actions' + pip install -r workshop/content/requirements.txt + - name: Build site 📦 + run: | + zensical build --clean --strict + mv site /tmp/ + - name: checkout gh-pages branch + uses: actions/checkout@master + with: + ref: gh-pages + - name: Deploy to GitHub Pages 📦 + run: | + git checkout gh-pages + git config --global user.email "tomkralidis@gmail.com" + git config --global user.name "Tom Kralidis" + ls | grep -v ".nojekyll"| xargs rm -fr + mv -f /tmp/site/* . + git add . + git commit -am "update website via GitHub Actions" + git push diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c274bcf..f79d5a45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,13 +14,13 @@ jobs: name: Test documentation build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@master + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install requirements 📦 run: | python -m pip install --upgrade pip pip install -r requirements.txt - - name: Deploy 📦 - run: mkdocs build --strict + - name: Build 📦 + run: zensical build --clean --strict diff --git a/.gitignore b/.gitignore index 7bcbfc60..ff316abb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store workshop/exercises/data/tiles +workshop/content/.cache workshop/content/site .idea -.venv \ No newline at end of file +.venv diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9826a463..8652b3f2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,7 +92,7 @@ Your contribution will be under our [license](https://github.com/geopython/divin ### Documentation * documentation is managed in `workshop/content/docs/` using , in Markdown format -* [MkDocs](https://www.mkdocs.org) is used to generate the documentation +* [Zensical](https://zensical.org) is used to generate the documentation ## Suggesting Enhancements diff --git a/README.md b/README.md index fabd182c..443a4ebc 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ the [Workshop environment setup](https://dive.pygeoapi.io/setup). ### Building the workshop content locally -The workshop manual is powered by [MkDocs](https://www.mkdocs.org) which facilitates easy management +The workshop manual is powered by [Zensical](https://zensical.org) which facilitates easy management of content and publishing. Workshop content is written in Markdown. @@ -38,9 +38,9 @@ cd diving-into-pygeoapi/workshop/content # install required dependencies pip install -r requirements.txt # build the website -mkdocs build +zensical build # serve locally -mkdocs serve # website is made available on http://localhost:8000 +zensical serve # website is made available on http://localhost:8000 ``` ### Translating the workshop to a different language @@ -71,10 +71,4 @@ Changes to the GitHub repository result in an automated build and deploy of the ## Deploying to live site -Website updates are automatically published via GitHub Actions. To publish manually: - -```bash -# NOTE: you require access privileges to the GitHub repository -# to publish live updates -mkdocs gh-deploy -m 'add new page on topic x' -``` +Website updates are automatically published via GitHub Actions. diff --git a/workshop/content/docs/assets/javascripts/custom.js b/workshop/content/docs/assets/javascripts/custom.js deleted file mode 100644 index 45243eb7..00000000 --- a/workshop/content/docs/assets/javascripts/custom.js +++ /dev/null @@ -1,105 +0,0 @@ -document.querySelectorAll(".use-termynal").forEach(node => { - node.style.display = "block"; - new Termynal(node, { - lineDelay: 500 - }); -}); -const progressLiteralStart = "---> 100%"; -const promptLiteralStart = "$ "; -const customPromptLiteralStart = "# "; -const termynalActivateClass = "termy"; -let termynals = []; - -function createTermynals() { - document - .querySelectorAll(`.${termynalActivateClass} .highlight`) - .forEach(node => { - const text = node.textContent; - const lines = text.split("\n"); - const useLines = []; - let buffer = []; - function saveBuffer() { - if (buffer.length) { - let isBlankSpace = true; - buffer.forEach(line => { - if (line) { - isBlankSpace = false; - } - }); - dataValue = {}; - if (isBlankSpace) { - dataValue["delay"] = 0; - } - if (buffer[buffer.length - 1] === "") { - // A last single
won't have effect - // so put an additional one - buffer.push(""); - } - const bufferValue = buffer.join("
"); - dataValue["value"] = bufferValue; - useLines.push(dataValue); - buffer = []; - } - } - for (let line of lines) { - if (line === progressLiteralStart) { - saveBuffer(); - useLines.push({ - type: "progress" - }); - } else if (line.startsWith(promptLiteralStart)) { - saveBuffer(); - const value = line.replace(promptLiteralStart, "").trimEnd(); - useLines.push({ - type: "input", - value: value - }); - } else if (line.startsWith("// ")) { - saveBuffer(); - const value = "💬 " + line.replace("// ", "").trimEnd(); - useLines.push({ - value: value, - class: "termynal-comment", - delay: 0 - }); - } else if (line.startsWith(customPromptLiteralStart)) { - saveBuffer(); - const promptStart = line.indexOf(promptLiteralStart); - if (promptStart === -1) { - console.error("Custom prompt found but no end delimiter", line) - } - const prompt = line.slice(0, promptStart).replace(customPromptLiteralStart, "") - let value = line.slice(promptStart + promptLiteralStart.length); - useLines.push({ - type: "input", - value: value, - prompt: prompt - }); - } else { - buffer.push(line); - } - } - saveBuffer(); - const div = document.createElement("div"); - node.replaceWith(div); - const termynal = new Termynal(div, { - lineData: useLines, - noInit: true, - lineDelay: 500 - }); - termynals.push(termynal); - }); -} - -function loadVisibleTermynals() { - termynals = termynals.filter(termynal => { - if (termynal.container.getBoundingClientRect().top - innerHeight <= 0) { - termynal.init(); - return false; - } - return true; - }); -} -window.addEventListener("scroll", loadVisibleTermynals); -createTermynals(); -loadVisibleTermynals(); diff --git a/workshop/content/docs/assets/javascripts/termynal.js b/workshop/content/docs/assets/javascripts/termynal.js deleted file mode 100644 index a2e756d9..00000000 --- a/workshop/content/docs/assets/javascripts/termynal.js +++ /dev/null @@ -1,264 +0,0 @@ -/** - * termynal.js - * A lightweight, modern and extensible animated terminal window, using - * async/await. - * - * @author Ines Montani - * @version 0.0.1 - * @license MIT - */ - - 'use strict'; - - /** Generate a terminal widget. */ - class Termynal { - /** - * Construct the widget's settings. - * @param {(string|Node)=} container - Query selector or container element. - * @param {Object=} options - Custom settings. - * @param {string} options.prefix - Prefix to use for data attributes. - * @param {number} options.startDelay - Delay before animation, in ms. - * @param {number} options.typeDelay - Delay between each typed character, in ms. - * @param {number} options.lineDelay - Delay between each line, in ms. - * @param {number} options.progressLength - Number of characters displayed as progress bar. - * @param {string} options.progressChar – Character to use for progress bar, defaults to █. - * @param {number} options.progressPercent - Max percent of progress. - * @param {string} options.cursor – Character to use for cursor, defaults to ▋. - * @param {Object[]} lineData - Dynamically loaded line data objects. - * @param {boolean} options.noInit - Don't initialise the animation. - */ - constructor(container = '#termynal', options = {}) { - this.container = (typeof container === 'string') ? document.querySelector(container) : container; - this.pfx = `data-${options.prefix || 'ty'}`; - this.originalStartDelay = this.startDelay = options.startDelay - || parseFloat(this.container.getAttribute(`${this.pfx}-startDelay`)) || 600; - this.originalTypeDelay = this.typeDelay = options.typeDelay - || parseFloat(this.container.getAttribute(`${this.pfx}-typeDelay`)) || 90; - this.originalLineDelay = this.lineDelay = options.lineDelay - || parseFloat(this.container.getAttribute(`${this.pfx}-lineDelay`)) || 1500; - this.progressLength = options.progressLength - || parseFloat(this.container.getAttribute(`${this.pfx}-progressLength`)) || 40; - this.progressChar = options.progressChar - || this.container.getAttribute(`${this.pfx}-progressChar`) || '█'; - this.progressPercent = options.progressPercent - || parseFloat(this.container.getAttribute(`${this.pfx}-progressPercent`)) || 100; - this.cursor = options.cursor - || this.container.getAttribute(`${this.pfx}-cursor`) || '▋'; - this.lineData = this.lineDataToElements(options.lineData || []); - this.loadLines() - if (!options.noInit) this.init() - } - - loadLines() { - // Load all the lines and create the container so that the size is fixed - // Otherwise it would be changing and the user viewport would be constantly - // moving as she/he scrolls - const finish = this.generateFinish() - finish.style.visibility = 'hidden' - this.container.appendChild(finish) - // Appends dynamically loaded lines to existing line elements. - this.lines = [...this.container.querySelectorAll(`[${this.pfx}]`)].concat(this.lineData); - for (let line of this.lines) { - line.style.visibility = 'hidden' - this.container.appendChild(line) - } - const restart = this.generateRestart() - restart.style.visibility = 'hidden' - this.container.appendChild(restart) - this.container.setAttribute('data-termynal', ''); - } - - /** - * Initialise the widget, get lines, clear container and start animation. - */ - init() { - /** - * Calculates width and height of Termynal container. - * If container is empty and lines are dynamically loaded, defaults to browser `auto` or CSS. - */ - const containerStyle = getComputedStyle(this.container); - this.container.style.width = containerStyle.width !== '0px' ? - containerStyle.width : undefined; - this.container.style.minHeight = containerStyle.height !== '0px' ? - containerStyle.height : undefined; - - this.container.setAttribute('data-termynal', ''); - this.container.innerHTML = ''; - for (let line of this.lines) { - line.style.visibility = 'visible' - } - this.start(); - } - - /** - * Start the animation and rener the lines depending on their data attributes. - */ - async start() { - this.addFinish() - await this._wait(this.startDelay); - - for (let line of this.lines) { - const type = line.getAttribute(this.pfx); - const delay = line.getAttribute(`${this.pfx}-delay`) || this.lineDelay; - - if (type == 'input') { - line.setAttribute(`${this.pfx}-cursor`, this.cursor); - await this.type(line); - await this._wait(delay); - } - - else if (type == 'progress') { - await this.progress(line); - await this._wait(delay); - } - - else { - this.container.appendChild(line); - await this._wait(delay); - } - - line.removeAttribute(`${this.pfx}-cursor`); - } - this.addRestart() - this.finishElement.style.visibility = 'hidden' - this.lineDelay = this.originalLineDelay - this.typeDelay = this.originalTypeDelay - this.startDelay = this.originalStartDelay - } - - generateRestart() { - const restart = document.createElement('a') - restart.onclick = (e) => { - e.preventDefault() - this.container.innerHTML = '' - this.init() - } - restart.href = '#' - restart.setAttribute('data-terminal-control', '') - restart.innerHTML = "restart ↻" - return restart - } - - generateFinish() { - const finish = document.createElement('a') - finish.onclick = (e) => { - e.preventDefault() - this.lineDelay = 0 - this.typeDelay = 0 - this.startDelay = 0 - } - finish.href = '#' - finish.setAttribute('data-terminal-control', '') - finish.innerHTML = "fast →" - this.finishElement = finish - return finish - } - - addRestart() { - const restart = this.generateRestart() - this.container.appendChild(restart) - } - - addFinish() { - const finish = this.generateFinish() - this.container.appendChild(finish) - } - - /** - * Animate a typed line. - * @param {Node} line - The line element to render. - */ - async type(line) { - const chars = [...line.textContent]; - line.textContent = ''; - this.container.appendChild(line); - - for (let char of chars) { - const delay = line.getAttribute(`${this.pfx}-typeDelay`) || this.typeDelay; - await this._wait(delay); - line.textContent += char; - } - } - - /** - * Animate a progress bar. - * @param {Node} line - The line element to render. - */ - async progress(line) { - const progressLength = line.getAttribute(`${this.pfx}-progressLength`) - || this.progressLength; - const progressChar = line.getAttribute(`${this.pfx}-progressChar`) - || this.progressChar; - const chars = progressChar.repeat(progressLength); - const progressPercent = line.getAttribute(`${this.pfx}-progressPercent`) - || this.progressPercent; - line.textContent = ''; - this.container.appendChild(line); - - for (let i = 1; i < chars.length + 1; i++) { - await this._wait(this.typeDelay); - const percent = Math.round(i / chars.length * 100); - line.textContent = `${chars.slice(0, i)} ${percent}%`; - if (percent>progressPercent) { - break; - } - } - } - - /** - * Helper function for animation delays, called with `await`. - * @param {number} time - Timeout, in ms. - */ - _wait(time) { - return new Promise(resolve => setTimeout(resolve, time)); - } - - /** - * Converts line data objects into line elements. - * - * @param {Object[]} lineData - Dynamically loaded lines. - * @param {Object} line - Line data object. - * @returns {Element[]} - Array of line elements. - */ - lineDataToElements(lineData) { - return lineData.map(line => { - let div = document.createElement('div'); - div.innerHTML = `${line.value || ''}`; - - return div.firstElementChild; - }); - } - - /** - * Helper function for generating attributes string. - * - * @param {Object} line - Line data object. - * @returns {string} - String of attributes. - */ - _attributes(line) { - let attrs = ''; - for (let prop in line) { - // Custom add class - if (prop === 'class') { - attrs += ` class=${line[prop]} ` - continue - } - if (prop === 'type') { - attrs += `${this.pfx}="${line[prop]}" ` - } else if (prop !== 'value') { - attrs += `${this.pfx}-${prop}="${line[prop]}" ` - } - } - - return attrs; - } - } - - /** - * HTML API: If current script has container(s) specified, initialise Termynal. - */ - if (document.currentScript.hasAttribute('data-termynal-container')) { - const containers = document.currentScript.getAttribute('data-termynal-container'); - containers.split('|') - .forEach(container => new Termynal(container)) - } \ No newline at end of file diff --git a/workshop/content/docs/assets/stylesheets/custom.css b/workshop/content/docs/assets/stylesheets/custom.css deleted file mode 100644 index 954b0cf4..00000000 --- a/workshop/content/docs/assets/stylesheets/custom.css +++ /dev/null @@ -1,23 +0,0 @@ -.termynal-comment { - color: #4a968f; - font-style: italic; - display: block; -} - -.termy [data-termynal] { - white-space: pre-wrap; -} - -a.external-link::after { - /* \00A0 is a non-breaking space - to make the mark be on the same line as the link - */ - content: "\00A0[↪]"; -} - -a.internal-link::after { - /* \00A0 is a non-breaking space - to make the mark be on the same line as the link - */ - content: "\00A0↪"; -} diff --git a/workshop/content/docs/assets/stylesheets/pygeoapi.css b/workshop/content/docs/assets/stylesheets/pygeoapi.css index 48af6cc4..9deaf9be 100644 --- a/workshop/content/docs/assets/stylesheets/pygeoapi.css +++ b/workshop/content/docs/assets/stylesheets/pygeoapi.css @@ -2,4 +2,7 @@ --md-primary-fg-color: #3b6a95; --md-primary-fg-color--light: #6c98c6; --md-primary-fg-color--dark: #004067; -} \ No newline at end of file +} +.md-header, .md-footer { + background-color: #000000; +} diff --git a/workshop/content/docs/assets/stylesheets/termynal.css b/workshop/content/docs/assets/stylesheets/termynal.css deleted file mode 100644 index dfe3caac..00000000 --- a/workshop/content/docs/assets/stylesheets/termynal.css +++ /dev/null @@ -1,108 +0,0 @@ -/** - * termynal.js - * - * @author Ines Montani - * @version 0.0.1 - * @license MIT - */ - - :root { - --color-bg: #252a33; - --color-text: #eee; - --color-text-subtle: #a2a2a2; -} - -[data-termynal] { - width: 750px; - max-width: 100%; - background: var(--color-bg); - color: var(--color-text); - font-size: 18px; - /* font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace; */ - font-family: 'Roboto Mono', 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace; - border-radius: 4px; - padding: 75px 45px 35px; - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -[data-termynal]:before { - content: ''; - position: absolute; - top: 15px; - left: 15px; - display: inline-block; - width: 15px; - height: 15px; - border-radius: 50%; - /* A little hack to display the window buttons in one pseudo element. */ - background: #d9515d; - -webkit-box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930; - box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930; -} - -[data-termynal]:after { - content: 'bash'; - position: absolute; - color: var(--color-text-subtle); - top: 5px; - left: 0; - width: 100%; - text-align: center; -} - -a[data-terminal-control] { - text-align: right; - display: block; - color: #aebbff; -} - -[data-ty] { - display: block; - line-height: 2; -} - -[data-ty]:before { - /* Set up defaults and ensure empty lines are displayed. */ - content: ''; - display: inline-block; - vertical-align: middle; -} - -[data-ty="input"]:before, -[data-ty-prompt]:before { - margin-right: 0.75em; - color: var(--color-text-subtle); -} - -[data-ty="input"]:before { - content: '$'; -} - -[data-ty][data-ty-prompt]:before { - content: attr(data-ty-prompt); -} - -[data-ty-cursor]:after { - content: attr(data-ty-cursor); - font-family: monospace; - margin-left: 0.5em; - -webkit-animation: blink 1s infinite; - animation: blink 1s infinite; -} - - -/* Cursor animation */ - -@-webkit-keyframes blink { - 50% { - opacity: 0; - } -} - -@keyframes blink { - 50% { - opacity: 0; - } -} diff --git a/workshop/content/docs/index.md b/workshop/content/docs/index.md index 24b61650..968de095 100644 --- a/workshop/content/docs/index.md +++ b/workshop/content/docs/index.md @@ -91,10 +91,6 @@ This workshop is always provided live at [https://dive.pygeoapi.io](https://dive The workshop contents, wiki and issue tracker are managed on GitHub at [https://github.com/geopython/diving-into-pygeoapi](https://github.com/geopython/diving-into-pygeoapi). -## Printing this workshop - -To print this workshop, navigate to the [print page](print_page) and select *File > Print > Save as PDF*. - # Support A [Gitter](https://app.gitter.im/#/room/#geopython_diving-into-pygeoapi:gitter.im) channel exists for diff --git a/workshop/content/docs/index.pt.md b/workshop/content/docs/index.pt.md index 0b14aff3..ab17bb7d 100644 --- a/workshop/content/docs/index.pt.md +++ b/workshop/content/docs/index.pt.md @@ -91,10 +91,6 @@ Esta workshop é sempre disponibilizada ao vivo em [https://dive.pygeoapi.io](ht Os conteúdos da workshop, a wiki e o sistema de registo de problemas (issue tracker) são geridos no GitHub em [https://github.com/geopython/diving-into-pygeoapi](https://github.com/geopython/diving-into-pygeoapi). -## Imprimir esta workshop - -Para imprimir esta workshop, navegue até à [página de impressão](print_page) e selecione *Ficheiro > Imprimir > Guardar como PDF*. - # Suporte Existe um canal no [Gitter](https://app.gitter.im/#/room/#geopython_diving-into-pygeoapi:gitter.im) para discussão e suporte ao vivo por parte dos desenvolvedores da workshop e de outros participantes. @@ -107,4 +103,4 @@ Como sempre, o suporte principal da pygeoapi e as informações da comunidade po As contribuições são sempre incentivadas e bem-vindas! -## Agora, vamos à workshop. Bora lá! \ No newline at end of file +## Agora, vamos à workshop. Bora lá! diff --git a/workshop/content/mkdocs.yml b/workshop/content/mkdocs.yml deleted file mode 100644 index 60250561..00000000 --- a/workshop/content/mkdocs.yml +++ /dev/null @@ -1,112 +0,0 @@ -site_name: Diving into pygeoapi -site_description: "pygeoapi is an OGC Reference Implementation supporting numerous OGC API specifications. This workshop will cover publishing geospatial data to the Web using pygeoapi in support of the suite of OGC API standards." -site_author: The pygeoapi community -copyright: "© 2025 pygeoapi community" -site_url: https://dive.pygeoapi.io/ -repo_url: https://github.com/geopython/diving-into-pygeoapi -nav: - - Home: index.md - - Introduction to pygeoapi: introduction.md - - Workshop environment setup: setup.md - - Standards: standards.md - - Publishing: - - publishing/index.md - - Exercise 1 - Your first dataset: publishing/first.md - - Exercise 2 - Vector data via OGC API - Features: publishing/ogcapi-features.md - - Exercise 3 - Raster data via OGC API - Coverages: publishing/ogcapi-coverages.md - - Exercise 4 - Maps of geospatial data via OGC API - Maps: publishing/ogcapi-maps.md - - Exercise 5 - Tiles of geospatial data via OGC API - Tiles: publishing/ogcapi-tiles.md - - Exercise 6 - Metadata via OGC API - Records: publishing/ogcapi-records.md - - Exercise 7 - Environmental data via OGC API - Environmental Data Retrieval: publishing/ogcapi-edr.md - - Exercise 8 - Functions via OGC API - Processes: publishing/ogcapi-processes.md - - Advanced topics: - - advanced/index.md - - Multilingual support: advanced/i18n.md - - CRS support: advanced/crs.md - - UI customization and templating: advanced/ui-custom-templates.md - - Using pygeoapi in downstream applications: advanced/downstream-applications.md - - Search Engine Optimization (SEO): advanced/seo.md - - Security and access control: advanced/security-access-control.md - - Semantic Web and Linked Data: advanced/semantic-web-linked-data.md - - Cloud deployment: advanced/cloud.md - - INSPIRE support: advanced/inspire.md - - Administration: advanced/administration.md - - Exercise 9 - pygeoapi as a bridge to other services: advanced/bridges.md - - Conclusion: conclusion.md - -use_directory_urls: true - -theme: - name: material - palette: - # See https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#color-scheme - # Default is indigo (blue) - scheme: pygeoapi - features: - - navigation.indexes - favicon: assets/favicon.ico - logo: assets/images/pygeoapi-icon-notrans.png - language: en - -plugins: - - search - - i18n: - languages: - - locale: en - name: English - default: true - build: true - - locale: pt - name: Portuguese - site_name: Mergulhando na pygeoapi - build: true - nav_translations: - Home: Início - Introduction to pygeoapi: Introdução á pygeoapi - Workshop environment setup: Configuração do ambiente da workshop - Standards: Normas - Publishing: Publicação - "Exercise 1 - Your first dataset": "Exercício 1 - O meu primeiro conjunto de dados" - "Exercise 2 - Vector data via OGC API - Features": "Exercício 2 - Dados vetoriais via OGC API - Features" - "Exercise 3 - Raster data via OGC API - Coverages": "Exercício 3 - Dados raster via OGC API - Coverages" - "Exercise 4 - Maps of geospatial data via OGC API - Maps": "Exercício 4 - Mapas de dados geoespaciais via OGC API - Maps" - "Exercise 5 - Tiles of geospatial data via OGC API - Tiles": "Exercício 5 - Tiles de dados geoespaciais via OGC API - Tiles" - "Exercise 6 - Metadata via OGC API - Records": "Exercício 6 - Metadados via OGC API - Records" - "Exercise 7 - Environmental data via OGC API - Environmental Data Retrieval": "Exercício 7 - Dados ambientais via OGC API - Environmental Data Retrieval" - "Exercise 8 - Functions via OGC API - Processes": "Exercício 8 - Funções via OGC API - Processes" - "Advanced topics": "Tópicos avançados" - "Multilingual support": "Suporte multilíngue" - "CRS support": "Suporte a CRS" - "UI customization and templating": "Personalização de UI e templating" - "Using pygeoapi in downstream applications": "Uso da pygeoapi em aplicações downstream" - "Search Engine Optimization (SEO)": "Otimização para mecanismos de busca (SEO)" - "Security and access control": "Segurança e controle de acessos" - "Semantic Web and Linked Data": "Web Semântica e Linked Data" - "Cloud deployment": "Implantação na cloud" - "INSPIRE support": "Suporte INSPIRE" - Administration: Administração - "Exercise 9 - pygeoapi as a bridge to other services": "Exercício 9 - pygeoapi como uma ponte para outros serviços" - Conclusion: Conclusão - - print-site - -markdown_extensions: - - meta # option to add some meta tags on top, title, author, date, etc - - admonition # adds the note, question, tip boxes, eg: !!! tip "my tip" - - pymdownx.details # advanced collapsible panels - - pymdownx.superfences # advanced features; such as line number, flow chart, python shell - - pymdownx.tabbed: - alternate_style: true - - footnotes # notes bottom of page - - attr_list # used to size images - - md_in_html # used to size images - -extra_css: - # pygeoapi primary color with light and dark variations from material.io - # https://material.io/resources/color/#!/?view.left=0&view.right=1 - - assets/stylesheets/pygeoapi.css - - assets/stylesheets/termynal.css - - assets/stylesheets/custom.css - -extra_javascript: - - assets/javascripts/termynal.js - - assets/javascripts/custom.js diff --git a/workshop/content/requirements.txt b/workshop/content/requirements.txt index 824d89fb..39b36130 100644 --- a/workshop/content/requirements.txt +++ b/workshop/content/requirements.txt @@ -1,4 +1 @@ -mkdocs -mkdocs-material -mkdocs-print-site-plugin -mkdocs-static-i18n +zensical diff --git a/workshop/content/zensical.toml b/workshop/content/zensical.toml new file mode 100644 index 00000000..d79da0c1 --- /dev/null +++ b/workshop/content/zensical.toml @@ -0,0 +1,115 @@ +[project] +site_name = "Diving into pygeoapi" +site_description = "pygeoapi is an OGC Reference Implementation supporting numerous OGC API specifications. This workshop will cover publishing geospatial data to the Web using pygeoapi in support of the suite of OGC API standards." +site_author = "The pygeoapi community" +copyright = "© 2022 - 2026 pygeoapi community" +site_url = "https://dive.pygeoapi.io/" +repo_url = "https://github.com/geopython/diving-into-pygeoapi" +edit_uri = "edit/main/workshop/content/docs" +docs_dir = "docs" +directory_urls = true +extra_css = [ + "assets/stylesheets/pygeoapi.css" +] + +nav = [ + { "Home" = "index.md"}, + { "Introduction to pygeoapi" = "introduction.md"}, + { "Workshop environment setup" = "setup.md"}, + { "Standards" = "standards.md"}, + { "Publishing" = [ + { "Index" = "publishing/index.md"}, + { "Exercise 1 - Your first dataset" = "publishing/first.md"}, + { "Exercise 2 - Vector data via OGC API - Features" = "publishing/ogcapi-features.md"}, + { "Exercise 3 - Raster data via OGC API - Coverages" = "publishing/ogcapi-coverages.md"}, + { "Exercise 4 - Maps of geospatial data via OGC API - Maps" = "publishing/ogcapi-maps.md"}, + { "Exercise 5 - Tiles of geospatial data via OGC API - Tiles" = "publishing/ogcapi-tiles.md"}, + { "Exercise 6 - Metadata via OGC API - Records" = "publishing/ogcapi-records.md"}, + { "Exercise 7 - Environmental data via OGC API - Environmental Data Retrieval" = "publishing/ogcapi-edr.md"}, + { "Exercise 8 - Functions via OGC API - Processes" = "publishing/ogcapi-processes.md"} + ]}, + { "Advanced topics" = [ + { "Index" = "advanced/index.md"}, + { "Multilingual support" = "advanced/i18n.md"}, + { "CRS support" = "advanced/crs.md"}, + { "UI customization and templating" = "advanced/ui-custom-templates.md"}, + { "Using pygeoapi in downstream applications" = "advanced/downstream-applications.md"}, + { "Search Engine Optimization (SEO)" = "advanced/seo.md"}, + { "Security and access control" = "advanced/security-access-control.md"}, + { "Semantic Web and Linked Data" = "advanced/semantic-web-linked-data.md"}, + { "Cloud deployment" = "advanced/cloud.md"}, + { "INSPIRE support" = "advanced/inspire.md"}, + { "Administration" = "advanced/administration.md"}, + { "Exercise 9 - pygeoapi as a bridge to other services" = "advanced/bridges.md"} + ]}, + { "Conclusion" = "conclusion.md"} +] + +[project.theme] +language = "en" +variant = "classic" +primary = "black" +favicon = "assets/favicon.ico" +logo = "assets/images/pygeoapi-icon-notrans.png" +features = [ + "content.action.edit", + "content.action.view", + "navigation.top", + "navigation.tracking.prev_next", + "navigation.tracking.section", + "navigation.indexes" +] + +#plugins: +# - i18n: +# languages: +# - locale: en +# name: English +# default: true +# build: true +# - locale: pt +# name: Portuguese +# site_name: Mergulhando na pygeoapi +# build: true +# nav_translations: +# Home: Início +# Introduction to pygeoapi: Introdução á pygeoapi +# Workshop environment setup: Configuração do ambiente da workshop +# Standards: Normas +# Publishing: Publicação +# "Exercise 1 - Your first dataset": "Exercício 1 - O meu primeiro conjunto de dados" +# "Exercise 2 - Vector data via OGC API - Features": "Exercício 2 - Dados vetoriais via OGC API - Features" +# "Exercise 3 - Raster data via OGC API - Coverages": "Exercício 3 - Dados raster via OGC API - Coverages" +# "Exercise 4 - Maps of geospatial data via OGC API - Maps": "Exercício 4 - Mapas de dados geoespaciais via OGC API - Maps" +# "Exercise 5 - Tiles of geospatial data via OGC API - Tiles": "Exercício 5 - Tiles de dados geoespaciais via OGC API - Tiles" +# "Exercise 6 - Metadata via OGC API - Records": "Exercício 6 - Metadados via OGC API - Records" +# "Exercise 7 - Environmental data via OGC API - Environmental Data Retrieval": "Exercício 7 - Dados ambientais via OGC API - Environmental Data Retrieval" +# "Exercise 8 - Functions via OGC API - Processes": "Exercício 8 - Funções via OGC API - Processes" +# "Advanced topics": "Tópicos avançados" +# "Multilingual support": "Suporte multilíngue" +# "CRS support": "Suporte a CRS" +# "UI customization and templating": "Personalização de UI e templating" +# "Using pygeoapi in downstream applications": "Uso da pygeoapi em aplicações downstream" +# "Search Engine Optimization (SEO)": "Otimização para mecanismos de busca (SEO)" +# "Security and access control": "Segurança e controle de acessos" +# "Semantic Web and Linked Data": "Web Semântica e Linked Data" +# "Cloud deployment": "Implantação na cloud" +# "INSPIRE support": "Suporte INSPIRE" +# Administration: Administração +# "Exercise 9 - pygeoapi as a bridge to other services": "Exercício 9 - pygeoapi como uma ponte para outros serviços" +# Conclusion: Conclusão +# - print-site + + +[project.extra] +homepage = "https://dive.pygeoapi.io" + +[plugins.termynal] +enabled = true + +default_language = "en" +languages = ["en", "pt"] +generate_language_paths = true + +[i18n.routing] +prefix_default_language = false From 1d33351dde97b6647b830fbfaf8e5640310b274b Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Sun, 8 Mar 2026 22:05:15 -0400 Subject: [PATCH 2/3] remove termy --- workshop/content/docs/advanced/cloud.md | 13 ---- workshop/content/docs/advanced/cloud.pt.md | 14 +--- workshop/content/docs/advanced/i18n.md | 8 --- workshop/content/docs/advanced/i18n.pt.md | 10 +-- workshop/content/docs/advanced/inspire.md | 4 -- workshop/content/docs/advanced/inspire.pt.md | 6 +- workshop/content/docs/index.md | 9 +-- workshop/content/docs/index.pt.md | 8 +-- workshop/content/docs/publishing/first.md | 12 ---- workshop/content/docs/publishing/first.pt.md | 14 +--- .../docs/publishing/ogcapi-coverages.md | 12 ---- .../docs/publishing/ogcapi-coverages.pt.md | 15 +---- .../content/docs/publishing/ogcapi-edr.md | 8 --- .../content/docs/publishing/ogcapi-edr.pt.md | 10 --- .../docs/publishing/ogcapi-features.md | 64 ------------------ .../docs/publishing/ogcapi-features.pt.md | 65 +------------------ .../content/docs/publishing/ogcapi-maps.md | 8 --- .../content/docs/publishing/ogcapi-maps.pt.md | 10 +-- .../content/docs/publishing/ogcapi-records.md | 24 ------- .../docs/publishing/ogcapi-records.pt.md | 24 ------- .../content/docs/publishing/ogcapi-tiles.md | 23 ------- .../docs/publishing/ogcapi-tiles.pt.md | 27 +------- workshop/content/docs/setup.md | 24 ------- workshop/content/docs/setup.pt.md | 26 +------- workshop/content/zensical.toml | 3 - 25 files changed, 16 insertions(+), 425 deletions(-) diff --git a/workshop/content/docs/advanced/cloud.md b/workshop/content/docs/advanced/cloud.md index a7d3a712..00260317 100644 --- a/workshop/content/docs/advanced/cloud.md +++ b/workshop/content/docs/advanced/cloud.md @@ -14,19 +14,15 @@ A [Docker image](https://hub.docker.com/r/geopython/pygeoapi) is available for p === "Linux/Mac" -
```bash docker run -p 5000:80 geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 geopython/pygeoapi:latest ``` -
!!! question "Review the pygeoapi Dockerfile" @@ -38,22 +34,17 @@ In a typical configuration one would override the default pygeoapi configuration === "Linux/Mac" -
```bash docker run -p 5000:80 \ -v $(pwd)/pygeoapi-config.yml:/pygeoapi/local.config.yml \ -v $(pwd)/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -v ${pwd}/pygeoapi-config.yml:/pygeoapi/local.config.yml -v ${pwd}/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest ``` -
- Alternatively, you can build a fresh Docker image including both the configuration and data for the service. @@ -70,22 +61,18 @@ set the `SCRIPT_NAME` environment variable. === "Linux/Mac" -
```bash docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' \ -v $(pwd)/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi # browse to http://localhost:5000/mypygeoapi ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' -v ${pwd}/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi # browse to http://localhost:5000/mypygeoapi ``` -
# Summary diff --git a/workshop/content/docs/advanced/cloud.pt.md b/workshop/content/docs/advanced/cloud.pt.md index a192d7bb..ee3dd5d8 100644 --- a/workshop/content/docs/advanced/cloud.pt.md +++ b/workshop/content/docs/advanced/cloud.pt.md @@ -14,19 +14,15 @@ Uma [imagem Docker](https://hub.docker.com/r/geopython/pygeoapi) está disponív === "Linux/Mac" -
```bash docker run -p 5000:80 geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 geopython/pygeoapi:latest ``` -
!!! question "Rever o Dockerfile da pygeoapi" @@ -38,21 +34,17 @@ Numa configuração típica, substituir-se-ia o ficheiro de configuração padr === "Linux/Mac" -
```bash docker run -p 5000:80 \ -v $(pwd)/pygeoapi-config.yml:/pygeoapi/local.config.yml \ -v $(pwd)/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -v ${pwd}/pygeoapi-config.yml:/pygeoapi/local.config.yml -v ${pwd}/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest ``` -
Alternativamente, pode construir uma nova imagem Docker incluindo tanto a configuração como os dados para o serviço. @@ -70,23 +62,19 @@ definir a variável de ambiente `SCRIPT_NAME`. === "Linux/Mac" -
```bash docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' \ -v $(pwd)/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi # navegue para http://localhost:5000/mypygeoapi ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' -v ${pwd}/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi # navegue para http://localhost:5000/mypygeoapi ``` -
# Resumo -Parabéns! Agora pode implementar a pygeoapi como um serviço cloud native. \ No newline at end of file +Parabéns! Agora pode implementar a pygeoapi como um serviço cloud native. diff --git a/workshop/content/docs/advanced/i18n.md b/workshop/content/docs/advanced/i18n.md index 40d94cf5..0a1c4777 100644 --- a/workshop/content/docs/advanced/i18n.md +++ b/workshop/content/docs/advanced/i18n.md @@ -52,37 +52,29 @@ Babel provides a utility which extracts all keys to be translated from the templ === "Linux/Mac" -
```bash pybabel extract -F babel-mapping.ini -o locale/messages.pot ./ ``` -
=== "Windows (PowerShell)" -
```bash pybabel extract -F babel-mapping.ini -o locale/messages.pot ./ ``` -
The resulting `.pot` file is used to create or update existing `.po` files, which exist for each language, containing the actual translations. === "Linux/Mac" -
```bash pybabel init -d locale -l it -i locale/messages.pot ``` -
=== "Windows (PowerShell)" -
```bash pybabel init -d locale -l it -i locale/messages.pot ``` -
The `.po` files are stored in pygeoapi's source code repository on GitHub. You can create a Pull Request to add or update your favourite languages. `.po` files can also be added to translation software such as [transifex.com](https://transifex.com). diff --git a/workshop/content/docs/advanced/i18n.pt.md b/workshop/content/docs/advanced/i18n.pt.md index 28d728ac..0a9387e0 100644 --- a/workshop/content/docs/advanced/i18n.pt.md +++ b/workshop/content/docs/advanced/i18n.pt.md @@ -52,37 +52,29 @@ O Babel fornece um utilitário que extrai todas as chaves a serem traduzidas dos === "Linux/Mac" -
```bash pybabel extract -F babel-mapping.ini -o locale/messages.pot ./ ``` -
=== "Windows (PowerShell)" -
```bash pybabel extract -F babel-mapping.ini -o locale/messages.pot ./ ``` -
O ficheiro `.pot` resultante é usado para criar ou atualizar ficheiros `.po` existentes, que existem para cada língua, contendo as traduções atuais. === "Linux/Mac" -
```bash pybabel init -d locale -l it -i locale/messages.pot ``` -
=== "Windows (PowerShell)" -
```bash pybabel init -d locale -l it -i locale/messages.pot ``` -
Os ficheiros `.po` são armazenados no repositório de código fonte da pygeoapi no GitHub. Pode criar um Pull Request para adicionar ou atualizar as suas linguagens favoritas. Os ficheiros `.po` também podem ser adicionados a software de tradução como [transifex.com](https://transifex.com). @@ -111,4 +103,4 @@ A pygeoapi inclui um mecanismo para influenciar as respostas da API baseado na l # Resumo -Parabéns! Personalizámos a pygeoapi para suportar múltiplas línguas. \ No newline at end of file +Parabéns! Personalizámos a pygeoapi para suportar múltiplas línguas. diff --git a/workshop/content/docs/advanced/inspire.md b/workshop/content/docs/advanced/inspire.md index e3f17b37..a3fae9b7 100644 --- a/workshop/content/docs/advanced/inspire.md +++ b/workshop/content/docs/advanced/inspire.md @@ -54,19 +54,15 @@ recommendation and the relevant Good Practices. === "Linux/Mac" -
```bash python3 load_tinydb_records.py ``` -
=== "Windows (PowerShell)" -
```bash python3 load_tinydb_records.py ``` -
Now configure [TinyDB as a provider for OGC API - Records](https://docs.pygeoapi.io/en/latest/data-publishing/ogcapi-records.html#tinydbcatalogue). Restart the service and verify the result. Verify also the XML output of some of the records. diff --git a/workshop/content/docs/advanced/inspire.pt.md b/workshop/content/docs/advanced/inspire.pt.md index e1fe56a5..f97cd992 100644 --- a/workshop/content/docs/advanced/inspire.pt.md +++ b/workshop/content/docs/advanced/inspire.pt.md @@ -54,19 +54,15 @@ e as Boas Práticas relevantes. === "Linux/Mac" -
```bash python3 load_tinydb_records.py ``` -
=== "Windows (PowerShell)" -
```bash python3 load_tinydb_records.py ``` -
Agora configure [TinyDB como fornecedor para OGC API - Records](https://docs.pygeoapi.io/en/latest/data-publishing/ogcapi-records.html#tinydbcatalogue). Reinicie o serviço e verifique o resultado. Verifique também a saída XML de alguns dos registos. @@ -124,4 +120,4 @@ SoilTypes: # Resumo -Parabéns! Trabalhou com a pygeoapi para conformidade INSPIRE \ No newline at end of file +Parabéns! Trabalhou com a pygeoapi para conformidade INSPIRE diff --git a/workshop/content/docs/index.md b/workshop/content/docs/index.md index 968de095..ec65713d 100644 --- a/workshop/content/docs/index.md +++ b/workshop/content/docs/index.md @@ -40,17 +40,16 @@ Exercises are indicated as follows: A section marked like this indicates that you can try out the exercise and choose your environment (Linux/Mac or Windows). === "Linux/Mac" -
+ ```bash docker run -p 5000:80 -v $(pwd)/default.config.yml:/pygeoapi/local.config.yml geopython/pygeoapi:latest ``` -
+ === "Windows" -
+ ```bash docker run -p 5000:80 -v ${pwd}/default.config.yml:/pygeoapi/local.config.yml geopython/pygeoapi:latest ``` -
Also you will notice tips and notes sections within the text: @@ -79,11 +78,9 @@ my-collection: Snippets which need to be typed in a on a terminal/console are indicated as: -
```bash echo 'Hello world' ``` -
# Workshop location and materials diff --git a/workshop/content/docs/index.pt.md b/workshop/content/docs/index.pt.md index ab17bb7d..7402b238 100644 --- a/workshop/content/docs/index.pt.md +++ b/workshop/content/docs/index.pt.md @@ -40,17 +40,15 @@ Os exercícios são indicados da seguinte forma: Uma secção marcada desta forma indica que pode experimentar o exercício e escolher o seu ambiente (Linux/Mac ou Windows). === "Linux/Mac" -
```bash docker run -p 5000:80 -v $(pwd)/default.config.yml:/pygeoapi/local.config.yml geopython/pygeoapi:latest ``` -
+ === "Windows" -
+ ```bash docker run -p 5000:80 -v ${pwd}/default.config.yml:/pygeoapi/local.config.yml geopython/pygeoapi:latest ``` -
Também irá notar secções de dicas e notas no texto: @@ -79,11 +77,9 @@ my-collection: Fragmentos de código (snippets) que precisam de ser digitados num terminal/consola são indicados como: -
```bash echo 'Hello world' ``` -
# Localização e materiais da workshop diff --git a/workshop/content/docs/publishing/first.md b/workshop/content/docs/publishing/first.md index af8d1648..a7f3f3f9 100644 --- a/workshop/content/docs/publishing/first.md +++ b/workshop/content/docs/publishing/first.md @@ -26,21 +26,17 @@ To test: === "Linux/Mac" -
```bash cd workshop/exercises docker compose up ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises docker compose up ``` -
1. Open in your browser, verify some collections 1. Close by typing `CTRL-C` @@ -51,7 +47,6 @@ To test: === "Linux/Mac" -
```bash docker compose up -d docker ps # verify that the pygeoapi container is running @@ -59,11 +54,9 @@ To test: docker logs --follow pygeoapi # view logs docker compose down --remove-orphans ``` -
=== "Windows (PowerShell)" -
```bash docker compose up -d docker ps # verify that the pygeoapi container is running @@ -71,7 +64,6 @@ To test: docker logs --follow pygeoapi # view logs docker compose down --remove-orphans ``` -
## Publish first dataset @@ -165,19 +157,15 @@ Set the logging level to `DEBUG` and indicate a path to a log file. === "Linux/Mac" -
```bash docker logs --follow pygeoapi ``` -
=== "Windows (PowerShell)" -
```bash docker logs --follow pygeoapi ``` -
!!! tip diff --git a/workshop/content/docs/publishing/first.pt.md b/workshop/content/docs/publishing/first.pt.md index d001f951..27a83dca 100644 --- a/workshop/content/docs/publishing/first.pt.md +++ b/workshop/content/docs/publishing/first.pt.md @@ -24,21 +24,17 @@ Para testar: === "Linux/Mac" -
```bash cd workshop/exercises docker compose up ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises docker compose up ``` -
1. Abra no seu navegador, verifique algumas coleções 1. Feche digitando `CTRL-C` @@ -49,7 +45,6 @@ Para testar: === "Linux/Mac" -
```bash docker compose up -d docker ps # verifique que o container pygeoapi está em execução @@ -57,11 +52,9 @@ Para testar: docker logs --follow pygeoapi # ver registos docker compose down --remove-orphans ``` -
=== "Windows (PowerShell)" -
```bash docker compose up -d docker ps # verifique que o container pygeoapi está em execução @@ -69,7 +62,6 @@ Para testar: docker logs --follow pygeoapi # ver registos docker compose down --remove-orphans ``` -
## Publicar o primeiro conjunto de dados @@ -153,20 +145,16 @@ Defina o nível de registo (logging) para `DEBUG` e indique um caminho para um f === "Linux/Mac" -
```bash docker logs --follow pygeoapi ``` -
=== "Windows (PowerShell)" -
```bash docker logs --follow pygeoapi ``` -
!!! tip - Erros relacionados com caminhos de ficheiros ocorrem normalmente na configuração inicial. No entanto, também podem acontecer em momentos inesperados, resultando num serviço interrompido. Produtos como o [GeoHealthCheck](https://geohealthcheck.org) têm como objetivo monitorizar, detetar e notificar sobre o estado e a disponibilidade do serviço. Os testes da OGC API - Features no GeoHealthCheck verificam a disponibilidade do serviço em intervalos. Consulte a [documentação do GeoHealthCheck](https://docs.geohealthcheck.org) para mais informações. \ No newline at end of file + Erros relacionados com caminhos de ficheiros ocorrem normalmente na configuração inicial. No entanto, também podem acontecer em momentos inesperados, resultando num serviço interrompido. Produtos como o [GeoHealthCheck](https://geohealthcheck.org) têm como objetivo monitorizar, detetar e notificar sobre o estado e a disponibilidade do serviço. Os testes da OGC API - Features no GeoHealthCheck verificam a disponibilidade do serviço em intervalos. Consulte a [documentação do GeoHealthCheck](https://docs.geohealthcheck.org) para mais informações. diff --git a/workshop/content/docs/publishing/ogcapi-coverages.md b/workshop/content/docs/publishing/ogcapi-coverages.md index 3f1bbc2a..2ac06d6e 100644 --- a/workshop/content/docs/publishing/ogcapi-coverages.md +++ b/workshop/content/docs/publishing/ogcapi-coverages.md @@ -76,19 +76,15 @@ Save the configuration and restart Docker Compose. Navigate to ``` gdalinfo OGCAPI:https://maps.ecere.com/ogcapi/collections/SRTM_ViewFinderPanorama ``` - === "Windows (PowerShell)" -
``` gdalinfo OGCAPI:https://maps.ecere.com/ogcapi/collections/SRTM_ViewFinderPanorama ``` -
### OWSLib @@ -100,24 +96,19 @@ Save the configuration and restart Docker Compose. Navigate to ```bash pip3 install owslib ``` - === "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Then start a Python console session with: `python3` (stop the session by typing `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.coverages import Coverages >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -141,11 +132,9 @@ Save the configuration and restart Docker Compose. Navigate to >> schema['properties']['1']['type'] 'number' ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.coverages import Coverages >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -169,7 +158,6 @@ Save the configuration and restart Docker Compose. Navigate to >> schema['properties']['1']['type'] 'number' ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-coverages.pt.md b/workshop/content/docs/publishing/ogcapi-coverages.pt.md index e53c0a06..cf1c7661 100644 --- a/workshop/content/docs/publishing/ogcapi-coverages.pt.md +++ b/workshop/content/docs/publishing/ogcapi-coverages.pt.md @@ -71,19 +71,15 @@ O [GDAL/OGR](https://gdal.org) fornece suporte para a [OGC API - Coverages](http === "Linux/Mac" -
``` gdalinfo OGCAPI:https://maps.ecere.com/ogcapi/collections/SRTM_ViewFinderPanorama ``` -
=== "Windows (PowerShell)" -
``` gdalinfo OGCAPI:https://maps.ecere.com/ogcapi/collections/SRTM_ViewFinderPanorama ``` -
### OWSLib @@ -94,23 +90,19 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi Se não tiver o Python instalado, considere executar este exercício num container de Docker. Consulte o [Capítulo de Configuração](../setup.md#using-docker-for-python-clients). === "Linux/Mac" -
```bash pip3 install owslib - ```
+ ``` === "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Em seguida, inicie uma sessão de consola Python com: `python3` (pare a sessão escrevendo `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.coverages import Coverages >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -134,11 +126,9 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi >>> schema['properties']['1']['type'] 'number' ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.coverages import Coverages >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -162,7 +152,6 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi >>> schema['properties']['1']['type'] 'number' ``` -
!!! note @@ -170,4 +159,4 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi # Resumo -Parabéns! Agora é capaz de publicar dados raster na pygeoapi. \ No newline at end of file +Parabéns! Agora é capaz de publicar dados raster na pygeoapi. diff --git a/workshop/content/docs/publishing/ogcapi-edr.md b/workshop/content/docs/publishing/ogcapi-edr.md index 0009bdde..0b40c5e4 100644 --- a/workshop/content/docs/publishing/ogcapi-edr.md +++ b/workshop/content/docs/publishing/ogcapi-edr.md @@ -112,25 +112,20 @@ You can close this dialog and run the query. The plugin will fetch all the data === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Then start a Python console session with `python3` (stop the session by typing `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.edr import EnvironmentalDataRetrieval >>> w = EnvironmentalDataRetrieval('https://demo.pygeoapi.io/master') @@ -146,11 +141,9 @@ You can close this dialog and run the query. The plugin will fetch all the data >>> data = w.query_data('icoads-sst', 'position', coords='POINT(174.7645 -36.8509)', parameter_names=['SST', 'AIRT']) >>> data # CoverageJSON data ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.edr import EnvironmentalDataRetrieval >>> w = EnvironmentalDataRetrieval('https://demo.pygeoapi.io/master') @@ -166,7 +159,6 @@ You can close this dialog and run the query. The plugin will fetch all the data >>> data = w.query_data('icoads-sst', 'position', coords='POINT(174.7645 -36.8509)', parameter_names=['SST', 'AIRT']) >>> data # CoverageJSON data ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-edr.pt.md b/workshop/content/docs/publishing/ogcapi-edr.pt.md index 5a02484e..79634925 100644 --- a/workshop/content/docs/publishing/ogcapi-edr.pt.md +++ b/workshop/content/docs/publishing/ogcapi-edr.pt.md @@ -110,27 +110,20 @@ Pode fechar este dialogo e executar a query. O plugin irá descarregar todos os === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Depois, inicie uma sessão de consola Python com `python3` (pare a sessão escrevendo `exit()`). === "Linux/Mac" -
- ```python - >>> from owslib.ogcapi.edr import EnvironmentalDataRetrieval >>> w = EnvironmentalDataRetrieval('https://demo.pygeoapi.io/master') >>> w.url 'https://demo.pygeoapi.io/master' @@ -144,11 +137,9 @@ Pode fechar este dialogo e executar a query. O plugin irá descarregar todos os >>> data = w.query_data('icoads-sst', 'position', coords='POINT(174.7645 -36.8509)', parameter_names=['SST', 'AIRT']) >>> data # dados CoverageJSON ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.edr import EnvironmentalDataRetrieval >>> w = EnvironmentalDataRetrieval('https://demo.pygeoapi.io/master') @@ -164,7 +155,6 @@ Pode fechar este dialogo e executar a query. O plugin irá descarregar todos os >>> data = w.query_data('icoads-sst', 'position', coords='POINT(174.7645 -36.8509)', parameter_names=['SST', 'AIRT']) >>> data # dados CoverageJSON ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-features.md b/workshop/content/docs/publishing/ogcapi-features.md index 9490c8e4..d96bf5e8 100644 --- a/workshop/content/docs/publishing/ogcapi-features.md +++ b/workshop/content/docs/publishing/ogcapi-features.md @@ -93,19 +93,15 @@ For this we need the [pygeoapi-examples GitHub repository](https://github.com/ge === "Linux/Mac" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
=== "Windows (PowerShell)" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
Alternatively, you can [download the repo as a .zip file](https://github.com/geopython/pygeoapi-examples/archive/refs/heads/main.zip) and unzip. @@ -113,21 +109,17 @@ Change into the `docker/elastic` folder and run the `docker-compose.yml` file: === "Linux/Mac" -
```bash cd docker/elastic docker compose up ``` -
=== "Windows (PowerShell)" -
```bash cd docker/elastic docker compose up ``` -
If you experience startup problems, consult the [README file](https://github.com/geopython/pygeoapi-examples/blob/main/docker/elastic/README.md). You may need to adapt your local host system's virtual memory setting. @@ -146,19 +138,15 @@ After this we need to rebuild the Docker image: === "Linux/Mac" -
```bash docker compose build ``` -
=== "Windows (PowerShell)" -
```bash docker compose build ``` -
Next we need to configure pygeoapi by inserting the snippet below into the pygeoapi config file `pygeoapi/docker.config.yml`. This effectively enables publishing the file `greater_hyderabad_municipal_corporation_ward_boundaries.geojson` as OGC API - Features @@ -199,19 +187,15 @@ You can check the logs using: === "Linux/Mac" -
```bash docker compose logs --follow ``` -
=== "Windows (PowerShell)" -
```bash docker compose logs --follow ``` -
After the server has started you can access the collection page here: @@ -280,55 +264,43 @@ QGIS is one of the first GIS Desktop clients which added support for OGC API - F === "Linux/Mac" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
=== "Windows (PowerShell)" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
Check summary information about the layer with: === "Linux/Mac" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs obs -so ``` -
=== "Windows (PowerShell)" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs obs -so ``` -
Now, let's convert the observations into a shapefile === "Linux/Mac" -
```bash ogr2ogr -f "ESRI Shapefile" obs.shp OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
=== "Windows (PowerShell)" -
```bash ogr2ogr -f "ESRI Shapefile" obs.shp OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
!!! Note @@ -345,19 +317,15 @@ QGIS is one of the first GIS Desktop clients which added support for OGC API - F === "Linux/Mac" -
```bash docker pull ghcr.io/osgeo/gdal:alpine-small-latest ``` -
=== "Windows (PowerShell)" -
```bash docker pull ghcr.io/osgeo/gdal:alpine-small-latest ``` -
Then you can run for example OGR command line tools. Base command is `docker run -it --rm ghcr.io/osgeo/gdal:alpine-small-latest`. This runs the Docker container interactively (`-it`) and removes the container on exit (`--rm`). Below are examples. @@ -366,27 +334,22 @@ QGIS is one of the first GIS Desktop clients which added support for OGC API - F === "Linux/Mac" -
```bash docker run -it --rm ghcr.io/osgeo/gdal:alpine-small-latest \ ogrinfo --formats ``` -
=== "Windows (PowerShell)" -
```bash docker run -it --rm ghcr.io/osgeo/gdal:alpine-small-latest ogrinfo --formats ``` -
Get information from a geospatial file. Note the volume mapping: `-v $(pwd)/data:/work` to access local files within the Docker container (commands are single-line, broken up for readability). === "Linux/Mac" -
```bash cd git/workshop/exercises docker run -v $(pwd)/data:/work -it --rm \ @@ -397,11 +360,9 @@ QGIS is one of the first GIS Desktop clients which added support for OGC API - F using driver `GeoJSON' successful. 1: bathingwater-estonia (Point) ``` -
=== "Windows (PowerShell)" -
```bash cd git/workshop/exercises docker run -v ${pwd}/data:/work -it --rm ghcr.io/osgeo/gdal:alpine-small-latest ogrinfo /work/tartu/bathingwater-estonia.geojson @@ -410,49 +371,40 @@ QGIS is one of the first GIS Desktop clients which added support for OGC API - F using driver `GeoJSON' successful. 1: bathingwater-estonia (Point) ``` -
Convert the GeoJSON file to a GeoPackage (GPKG) with `ogr2ogr`: === "Linux/Mac" -
```bash docker run -v $(pwd)/data:/work -it --rm \ ghcr.io/osgeo/gdal:alpine-small-latest \ ogr2ogr -f "GPKG" /work/tartu/bathingwater-estonia.gpkg \ /work/tartu/bathingwater-estonia.geojson ``` -
=== "Windows (PowerShell)" -
```bash docker run -v ${pwd}/data:/work -it --rm ghcr.io/osgeo/gdal:alpine-small-latest ogr2ogr -f "GPKG" /work/tartu/bathingwater-estonia.gpkg /work/tartu/bathingwater-estonia.geojson ``` -
You can also use `ogrinfo` retrieve information about an OGC API - Features collection. In case you are accessing a local collection, you will need to make sure the container runs on the host network: === "Linux/Mac" -
```bash docker run \ --network=host \ ghcr.io/osgeo/gdal:alpine-small-latest \ ogrinfo OAPIF:http://localhost:5000/collections/obs obs -so ``` -
=== "Windows" -
```bash docker run --network=host ghcr.io/osgeo/gdal:alpine-small-latest ogrinfo OAPIF:http://localhost:5000/collections/obs obs -so ``` -
### OWSLib - Advanced @@ -464,37 +416,29 @@ Before continuing, make sure you are in the `workshop/exercises` folder. You wil === "Linux/Mac" -
```bash pwd ``` -
=== "Windows (PowerShell)" -
```bash cd ``` -
Then run a container to start a jupyter notebook, mounting the local folder: === "Linux/Mac" -
```bash docker run -p 8888:8888 -v $(pwd):/home/jovyan/work jupyter/base-notebook ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 8888:8888 -v ${pwd}:/home/jovyan/work jupyter/base-notebook ``` -
Enter the url stated on the command line, `http://127.0.0.1:8888/lab` followed by a token. Enter the `work` folder and open the `features-owslib.ipynb`. @@ -514,25 +458,20 @@ Run through the notebook, to explore an OGC API - Features server, using owslib. === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Then start a Python console session with `python3` (stop the session by typing `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.features import Features >>> w = Features('https://demo.pygeoapi.io/master') @@ -561,11 +500,9 @@ Run through the notebook, to explore an OGC API - Features server, using owslib. >>> lakes_query['features'][0]['properties'] {u'scalerank': 0, u'name_alt': None, u'admin': None, u'featureclass': u'Lake', u'id': 0, u'name': u'Lake Baikal'} ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.features import Features >>> w = Features('https://demo.pygeoapi.io/master') @@ -594,7 +531,6 @@ Run through the notebook, to explore an OGC API - Features server, using owslib. >>> lakes_query['features'][0]['properties'] {u'scalerank': 0, u'name_alt': None, u'admin': None, u'featureclass': u'Lake', u'id': 0, u'name': u'Lake Baikal'} ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-features.pt.md b/workshop/content/docs/publishing/ogcapi-features.pt.md index 4dc61175..3d1df00f 100644 --- a/workshop/content/docs/publishing/ogcapi-features.pt.md +++ b/workshop/content/docs/publishing/ogcapi-features.pt.md @@ -101,19 +101,15 @@ Elasticsearch. Para isso, precisamos do repositório GitHub [pygeoapi-examples]( === "Linux/Mac" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
=== "Windows (PowerShell)" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
Em alternativa, pode [descarregar o repositório como um ficheiro .zip](https://github.com/geopython/pygeoapi-examples/archive/refs/heads/main.zip) e descompactá-lo. @@ -121,21 +117,17 @@ Mude para a pasta `docker/elastic` e execute o ficheiro `docker-compose.yml`: === "Linux/Mac" -
```bash cd docker/elastic docker compose up ``` -
=== "Windows (PowerShell)" -
```bash cd docker/elastic docker compose up ``` -
Se tiver problemas a iniciar os serviços, consulte o [ficheiro README](https://github.com/geopython/pygeoapi-examples/blob/main/docker/elastic/README.md). Pode precisar de @@ -157,19 +149,15 @@ Depois disto, precisamos de reconstruir a imagem Docker: === "Linux/Mac" -
```bash docker compose build ``` -
=== "Windows (PowerShell)" -
```bash docker compose build ``` -
A seguir, precisamos de configurar a pygeoapi inserindo o excerto abaixo no ficheiro de configuração da pygeoapi `pygeoapi/docker.config.yml`. Esta modificação resulta na publicação do @@ -211,19 +199,15 @@ o índice do Elasticsearch tenha sido construído. Pode verificar os registos us === "Linux/Mac" -
```bash docker compose logs --follow ``` -
=== "Windows (PowerShell)" -
```bash docker compose logs --follow ``` -
Depois do servidor ter arrancado, pode aceder à página da coleção aqui: @@ -303,55 +287,43 @@ Manifold, FME, ArcGIS, etc. === "Linux/Mac" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
=== "Windows (PowerShell)" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
Verifique as informações de resumo sobre o layer com: === "Linux/Mac" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs obs -so ``` -
=== "Windows (PowerShell)" -
```bash ogrinfo OAPIF:https://demo.pygeoapi.io/master/collections/obs obs -so ``` -
Agora, vamos converter as observações para uma shapefile === "Linux/Mac" -
```bash ogr2ogr -f "ESRI Shapefile" obs.shp OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
=== "Windows (PowerShell)" -
```bash ogr2ogr -f "ESRI Shapefile" obs.shp OAPIF:https://demo.pygeoapi.io/master/collections/obs ``` -
!!! Note @@ -371,19 +343,15 @@ Manifold, FME, ArcGIS, etc. === "Linux/Mac" -
```bash docker pull ghcr.io/osgeo/gdal:alpine-small-latest ``` -
=== "Windows (PowerShell)" -
```bash docker pull ghcr.io/osgeo/gdal:alpine-small-latest ``` -
Depois pode executar, por exemplo, as ferramentas de linha de comandos do OGR. O comando base é `docker run -it --rm ghcr.io/osgeo/gdal:alpine-small-latest`. Isto executa um contentor Docker interativamente (`-it`) e @@ -393,20 +361,16 @@ Manifold, FME, ArcGIS, etc. === "Linux/Mac" -
```bash docker run -it --rm ghcr.io/osgeo/gdal:alpine-small-latest \ ogrinfo --formats ``` -
=== "Windows (PowerShell)" -
```bash docker run -it --rm ghcr.io/osgeo/gdal:alpine-small-latest ogrinfo --formats ``` -
Obter informação sobre um ficheiro geoespacial. Note o mapeamento de volumes: `-v $(pwd)/data:/work` para aceder a ficheiros locais dentro do container de Docker (os comandos estão numa única linha, quebrados para facilitar @@ -414,7 +378,6 @@ Manifold, FME, ArcGIS, etc. === "Linux/Mac" -
```bash cd git/workshop/exercises docker run -v $(pwd)/data:/work -it --rm \ @@ -425,11 +388,9 @@ Manifold, FME, ArcGIS, etc. using driver `GeoJSON' successful. 1: bathingwater-estonia (Point) ``` -
=== "Windows (PowerShell)" -
```bash cd git/workshop/exercises docker run -v ${pwd}/data:/work -it --rm ghcr.io/osgeo/gdal:alpine-small-latest ogrinfo /work/tartu/bathingwater-estonia.geojson @@ -438,50 +399,41 @@ Manifold, FME, ArcGIS, etc. using driver `GeoJSON' successful. 1: bathingwater-estonia (Point) ``` -
Converter o ficheiro GeoJSON para um GeoPackage (GPKG) com `ogr2ogr`: === "Linux/Mac" -
```bash docker run -v $(pwd)/data:/work -it --rm \ ghcr.io/osgeo/gdal:alpine-small-latest \ ogr2ogr -f "GPKG" /work/tartu/bathingwater-estonia.gpkg \ /work/tartu/bathingwater-estonia.geojson ``` -
=== "Windows (PowerShell)" -
```bash docker run -v ${pwd}/data:/work -it --rm ghcr.io/osgeo/gdal:alpine-small-latest ogr2ogr -f "GPKG" /work/tartu/bathingwater-estonia.gpkg /work/tartu/bathingwater-estonia.geojson ``` -
Também pode usar o `ogrinfo` para obter informações sobre uma coleção da OGC API - Features. Caso esteja a aceder a uma coleção local, terá de se certificar de que o contentor é executado na rede do anfitrião (host): === "Linux/Mac" -
```bash docker run \ --network=host \ ghcr.io/osgeo/gdal:alpine-small-latest \ ogrinfo OAPIF:http://localhost:5000/collections/obs obs -so ``` -
=== "Windows" -
```bash docker run --network=host ghcr.io/osgeo/gdal:alpine-small-latest ogrinfo OAPIF:http://localhost:5000/collections/obs obs -so ``` -
### OWSLib - Avançado @@ -496,37 +448,29 @@ jupyter notebook. === "Linux/Mac" -
```bash pwd ``` -
=== "Windows (PowerShell)" -
```bash cd ``` -
Depois use o docker para iniciar um contentor com o jupyter notebook, montando também a pasta local como um volume: === "Linux/Mac" -
```bash docker run -p 8888:8888 -v $(pwd):/home/jovyan/work jupyter/base-notebook ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 8888:8888 -v ${pwd}:/home/jovyan/work jupyter/base-notebook ``` -
Introduza o url indicado na linha de comandos, `http://127.0.0.1:8888/lab` seguido de um token. Entre na pasta `work` e abra o `features-owslib.ipynb`. @@ -549,25 +493,20 @@ Execute o notebook para explorar um servidor OGC API - Features, usando a owslib === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Depois, inicie uma sessão de consola Python com `python3` (pare a sessão escrevendo `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.features import Features >>> w = Features('https://demo.pygeoapi.io/master') @@ -596,11 +535,9 @@ Execute o notebook para explorar um servidor OGC API - Features, usando a owslib >>> lakes_query['features'][0]['properties'] {u'scalerank': 0, u'name_alt': None, u'admin': None, u'featureclass': u'Lake', u'id': 0, u'name': u'Lake Baikal'} ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.features import Features >>> w = Features('https://demo.pygeoapi.io/master') @@ -637,4 +574,4 @@ Execute o notebook para explorar um servidor OGC API - Features, usando a owslib # Resumo -Parabéns! Agora é capaz de publicar dados vetoriais com a pygeoapi. \ No newline at end of file +Parabéns! Agora é capaz de publicar dados vetoriais com a pygeoapi. diff --git a/workshop/content/docs/publishing/ogcapi-maps.md b/workshop/content/docs/publishing/ogcapi-maps.md index 887bd40f..21f5fad5 100644 --- a/workshop/content/docs/publishing/ogcapi-maps.md +++ b/workshop/content/docs/publishing/ogcapi-maps.md @@ -94,25 +94,20 @@ QGIS added support for API's providing rendered image layers via its raster supp === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Now running in Python: === "Linux/Mac" -
```python >>> from owslib.ogcapi.maps import Maps >>> m = Maps('http://localhost:5000') @@ -120,11 +115,9 @@ QGIS added support for API's providing rendered image layers via its raster supp >>> with open("output.png", "wb") as fh: ... fh.write(data.getbuffer()) ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.maps import Maps >>> m = Maps('http://localhost:5000') @@ -132,7 +125,6 @@ QGIS added support for API's providing rendered image layers via its raster supp >>> with open("output.png", "wb") as fh: ... fh.write(data.getbuffer()) ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-maps.pt.md b/workshop/content/docs/publishing/ogcapi-maps.pt.md index f5d37716..8704b6cd 100644 --- a/workshop/content/docs/publishing/ogcapi-maps.pt.md +++ b/workshop/content/docs/publishing/ogcapi-maps.pt.md @@ -93,25 +93,20 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Para executar em Python: === "Linux/Mac" -
```python >>> from owslib.ogcapi.maps import Maps >>> m = Maps('http://localhost:5000') @@ -119,11 +114,9 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi >>> with open("output.png", "wb") as fh: ... fh.write(data.getbuffer()) ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.maps import Maps >>> m = Maps('http://localhost:5000') @@ -131,7 +124,6 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi >>> with open("output.png", "wb") as fh: ... fh.write(data.getbuffer()) ``` -
!!! note @@ -139,4 +131,4 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi # Resumo -Parabéns! Agora é capaz de servir um OGC WMS através da pygeoapi e da OGC API - Maps. \ No newline at end of file +Parabéns! Agora é capaz de servir um OGC WMS através da pygeoapi e da OGC API - Maps. diff --git a/workshop/content/docs/publishing/ogcapi-records.md b/workshop/content/docs/publishing/ogcapi-records.md index af0d0da8..00eea01b 100644 --- a/workshop/content/docs/publishing/ogcapi-records.md +++ b/workshop/content/docs/publishing/ogcapi-records.md @@ -71,19 +71,15 @@ develop your own custom pygeoapi plugin, or convert your metadata to OGC API - R === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
### Sample ISO 19139 to TinyDBCatalogue loader @@ -91,23 +87,19 @@ It is possible to load more example ISO19139 metadata in a TinyDB database with === "Linux/Mac" -
```bash cd workshop/exercises/data/tartu/metadata curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py xml catalogue.tinydb ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises/data/tartu/metadata curl https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py xml catalogue.tinydb ``` -
If you do not have curl installed, copy the URL above to your web browser and save locally. @@ -117,7 +109,6 @@ If you do not have Python installed, you can the loader by using the OWSLib Dock === "Linux/Mac" -
```bash cd workshop/exercises docker run -it --rm --network=host --name owslib -v $(pwd)/data:/data python:3.10-slim /bin/bash @@ -126,11 +117,9 @@ If you do not have Python installed, you can the loader by using the OWSLib Dock curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py /data/tartu/metadata/xml /data/tartu/metadata/catalogue.tinydb ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises docker run -it --rm --network=host --name owslib -v ${pwd}/data:/data python:3.10-slim /bin/bash @@ -139,7 +128,6 @@ If you do not have Python installed, you can the loader by using the OWSLib Dock curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py /data/tartu/metadata/xml /data/tartu/metadata/catalogue.tinydb ``` -
Navigate to to evaluate whether the new metadata has been published to the collection. @@ -156,21 +144,17 @@ to the collection. === "Linux/Mac" -
```bash pip3 install pygeometa pygeometa --help ``` -
=== "Windows (PowerShell)" -
```bash pip3 install pygeometa pygeometa --help ``` -
## pygeoapi as a CSW proxy @@ -208,25 +192,20 @@ QGIS supports OGC API - Records via the [MetaSearch plugin](https://docs.qgis.or === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Then start a Python console session with `python3` (stop the session by typing `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.records import Records >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -249,11 +228,9 @@ QGIS supports OGC API - Records via the [MetaSearch plugin](https://docs.qgis.or >>> dutch_metacat_query['numberMatched'] 2 ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.records import Records >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -276,7 +253,6 @@ QGIS supports OGC API - Records via the [MetaSearch plugin](https://docs.qgis.or >>> dutch_metacat_query['numberMatched'] 2 ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-records.pt.md b/workshop/content/docs/publishing/ogcapi-records.pt.md index 5581fcfd..ee4e90ee 100644 --- a/workshop/content/docs/publishing/ogcapi-records.pt.md +++ b/workshop/content/docs/publishing/ogcapi-records.pt.md @@ -70,19 +70,15 @@ Por defeito, a pygeoapi suporta e espera o modelo de records e os "queryables" d === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
### Exemplo de loader de ISO 19139 para TinyDBCatalogue @@ -90,23 +86,19 @@ Por defeito, a pygeoapi suporta e espera o modelo de records e os "queryables" d === "Linux/Mac" -
```bash cd workshop/exercises/data/tartu/metadata curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py xml catalogue.tinydb ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises/data/tartu/metadata curl https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py xml catalogue.tinydb ``` -
Se não tiver o curl instalado, copie o URL acima para o seu navegador web e guarde localmente. @@ -116,7 +108,6 @@ Se não tiver o Python instalado, pode usar o loader utilizando o container Dock === "Linux/Mac" -
```bash cd workshop/exercises docker run -it --rm --network=host --name owslib -v $(pwd)/data:/data python:3.10-slim /bin/bash @@ -125,11 +116,9 @@ Se não tiver o Python instalado, pode usar o loader utilizando o container Dock curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py /data/tartu/metadata/xml /data/tartu/metadata/catalogue.tinydb ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises docker run -it --rm --network=host --name owslib -v ${pwd}/data:/data python:3.10-slim /bin/bash @@ -138,7 +127,6 @@ Se não tiver o Python instalado, pode usar o loader utilizando o container Dock curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/tests/load_tinydb_records.py python3 load_tinydb_records.py /data/tartu/metadata/xml /data/tartu/metadata/catalogue.tinydb ``` -
Navegue para para avaliar se os novos metadados foram publicados na coleção. @@ -155,21 +143,17 @@ na coleção. === "Linux/Mac" -
```bash pip3 install pygeometa pygeometa --help ``` -
=== "Windows (PowerShell)" -
```bash pip3 install pygeometa pygeometa --help ``` -
## A pygeoapi como um proxy de CSW @@ -209,25 +193,20 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi === "Linux/Mac" -
```bash pip3 install owslib ``` -
=== "Windows (PowerShell)" -
```bash pip3 install owslib ``` -
Depois, inicie uma sessão de consola Python com `python3` (pare a sessão escrevendo `exit()`). === "Linux/Mac" -
```python >>> from owslib.ogcapi.records import Records >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -250,11 +229,9 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi >>> dutch_metacat_query['numberMatched'] 2 ``` -
=== "Windows (PowerShell)" -
```python >>> from owslib.ogcapi.records import Records >>> SERVICE_URL = 'https://demo.pygeoapi.io/master/' @@ -277,7 +254,6 @@ A [OWSLib](https://owslib.readthedocs.io) é uma biblioteca Python para interagi >>> dutch_metacat_query['numberMatched'] 2 ``` -
!!! note diff --git a/workshop/content/docs/publishing/ogcapi-tiles.md b/workshop/content/docs/publishing/ogcapi-tiles.md index 10f3c083..a69d0e62 100644 --- a/workshop/content/docs/publishing/ogcapi-tiles.md +++ b/workshop/content/docs/publishing/ogcapi-tiles.md @@ -45,18 +45,15 @@ Let's generate the tiles as the first step using tippecanoe: === "Linux/Mac" -
```bash cd workshop/exercises docker run -it --rm -v $(pwd)/data:/data emotionalcities/tippecanoe \ tippecanoe -r1 -pk -pf --output-to-directory=/data/tiles/ --force --maximum-zoom=16 \ --extend-zooms-if-still-dropping --no-tile-compression /data/hyderabad/greater_hyderabad_municipal_corporation_ward_Boundaries.geojson ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises docker run -it --rm -v ${pwd}/data:/data emotionalcities/tippecanoe tippecanoe -r1 -pk -pf --output-to-directory=/data/tiles/ --force --maximum-zoom=16 --extend-zooms-if-still-dropping --no-tile-compression /data/hyderabad/greater_hyderabad_municipal_corporation_ward_Boundaries.geojson @@ -126,36 +123,28 @@ If you want to explore publishing vector tiles using Elasticsearch clone [pygeoa === "Linux/Mac" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
=== "Windows (PowerShell)" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
Then change into the `docker/mvt-elastic` folder: === "Linux/Mac" -
```bash cd docker/mvt-elastic ``` -
=== "Windows (PowerShell)" -
```bash cd docker/mvt-elastic ``` -
Edit the `add-data.sh` script on the `ES` folder, adding these two lines before the end: @@ -170,19 +159,15 @@ Above we are downloading the `greater_hyderabad_municipal_corporation_ward_Bound === "Linux/Mac" -
```bash docker compose build ``` -
=== "Windows (PowerShell)" -
```bash docker compose build ``` -
Edit the `docker.config.yml` configuration on the `pygeoapi` folder, adding this code block before the end: @@ -236,19 +221,15 @@ Finally start the docker composition, which will download and ingest the dataset === "Linux/Mac" -
```bash docker compose up ``` -
=== "Windows (PowerShell)" -
```bash docker compose up ``` -
!!! note @@ -367,19 +348,15 @@ In this example, the colors of the symbols reflect the value of the `objectid` a === "Linux/Mac" -
```bash git clone -b ogcapi-ws https://github.com/emotional-cities/vtiles-example.git ``` -
=== "Windows (PowerShell)" -
```bash git clone -b ogcapi-ws https://github.com/emotional-cities/vtiles-example.git ``` -
![](../assets/images/leaflet-hyderabad2.png){ width=100% } diff --git a/workshop/content/docs/publishing/ogcapi-tiles.pt.md b/workshop/content/docs/publishing/ogcapi-tiles.pt.md index 161a4778..753a4f07 100644 --- a/workshop/content/docs/publishing/ogcapi-tiles.pt.md +++ b/workshop/content/docs/publishing/ogcapi-tiles.pt.md @@ -45,23 +45,19 @@ Como primeiro passo vamos gerar as tiles, usando o tippecanoe: === "Linux/Mac" -
```bash cd workshop/exercises docker run -it --rm -v $(pwd)/data:/data emotionalcities/tippecanoe \ tippecanoe -r1 -pk -pf --output-to-directory=/data/tiles/ --force --maximum-zoom=16 \ --extend-zooms-if-still-dropping --no-tile-compression /data/hyderabad/greater_hyderabad_municipal_corporation_ward_Boundaries.geojson ``` -
=== "Windows (PowerShell)" -
```bash cd workshop/exercises docker run -it --rm -v ${pwd}/data:/data emotionalcities/tippecanoe tippecanoe -r1 -pk -pf --output-to-directory=/data/tiles/ --force --maximum-zoom=16 --extend-zooms-if-still-dropping --no-tile-compression /data/hyderabad/greater_hyderabad_municipal_corporation_ward_Boundaries.geojson ``` -
!!! note Por favor, note que a ferramenta tippecanoe requer que o ficheiro de entrada esteja em WGS84, e produz sempre tiles em WebMercator. @@ -126,36 +122,29 @@ Se quiser explorar a publicação de tiles vetoriais usando o Elasticsearch, clo === "Linux/Mac" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
=== "Windows (PowerShell)" -
```bash git clone https://github.com/geopython/pygeoapi-examples.git ``` -
+ Depois, mude para a pasta `docker/mvt-elastic`: === "Linux/Mac" -
```bash cd docker/mvt-elastic ``` -
=== "Windows (PowerShell)" -
```bash cd docker/mvt-elastic ``` -
Edite o script `add-data.sh` na pasta `ES`, adicionando estas duas linhas antes do fim: @@ -170,19 +159,15 @@ Acima, estamos a descarregar o `greater_hyderabad_municipal_corporation_ward_Bou === "Linux/Mac" -
```bash docker compose build ``` -
=== "Windows (PowerShell)" -
```bash docker compose build ``` -
Edite a configuração `docker.config.yml` na pasta `pygeoapi`, adicionando este bloco de código antes do fim: @@ -236,19 +221,15 @@ Finalmente, inicie a composição docker, que irá descarregar e ingerir o conju === "Linux/Mac" -
```bash docker compose up ``` -
=== "Windows (PowerShell)" -
```bash docker compose up ``` -
!!! note @@ -367,19 +348,15 @@ Neste exemplo, as cores dos símbolos refletem o valor do atributo `objectid`. === "Linux/Mac" -
```bash git clone -b ogcapi-ws https://github.com/emotional-cities/vtiles-example.git ``` -
=== "Windows (PowerShell)" -
```bash git clone -b ogcapi-ws https://github.com/emotional-cities/vtiles-example.git ``` -
![](../assets/images/leaflet-hyderabad2.png){ width=100% } @@ -404,4 +381,4 @@ O [OpenLayers](https://openlayers.org) é uma biblioteca JavaScript popular para # Resumo -Parabéns! Agora é capaz de publicar tiles na pygeoapi. Pode aprender mais sobre este Standard em: \ No newline at end of file +Parabéns! Agora é capaz de publicar tiles na pygeoapi. Pode aprender mais sobre este Standard em: diff --git a/workshop/content/docs/setup.md b/workshop/content/docs/setup.md index 38f9d4cd..8646c608 100644 --- a/workshop/content/docs/setup.md +++ b/workshop/content/docs/setup.md @@ -93,7 +93,6 @@ If all goes well, you should be able to run Docker from the command line as foll === "Linux/Mac" -
```bash docker version Docker version 20.10.17, build 100c701 @@ -101,11 +100,9 @@ If all goes well, you should be able to run Docker from the command line as foll docker compose version Docker Compose version v2.6.1 ``` -
=== "Windows (PowerShell)" -
```bash docker version Docker version 20.10.17, build 100c701 @@ -113,7 +110,6 @@ If all goes well, you should be able to run Docker from the command line as foll docker compose version Docker Compose version v2.6.1 ``` -
(It is not required that your version numbers exactly match). @@ -131,7 +127,6 @@ Open a terminal session and run: === "Linux/Mac" -
```bash docker run --rm -p 5000:80 geopython/pygeoapi:latest Unable to find image 'geopython/pygeoapi:latest' locally @@ -160,11 +155,9 @@ Open a terminal session and run: [2022-08-09 12:59:00 +0000] [21] [INFO] Booting worker with pid: 21 [2022-08-09 12:59:00 +0000] [22] [INFO] Booting worker with pid: 22 ``` -
=== "Windows (PowerShell)" -
```bash docker run --rm -p 5000:80 geopython/pygeoapi:latest Unable to find image 'geopython/pygeoapi:latest' locally @@ -193,7 +186,6 @@ Open a terminal session and run: [2022-08-09 12:59:00 +0000] [21] [INFO] Booting worker with pid: 21 [2022-08-09 12:59:00 +0000] [22] [INFO] Booting worker with pid: 22 ``` -
That's all! Open your browser and navigate to `http://localhost:5000`, the pygeoapi page will display. @@ -223,19 +215,15 @@ within the container by a local file which you can edit in your favourite text e === "Linux/Mac" -
```bash curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/docker/default.config.yml ``` -
=== "Windows (PowerShell)" -
```bash curl https://raw.githubusercontent.com/geopython/pygeoapi/master/docker/default.config.yml ``` -
Open the file in your favourite text editor and change the title and description of the API: @@ -250,21 +238,17 @@ within the container by a local file which you can edit in your favourite text e === "Linux/Mac" -
```bash docker run -p 5000:80 \ -v $(pwd)/default.config.yml:/pygeoapi/local.config.yml \ geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -v ${pwd}/default.config.yml:/pygeoapi/local.config.yml geopython/pygeoapi:latest ``` -
At this point, navigate to `http://localhost:5000` to verify the new title and description. @@ -290,7 +274,6 @@ Below is an example where the configuration is explicitly set to `pygeoapi-confi === "Linux/Mac" -
```bash docker run -p 5000:80 \ -v $(pwd)/data:/pygeoapi/mydata \ @@ -298,15 +281,12 @@ Below is an example where the configuration is explicitly set to `pygeoapi-confi -e PYGEOAPI_CONFIG=/pygeoapi/pygeoapi-config.yml \ geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -v ${pwd}/data:/pygeoapi/mydata -v ${pwd}/default.config.yml:/pygeoapi/pygeoapi-config.yml -e PYGEOAPI_CONFIG=/pygeoapi/pygeoapi-config.yml geopython/pygeoapi:latest ``` -
In the next sections we will review additional examples of mounts to the data folder. More Docker deployment examples can be found in the [pygeoapi GitHub repository](https://github.com/geopython/pygeoapi/tree/master/docker/examples). @@ -331,7 +311,6 @@ Below is a complete example, assuming pygeoapi runs on your `localhost` at port === "Linux/Mac" -
```bash docker run -it --rm --network=host --name owslib python:3.10-slim /bin/bash Unable to find image 'python:3.10-slim' locally @@ -355,11 +334,9 @@ Below is a complete example, assuming pygeoapi runs on your `localhost` at port etc ``` -
=== "Windows (PowerShell)" -
```bash docker run -it --rm --network=host --name owslib python:3.10-slim /bin/bash Unable to find image 'python:3.10-slim' locally @@ -383,6 +360,5 @@ Below is a complete example, assuming pygeoapi runs on your `localhost` at port etc ``` -
We will refer to this installation in some of the Exercises where OWSLib is used. diff --git a/workshop/content/docs/setup.pt.md b/workshop/content/docs/setup.pt.md index 8a1c938a..37784542 100644 --- a/workshop/content/docs/setup.pt.md +++ b/workshop/content/docs/setup.pt.md @@ -78,7 +78,6 @@ Se tudo correr bem, deverá conseguir executar o Docker a partir da linha de com === "Linux/Mac" -
```bash docker version Docker version 20.10.17, build 100c701 @@ -86,11 +85,9 @@ Se tudo correr bem, deverá conseguir executar o Docker a partir da linha de com docker compose version Docker Compose version v2.6.1 ``` -
=== "Windows (PowerShell)" -
```bash docker version Docker version 20.10.17, build 100c701 @@ -98,7 +95,6 @@ Se tudo correr bem, deverá conseguir executar o Docker a partir da linha de com docker compose version Docker Compose version v2.6.1 ``` -
(Não é necessário que os números da sua versão correspondam exatamente). [^2]: Para versões recentes do Docker, execute `docker compose version` @@ -114,7 +110,6 @@ Abra uma sessão de terminal e execute: === "Linux/Mac" -
```bash docker run --rm -p 5000:80 geopython/pygeoapi:latest Unable to find image 'geopython/pygeoapi:latest' locally @@ -143,11 +138,9 @@ Abra uma sessão de terminal e execute: [2022-08-09 12:59:00 +0000] [21] [INFO] Booting worker with pid: 21 [2022-08-09 12:59:00 +0000] [22] [INFO] Booting worker with pid: 22 ``` -
=== "Windows (PowerShell)" -
```bash docker run --rm -p 5000:80 geopython/pygeoapi:latest Unable to find image 'geopython/pygeoapi:latest' locally @@ -176,7 +169,6 @@ Abra uma sessão de terminal e execute: [2022-08-09 12:59:00 +0000] [21] [INFO] Booting worker with pid: 21 [2022-08-09 12:59:00 +0000] [22] [INFO] Booting worker with pid: 22 ``` -
É tudo! Abra o seu navegador e navegue para `http://localhost:5000`, a página da pygeoapi será exibida. @@ -204,19 +196,15 @@ Para facilitar o desenvolvimento, vamos substituir a configuração da pygeoapi === "Linux/Mac" -
```bash curl -O https://raw.githubusercontent.com/geopython/pygeoapi/master/docker/default.config.yml ``` -
=== "Windows (PowerShell)" -
```bash curl https://raw.githubusercontent.com/geopython/pygeoapi/master/docker/default.config.yml ``` -
Abra o ficheiro no seu editor de texto favorito e altere o título e a descrição da API: @@ -231,21 +219,17 @@ Para facilitar o desenvolvimento, vamos substituir a configuração da pygeoapi === "Linux/Mac" -
```bash docker run -p 5000:80 \ -v $(pwd)/default.config.yml:/pygeoapi/local.config.yml \ geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -v ${pwd}/default.config.yml:/pygeoapi/local.config.yml geopython/pygeoapi:latest ``` -
Neste ponto, navegue para `http://localhost:5000` para verificar o novo título e descrição. @@ -269,7 +253,6 @@ Abaixo está um exemplo onde a configuração é explicitamente definida para `p === "Linux/Mac" -
```bash docker run -p 5000:80 \ -v $(pwd)/data:/pygeoapi/mydata \ @@ -277,15 +260,12 @@ Abaixo está um exemplo onde a configuração é explicitamente definida para `p -e PYGEOAPI_CONFIG=/pygeoapi/pygeoapi-config.yml \ geopython/pygeoapi:latest ``` -
=== "Windows (PowerShell)" -
```bash docker run -p 5000:80 -v ${pwd}/data:/pygeoapi/mydata -v ${pwd}/default.config.yml:/pygeoapi/pygeoapi-config.yml -e PYGEOAPI_CONFIG=/pygeoapi/pygeoapi-config.yml geopython/pygeoapi:latest ``` -
Nas próximas secções, analisaremos exemplos adicionais de montagens na pasta de dados. Mais exemplos de implementação do Docker podem ser encontrados no [repositório GitHub da pygeoapi](https://github.com/geopython/pygeoapi/tree/master/docker/examples). @@ -303,7 +283,6 @@ Abaixo está um exemplo completo, assumindo que a pygeoapi está a ser executada === "Linux/Mac" -
```bash docker run -it --rm --network=host --name owslib python:3.10-slim /bin/bash Unable to find image 'python:3.10-slim' locally @@ -327,11 +306,9 @@ Abaixo está um exemplo completo, assumindo que a pygeoapi está a ser executada etc ``` -
=== "Windows (PowerShell)" -
```bash docker run -it --rm --network=host --name owslib python:3.10-slim /bin/bash Unable to find image 'python:3.10-slim' locally @@ -355,6 +332,5 @@ Abaixo está um exemplo completo, assumindo que a pygeoapi está a ser executada etc ``` -
-Faremos referência a esta instalação em alguns dos Exercícios onde a OWSLib é utilizada. \ No newline at end of file +Faremos referência a esta instalação em alguns dos Exercícios onde a OWSLib é utilizada. diff --git a/workshop/content/zensical.toml b/workshop/content/zensical.toml index d79da0c1..20a40d23 100644 --- a/workshop/content/zensical.toml +++ b/workshop/content/zensical.toml @@ -104,9 +104,6 @@ features = [ [project.extra] homepage = "https://dive.pygeoapi.io" -[plugins.termynal] -enabled = true - default_language = "en" languages = ["en", "pt"] generate_language_paths = true From bb6ec0d2ab03bd160fe3ad53fd3b5ee6b405aaeb Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Mon, 9 Mar 2026 10:30:56 -0400 Subject: [PATCH 3/3] match pygeoapi theming --- workshop/content/docs/assets/stylesheets/pygeoapi.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workshop/content/docs/assets/stylesheets/pygeoapi.css b/workshop/content/docs/assets/stylesheets/pygeoapi.css index 9deaf9be..f19e2e75 100644 --- a/workshop/content/docs/assets/stylesheets/pygeoapi.css +++ b/workshop/content/docs/assets/stylesheets/pygeoapi.css @@ -4,5 +4,5 @@ --md-primary-fg-color--dark: #004067; } .md-header, .md-footer { - background-color: #000000; + background-color: #1E6BA1; }