Skip to content

Commit

Permalink
Merge pull request #125 from jdenholm/dev
Browse files Browse the repository at this point in the history
v0.11.0
  • Loading branch information
jdenholm authored Jun 13, 2024
2 parents aec6ffc + f692ebd commit d52f15b
Show file tree
Hide file tree
Showing 19 changed files with 748 additions and 507 deletions.
83 changes: 47 additions & 36 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,52 @@ on:
pull_request:
branches: [ dev ]

jobs:
build-linux:
runs-on: ubuntu-latest



jobs:
code-quality:
name: Code quality (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: ["macos-latest"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file requirements-dev.conda.yaml --name base
- name: Print python version
run: |
python --version
- name: Lint with Pylint
run: |
pylint $(git ls-files src/) --disable=duplicate-code
- name: Lint with Mypy
run: |
mypy $(git ls-files src/)
- name: Lint with Pydocstyle
run: |
pydocstyle --convention=numpy $(git ls-files src/)
- name: Test with Pytest
run: |
pytest tests/
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: torch-tools
auto-update-conda: true
environment-file: requirements-dev.conda.yaml
auto-activate-base: false
python-version: ${{ matrix.python-version }}
channels: anaconda, conda-forge, defaults

- name: env list
shell: bash -l {0}
run: |
conda list
- name: Lint with Pylint
shell: bash -l {0}
run: |
python -m pylint $(git ls-files src/) --disable=duplicate-code
- name: Lint with Mypy
shell: bash -l {0}
run: |
python -m mypy $(git ls-files src/)
- name: Lint with Pydocstyle
shell: bash -l {0}
run: |
python -m pydocstyle --convention=numpy $(git ls-files src/)
- name: Test with Pytest
shell: bash -l {0}
run: |
python -m pytest tests/
48 changes: 24 additions & 24 deletions .github/workflows/doc-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ on:
- main

jobs:
build:

code-quality:
name: Publish docs (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 3
matrix:
python_version: ["3.10"]
os: ["ubuntu-latest"]

name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: torch-tools
auto-update-conda: true
environment-file: requirements-dev.conda.yaml
auto-activate-base: false
python-version: ${{ matrix.python-version }}
channels: anaconda, conda-forge, defaults

- name: Create conda env
run: |
conda env update --file requirements-dev.conda.yaml --name base

- name: Print python version
run: |
python --version
- name: Print python version
shell: bash -l {0}
run: |
python --version
- name: Update docs
run : |
./.build_docs.sh
- name: Update docs
shell: bash -l {0}
run: |
./.build_docs.sh
83 changes: 54 additions & 29 deletions .github/workflows/torch-tools-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,61 @@ on:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
build:

jobs:
install-package:
name: (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python_version: ["3.10"]
os: ["ubuntu-latest", "macos-latest"]

name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}

- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install "python>=3.9.10" --name base
- name: Print python version
run: |
python --version
- name: Install TorchTools
run : |
pip install .
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
python-version: ${{ matrix.python-version }}
channels: anaconda, conda-forge, defaults
- name: Install Python with conda
run: |
conda install python=${{ matrix.python-version }} --name base
- uses: actions/checkout@v4
- name: Install TorchTools
run : |
pip install .
# jobs:
# build:

# strategy:
# matrix:
# python_version: ["3.10"]
# os: ["ubuntu-latest", "macos-latest"]

# name: ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python_version }}

# - name: Add conda to system path
# run: |
# echo $CONDA/bin >> $GITHUB_PATH

# - name: Install dependencies
# run: |
# conda install "python>=3.9.10" --name base

# - name: Print python version
# run: |
# python --version

# - name: Install TorchTools
# run : |
# pip install .
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Version 0.11.0
- Made changes to ``VAE2d``:
- Added the option to have the mean and variance nets be CNNs, rather than MLPs.
- Started returning the KL divergence during training and validation.
- Added extra tests accordingly.

## Version 0.10.3
- Added the option to freeze the encoder in the forward pass of ``SimpleConvNet2d``.

Expand Down
Loading

0 comments on commit d52f15b

Please sign in to comment.