From b1d0de50ad091d3e6debcd9f7f8e4566733c75ee Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Sun, 1 Nov 2020 09:32:00 -0500 Subject: [PATCH 1/3] Upgrade environment on 2020-10-30 merges https://github.com/manubot/rootstock/pull/383 pandoc-eqnos upgrade addresses the following error: UnboundLocalError: local variable 'ret' referenced before assignment https://github.com/tomduck/pandoc-eqnos/issues/43 Hold back pandoc due to the lack of panflute support. Switch commands in build/README.md to be relative to the repo root. --- build/README.md | 12 +++++++----- build/environment.yml | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/build/README.md b/build/README.md index 27bf76d..f6087cf 100644 --- a/build/README.md +++ b/build/README.md @@ -20,30 +20,32 @@ To change the options, either edit the YAML files directly or add additional `-- Note: currently, **Windows is not supported**. -Install the [conda](https://conda.io) environment specified in [`environment.yml`](environment.yml) by running the following commands from this directory: +Install the [conda](https://conda.io) environment specified in [`environment.yml`](environment.yml) by running the following commands +(from the repository's root directory): ```sh # Install the environment -conda env create --file environment.yml +conda env create --file build/environment.yml ``` If the `manubot` environment is already installed, but needs to be updated to reflect changes to `environment.yml`, use one of the following options: ```shell # option 1: update the existing environment. -conda env update --file environment.yml +conda env update --file build/environment.yml # option 2: remove and reinstall the manubot environment. # Slower than option 1, but guarantees a fresh environment. conda env remove --name manubot -conda env create --file environment.yml +conda env create --file build/environment.yml ``` Activate with `conda activate manubot` (assumes `conda` version of [at least](https://github.com/conda/conda/blob/9d759d8edeb86569c25f6eb82053f09581013a2a/CHANGELOG.md#440-2017-12-20) 4.4). The environment should successfully install on both Linux and macOS. However, it will fail on Windows due to the [`pango`](https://anaconda.org/conda-forge/pango) dependency. -Because the build process is dependent on having the appropriate version of the `manubot` Python package, it is necessary to use the version specified in `environment.yml`. +Because the build process is dependent on having the appropriate version of the `manubot` Python package, +it is necessary to use the version specified in `environment.yml`. The latest `manubot` release on PyPI may not be compatible with the latest version of this rootstock repository. ## Building PDFs diff --git a/build/environment.yml b/build/environment.yml index b156d6c..5eae4c9 100644 --- a/build/environment.yml +++ b/build/environment.yml @@ -10,22 +10,22 @@ dependencies: - jsonschema=3.2.0 - pandoc=2.9.2 - pango=1.40.14 - - pip=20.0 - - psutil=5.7.0 - - python=3.7.6 + - pip=20.2 + - psutil=5.7.3 + - python=3.7.8 - pyyaml=5.3 - - requests=2.23.0 - - watchdog=0.10.2 - - yamllint=1.21.0 + - requests=2.24.0 + - watchdog=0.10.3 + - yamllint=1.25.0 - pip: - errorhandler==2.0.1 - - git+https://github.com/manubot/manubot@31968197d1ccd96a46bf092cdba4b575764bb954 + - git+https://github.com/manubot/manubot@7c03b4a7d42506b3241e58cd5643a028443b9b9d - opentimestamps-client==0.7.0 - opentimestamps==0.4.1 - - pandoc-eqnos==2.1.1 - - pandoc-fignos==2.2.0 - - pandoc-tablenos==2.1.1 - - pandoc-xnos==2.2.0 + - pandoc-eqnos==2.3.0 + - pandoc-fignos==2.3.1 + - pandoc-tablenos==2.2.2 + - pandoc-xnos==2.4.3 - pybase62==0.4.3 - pysha3==1.0.2 - python-bitcoinlib==0.10.2 From aaefe9a4ffca65d1bbfccb6a3d7567b84888b5ef Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Fri, 6 Nov 2020 13:18:22 -0500 Subject: [PATCH 2/3] Conda environment: pin additional manubot dependencies merges https://github.com/manubot/rootstock/pull/385 Pin panflute dependency We use panflute to build custom pandoc filters. Panflute versions only work with specific versions of the Pandoc AST. We need to pin pandoc/panflute to a version pair that is known to work together. Pin versions of additional explicit manubot dependencies, as of https://github.com/manubot/manubot/blob/01d69f066eaf6554111e6bcf197f7ee1fcfb240b/setup.py#L65-L80 CI: use conda-incubator/setup-miniconda on GH actions https://github.com/conda-incubator/setup-miniconda appears to have replaced https://github.com/goanpeca/setup-miniconda. The later is currently 31 commits behind. --- .github/workflows/manubot.yaml | 2 +- build/environment.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manubot.yaml b/.github/workflows/manubot.yaml index 0cabab3..3a3aeac 100644 --- a/.github/workflows/manubot.yaml +++ b/.github/workflows/manubot.yaml @@ -32,7 +32,7 @@ jobs: restore-keys: | ci-cache-refs/heads/master - name: Install Environment - uses: goanpeca/setup-miniconda@v1 + uses: conda-incubator/setup-miniconda@v1 with: activate-environment: manubot environment-file: build/environment.yml diff --git a/build/environment.yml b/build/environment.yml index 5eae4c9..df0319e 100644 --- a/build/environment.yml +++ b/build/environment.yml @@ -9,17 +9,20 @@ dependencies: - jinja2=2.11.2 - jsonschema=3.2.0 - pandoc=2.9.2 + - panflute=1.12.5 - pango=1.40.14 - pip=20.2 - psutil=5.7.3 - python=3.7.8 - pyyaml=5.3 - requests=2.24.0 + - toml=0.10.2 - watchdog=0.10.3 - yamllint=1.25.0 - pip: - errorhandler==2.0.1 - git+https://github.com/manubot/manubot@7c03b4a7d42506b3241e58cd5643a028443b9b9d + - isbnlib==3.10.3 - opentimestamps-client==0.7.0 - opentimestamps==0.4.1 - pandoc-eqnos==2.3.0 From 97b294802ffcd39071b6e5b8ab59f60faf4be118 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Tue, 10 Nov 2020 07:51:35 -0500 Subject: [PATCH 3/3] CI: upgrade to conda-incubator/setup-miniconda@v2 merges https://github.com/manubot/rootstock/pull/389 closes https://github.com/manubot/rootstock/issues/388 > The `set-env` command is deprecated and will be disabled on November 16th. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ --- .github/workflows/manubot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manubot.yaml b/.github/workflows/manubot.yaml index 3a3aeac..9a2b89b 100644 --- a/.github/workflows/manubot.yaml +++ b/.github/workflows/manubot.yaml @@ -32,7 +32,7 @@ jobs: restore-keys: | ci-cache-refs/heads/master - name: Install Environment - uses: conda-incubator/setup-miniconda@v1 + uses: conda-incubator/setup-miniconda@v2 with: activate-environment: manubot environment-file: build/environment.yml