From 02095aaa1933f2ee9e9c4617cd9d68e83e6cd39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Fri, 25 Apr 2025 10:41:52 +0200 Subject: [PATCH 1/2] Conda set conda-remove-defaults: true --- .github/workflows/deploy.yml | 1 + .github/workflows/pipeline.yml | 5 +++++ .github/workflows/pypi.yml | 1 + 3 files changed, 7 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 005b8bb..0c554aa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,6 +15,7 @@ jobs: python-version: "3.12" environment-file: documentation/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Install Jupyterbook shell: bash -l {0} run: | diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index d165246..37ea4e1 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -30,6 +30,7 @@ jobs: python-version: "3.12" environment-file: binder/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Pip check shell: bash -l {0} run: | @@ -46,6 +47,7 @@ jobs: python-version: "3.12" environment-file: binder/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Installation and setup shell: bash -l {0} run: | @@ -81,6 +83,7 @@ jobs: python-version: "3.12" environment-file: binder/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Installation and setup shell: bash -l {0} run: | @@ -109,6 +112,7 @@ jobs: python-version: "3.12" environment-file: binder/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Installation and setup shell: bash -l {0} run: | @@ -134,6 +138,7 @@ jobs: python-version: "3.12" environment-file: documentation/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Install Jupyterbook shell: bash -l {0} run: | diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index cc05647..7391271 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -22,6 +22,7 @@ jobs: python-version: "3.12" environment-file: binder/environment.yml auto-activate-base: false + conda-remove-defaults: true - name: Build shell: bash -l {0} run: | From 983129e80cbb8b8c8f173fb24849d2c217788435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Fri, 25 Apr 2025 10:55:33 +0200 Subject: [PATCH 2/2] use conda config --- .github/workflows/deploy.yml | 7 ++-- .github/workflows/pipeline.yml | 65 ++++++++++++++++++---------------- .github/workflows/pypi.yml | 7 ++-- 3 files changed, 43 insertions(+), 36 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c554aa..4de1102 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,13 +9,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc environment-file: documentation/environment.yml - auto-activate-base: false - conda-remove-defaults: true - name: Install Jupyterbook shell: bash -l {0} run: | diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 37ea4e1..9750b07 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -23,14 +23,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc - name: Setup Mambaforge uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc environment-file: binder/environment.yml - auto-activate-base: false - conda-remove-defaults: true - name: Pip check shell: bash -l {0} run: | @@ -41,13 +42,14 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc environment-file: binder/environment.yml - auto-activate-base: false - conda-remove-defaults: true - name: Installation and setup shell: bash -l {0} run: | @@ -76,14 +78,15 @@ jobs: - uses: actions/checkout@v4 - name: Setup environment shell: bash -l {0} - run: tail --lines=+4 example_workflows/quantum_espresso/environment.yml >> binder/environment.yml + run: | + echo -e "channels:\n - conda-forge\n" > .condarc + tail --lines=+4 example_workflows/quantum_espresso/environment.yml >> binder/environment.yml - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc environment-file: binder/environment.yml - auto-activate-base: false - conda-remove-defaults: true - name: Installation and setup shell: bash -l {0} run: | @@ -106,13 +109,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc environment-file: binder/environment.yml - auto-activate-base: false - conda-remove-defaults: true - name: Installation and setup shell: bash -l {0} run: | @@ -131,20 +135,21 @@ jobs: documentation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - python-version: "3.12" - environment-file: documentation/environment.yml - auto-activate-base: false - conda-remove-defaults: true - - name: Install Jupyterbook - shell: bash -l {0} - run: | - cp documentation/_config.yml . - cp documentation/_toc.yml . - cp documentation/*.md . - jupyter-book build . --path-output public - mv public/_build/html public_html - touch public_html/.nojekyll + - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc + - uses: conda-incubator/setup-miniconda@v3 + with: + python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc + environment-file: documentation/environment.yml + - name: Install Jupyterbook + shell: bash -l {0} + run: | + cp documentation/_config.yml . + cp documentation/_toc.yml . + cp documentation/*.md . + jupyter-book build . --path-output public + mv public/_build/html public_html + touch public_html/.nojekyll diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 7391271..41c0d73 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -16,13 +16,14 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 + - name: Conda config + run: echo -e "channels:\n - conda-forge\n" > .condarc - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true python-version: "3.12" + miniforge-version: latest + condarc-file: .condarc environment-file: binder/environment.yml - auto-activate-base: false - conda-remove-defaults: true - name: Build shell: bash -l {0} run: |