Commit 38fdff89 authored by Yunus Sevinchan's avatar Yunus Sevinchan
Browse files

Merge branch 'fix-failing-docs' into 'master'

Do not deploy to pages if the docs:build job fails

See merge request !293
parents 407412d2 f7f5fbe9
Loading
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ variables:
  UPDATE_UTOPIA_BASE_IMAGE: "false"
  DEPLOY_DOCKER_IMAGE: "false"
  DEPLOY_DOCS: "false"
  FORCE_DEPLOY_DOCS: "false"


# Run pipelines:
@@ -513,12 +514,12 @@ test:link_install_tree:
# Build the documentation and expose it as a review environment
docs:build:
  stage: docs
  allow_failure: true
  when: always
  extends:
    - .use_multicore_group_runners
  needs:
    - build:models
  when: always
  allow_failure: false
  before_script:
    - cd build
    - cmake ..
@@ -553,7 +554,8 @@ docs:build:
#   - a documentation review environment, which is meant to *always* be created
#     even if the build:docs job failed with allow_failure set.
#   - the production-level documentation by running a GitLab Pages job, which
#     ends up being served under docs.utopia-project.org
#     ends up being served under docs.utopia-project.org — this will only be
#     deployed if the docs:build was successful
#   - the latest Utopia docker image to Docker Hub: ccees/utopia:latest


@@ -577,10 +579,12 @@ pages:
  image: alpine
  stage: deploy
  rules:
    - if: '$DEPLOY_DOCS == "true"'
    - if: '$FORCE_DEPLOY_DOCS == "true"'
      when: always
    - if: '$DEPLOY_DOCS == "true"'
      when: on_success
    - if: '$CI_COMMIT_BRANCH == "master"'
      when: always
      when: on_success
    - when: never
  needs:
    - docs:build
+42 −15
Original line number Diff line number Diff line
@@ -21,6 +21,9 @@ _default_style: &default_style
    mathtext.fontset: stix
    font.family: serif




# -----------------------------------------------------------------------------

.flush_kind:
@@ -31,6 +34,9 @@ _default_style: &default_style
.flush_helper:
  helpers: ~




# -----------------------------------------------------------------------------
# Demonstrates a line plot with errorbars
### Start --- errorbars
@@ -88,12 +94,14 @@ errorbars:
### End --- errorbars
  <<: *default_style


# Demonstrates a line plot with errorbands
errorbands:
  based_on:
    - errorbars
    - .plot.facet_grid.errorbands


# Demonstrates a stacked line plot
stacked_transmission:
  based_on:
@@ -121,6 +129,7 @@ stacked_transmission:
    set_title:
      title: Density of infected agents


# Demonstrates a stacked averaged line plot
stacked_transmission_averaged:
  based_on:
@@ -152,6 +161,7 @@ stacked_transmission_averaged:
    set_title:
      title: Density of agent kinds


# Demonstrates a stacked line plot with errorbands
### Start --- stacked_errorbands
stacked_errorbands:
@@ -205,6 +215,7 @@ stacked_errorbands:
    axes.prop_cycle: cycler('color', ['#AFD8BC', '#FFCC66', '#006666' ])
### End --- stacked_errorbands


# Demonstrates a facet grid plot errorbands
### Start --- facet_grid
panel_errorbands:
@@ -252,6 +263,7 @@ panel_errorbands:
    font.family: serif
### End --- facet_grid


# Demonstrates a facet grid of stacked line plots with errorbands
panel_all:
  based_on:
@@ -275,6 +287,7 @@ panel_all:
    set_limits:
      y: [ 0, 0.6 ]


# Demonstrates subspace selection
panel_subspace:
  based_on: panel_all
@@ -292,6 +305,7 @@ panel_subspace:
    set_limits:
      y: [ 0, 0.6 ]


# Demonstrates a histogram plot
### Start --- histogram
histogram:
@@ -330,6 +344,7 @@ histogram:
    mathtext.fontset: stix
    font.family: serif


### Start --- double_histogram
double_histogram:
  based_on:
@@ -385,6 +400,7 @@ double_histogram:
      sharex: true
### End --- double_histogram


# Demonstrates a facet grid 2d scatter plot
### Start --- scatter_2d_facet
scatter_2d_facet:
@@ -436,6 +452,7 @@ scatter_2d_facet:
### End --- scatter_2d_facet
  <<: *default_style


# Demonstrates a facet grid 3d scatter plot
scatter_3d:
  based_on:
@@ -486,8 +503,8 @@ scatter_3d:
      y:
        major: [0, 0.05, 0.1]

single_kdeplot:

single_kdeplot:
  based_on:
    - .creator.multiverse
    - .plot.multiplot
@@ -533,6 +550,7 @@ single_kdeplot:
      x: Infection peak
      y: ' '


double_kdeplot:
  based_on: single_kdeplot
  to_plot:
@@ -556,12 +574,14 @@ double_kdeplot:
  style:
    figure.figsize: [8, 4]

# Demonstrates a scatterplot and an errorbar plot on a single axis using multiplot

# Demonstrates a scatterplot and an errorbar plot on a single axis (multiplot)
### Start --- multiplot
multiplot:
  based_on:
    - .creator.multiverse
    - .plot.multiplot

  select_and_combine:
    fields:
      susceptible:
@@ -590,16 +610,21 @@ multiplot:
  transform:
    - .coords: [!dag_tag infected, time]
      tag: time

    - .mean: [!dag_tag susceptible, seed]
    - .squeeze: [!dag_prev ]
      tag: mean_s

    - .std: [!dag_tag susceptible, seed]
    - .squeeze: [!dag_prev ]
      tag: std_s

    - .mean: [!dag_tag infected, seed]
      tag: mean_i

    - .mean: [!dag_tag recovered, seed]
      tag: mean_r

    - xr.Dataset:
      - infected: !dag_tag mean_i
        recovered: !dag_tag mean_r
@@ -612,19 +637,21 @@ multiplot:
      yerr: !dag_result std_s
      label: Susceptible agents
      color: '#0099CC'
    - function: [xarray.plot, scatter]
      args:
        - !dag_result scatter_data
      x: time
      y: recovered
      hue: infected
      cmap:
        continuous: true
        from_values:
          0: '#006666'
          1: '#CC3333'
      label: Recovered agents
      zorder: 3

    # FIXME Not working with xarray 2022.10.0
    # - function: [xarray.plot, scatter]
    #   args:
    #     - !dag_result scatter_data
    #   x: time
    #   y: recovered
    #   hue: infected
    #   cmap:
    #     continuous: true
    #     from_values:
    #       0: '#006666'
    #       1: '#CC3333'
    #   label: Recovered agents
    #   zorder: 3

  helpers:
    set_labels: