From e73eb07815232470e2d47dfaf50a32ac3415d7d7 Mon Sep 17 00:00:00 2001 From: Andres Chamorro Date: Wed, 16 Oct 2024 19:03:09 -0400 Subject: [PATCH] revert to original ghpages workflow --- .github/workflows/gh-pages.yml | 43 +++++++++++++--------------------- docs/ais/ais_emissions.md | 8 +++---- 2 files changed, 20 insertions(+), 31 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 30b16b1..a836375 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,42 +1,31 @@ name: Publish to GitHub Pages + on: push: branches: - main jobs: - build-book: + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v2 with: - python-version: 3.11 - cache: "pip" - - name: Install Dependencies + python-version: "3.9" + architecture: "x64" + - name: Install dependencies run: | - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - if [ -f pyproject.toml ]; then pip install ".[docs]"; fi - - name: Build Juputer Book Documentation + if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi + - name: Build run: | - jupyter-book build . --config docs/_config.yml --toc docs/_toc.yml - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + jupyter-book build docs + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/main' && job.status == 'success' with: - path: "_build/html" - - deploy-book: - needs: build-book - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_build/html + enable_jekyll: false \ No newline at end of file diff --git a/docs/ais/ais_emissions.md b/docs/ais/ais_emissions.md index 8e92078..7c29708 100644 --- a/docs/ais/ais_emissions.md +++ b/docs/ais/ais_emissions.md @@ -15,7 +15,7 @@ Black carbon (BC) can either be energy- or fuel-based depending on the fuel type Energy{-}Based\ Emission_{GHG} = \sum_E \sum_i EF_{E,GHG} \cdot P_{E,i} \cdot LCF_{E,i,GHG} ``` ```{math} -:label: my_label +:label: my_label1 Energy{-}Based\ Emission_{GHG} = \sum_E \sum_i EF_{E,GHG} \cdot P_{E,i} \cdot LCF_{E,i,GHG} ``` @@ -35,11 +35,11 @@ Each of the components of equations (1) and (2) are collected data by the IMO fr Power demanded is the power required to operate a vessel at a given speed and displacement. In the GHG study, the power demanded by the main engine is a function of the vessel’s speed and draught at any given hour. Power demanded is expressed as the product of engine load and maximum power, where engine load is derived from the admiralty formula including correction factors (CF). The correction factors are meant to increase the engine load due to weather and hull fouling, and to decrease the engine load for some large vessels where maximum speed corresponds to a lower engine load. ```{math} -:label: my_label +:label: my_label2 P_i = Load_i \times P_{max} ``` ```{math} -:label: my_label +:label: my_label3 Load_i = \left( \frac{draught_i}{draught_{design}} \right)^{\frac{2}{3}} \times \left( \frac{speed_i}{speed_{max}} \right)^3 \times CF ``` @@ -58,7 +58,7 @@ Per the GHG study, engines that operate at engine load less than 20% have lower Power demanded is converted to fuel consumption using a baseline specific fuel consumption (SFC) adjusted by the load correction factor (LCF). The baseline SFC is a fixed value that varies across engine type, fuel type, and year of built. The load correction factor (LCF) is a parabolic function that results in high values for both low and high inputs of engine load, and low values with engine load near 80%. LCF is only applied for oil and LNG engines for the main engine. ```{math} -:label: my_label +:label: my_label4 SFC_{E,i} = P_{E,i} SFC_{base} LCF_{i} ```