From d05f0da12c10603ba10e4241a68da9c5788d376c Mon Sep 17 00:00:00 2001 From: Luca Moschella Date: Tue, 29 Aug 2023 01:46:05 +0200 Subject: [PATCH 1/4] Fix defaults channel order in env.yaml --- {{ cookiecutter.repository_name }}/env.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{ cookiecutter.repository_name }}/env.yaml b/{{ cookiecutter.repository_name }}/env.yaml index c41df92..d440dca 100644 --- a/{{ cookiecutter.repository_name }}/env.yaml +++ b/{{ cookiecutter.repository_name }}/env.yaml @@ -1,8 +1,8 @@ name: {{ cookiecutter.conda_env_name }} channels: - - defaults - pytorch - nvidia + - defaults dependencies: - python={{ cookiecutter.python_version }} From e0d0bf6554f0e00cb3adcc322717609f33d833a9 Mon Sep 17 00:00:00 2001 From: Luca Moschella Date: Wed, 30 Aug 2023 21:24:10 +0200 Subject: [PATCH 2/4] Install torch cpu-only in github actions (#91) * Install torch cpu-only in github actions * Fix extra whitespace for pre-commits --- .../.github/workflows/test_suite.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml b/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml index 74b83ec..6e67275 100644 --- a/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml +++ b/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml @@ -61,6 +61,13 @@ jobs: sed -Ei '/^\s*-?\s*python\s*([#=].*)?$/d' ${{ env.CONDA_ENV_FILE }} cat ${{ env.CONDA_ENV_FILE }} + # Install torch cpu-only + - name: Install torch cpu only + shell: bash -l {0} + run: | + sed -i '/nvidia\|cuda/d' ${{ env.CONDA_ENV_FILE }} + cat ${{ env.CONDA_ENV_FILE }} + - name: Setup Mambaforge uses: conda-incubator/setup-miniconda@v2 with: From e225218a439f82bcd4c3dba5acf3bd3e7e7684ac Mon Sep 17 00:00:00 2001 From: Luca Moschella Date: Thu, 31 Aug 2023 10:41:08 +0200 Subject: [PATCH 3/4] Bump pre-commit versions (#92) * Bump pre-commit versions * Bump python versions --- .github/workflows/test_suite.yml | 2 +- .../.github/workflows/test_suite.yml | 2 +- .../.pre-commit-config.yaml | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml index fc59eec..da2b748 100644 --- a/.github/workflows/test_suite.yml +++ b/.github/workflows/test_suite.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.11'] + python-version: ['3.11'] include: - os: ubuntu-20.04 label: linux-64 diff --git a/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml b/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml index 6e67275..bbd49aa 100644 --- a/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml +++ b/{{ cookiecutter.repository_name }}/.github/workflows/test_suite.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9'] + python-version: ['3.11'] include: - os: ubuntu-20.04 label: linux-64 diff --git a/{{ cookiecutter.repository_name }}/.pre-commit-config.yaml b/{{ cookiecutter.repository_name }}/.pre-commit-config.yaml index 7cd57b0..777de72 100644 --- a/{{ cookiecutter.repository_name }}/.pre-commit-config.yaml +++ b/{{ cookiecutter.repository_name }}/.pre-commit-config.yaml @@ -45,37 +45,37 @@ repos: - id: isort - repo: https://github.com/psf/black.git - rev: '22.3.0' + rev: '23.7.0' hooks: - id: black - id: black-jupyter - repo: https://github.com/asottile/blacken-docs.git - rev: 'v1.12.1' + rev: '1.16.0' hooks: - id: blacken-docs - repo: https://github.com/PyCQA/flake8.git - rev: '4.0.1' + rev: '6.1.0' hooks: - id: flake8 additional_dependencies: - - flake8-docstrings==1.6.0 + - flake8-docstrings==1.7.0 - repo: https://github.com/pycqa/pydocstyle.git - rev: '6.1.1' + rev: '6.3.0' hooks: - id: pydocstyle additional_dependencies: - toml - repo: https://github.com/kynan/nbstripout.git - rev: '0.5.0' + rev: '0.6.1' hooks: - id: nbstripout - repo: https://github.com/PyCQA/bandit - rev: '1.7.4' + rev: '1.7.5' hooks: - id: bandit args: ['-c', 'pyproject.toml', '--recursive', 'src'] From 6be9db1d8d4c2f8152e4d86fd55cfa61477378ca Mon Sep 17 00:00:00 2001 From: Luca Moschella Date: Thu, 31 Aug 2023 10:42:30 +0200 Subject: [PATCH 4/4] Bump nn-template version --- cookiecutter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index 035f2cc..eea71a2 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -9,5 +9,5 @@ "repository_url": "https://github.com/{{ cookiecutter.github_user }}/{{ cookiecutter.project_name.strip().lower().replace(' ', '-') }}", "conda_env_name": "{{ cookiecutter.project_name.strip().lower().replace(' ', '-') }}", "python_version": "3.11", - "__version": "0.3.0" + "__version": "0.3.1" }