Skip to content

Commit

Permalink
Merge pull request #340 from Anaconda-Platform/fix_writer_no_progressbar
Browse files Browse the repository at this point in the history
Check if there is a progress bar before updating it
  • Loading branch information
AlbertDeFusco authored Sep 27, 2021
2 parents 212256e + 66fea14 commit df5ec33
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
miniconda-version: py37_4.10.3
auto-activate-base: true
activate-environment: ""
- name: Install build dependencies
shell: bash -l {0}
run: |
conda config --append channels conda-forge
conda install -y conda-build conda-verify flake8 pep257 yapf==0.30.0 sphinx sphinx_rtd_theme
- name: Verify formatting compliance
shell: bash -l {0}
run: |
source /usr/share/miniconda/bin/activate
if ! yapf --diff --recursive anaconda_project; then
echo "----"
echo "Please run 'yapf --in-place --recursive anaconda_project'"
Expand All @@ -32,19 +39,21 @@ jobs:
flake8 anaconda_project
pep257 anaconda_project
- name: Build the documentation as a test
shell: bash -l {0}
run: |
source /usr/share/miniconda/bin/activate
cd docs
make html
- name: Build the package
run: /usr/share/miniconda/bin/conda build conda.recipe --no-test
shell: bash -l {0}
run: conda build --no-test conda.recipe
- name: Reduce the size of the build artifact
run: rm -rf /usr/share/miniconda/conda-bld/{git_cache,work,anaconda-project*,*/.cache}
shell: bash -l {0}
run: rm -rf ${CONDA}/conda-bld/{git_cache,work,anaconda-project*,*/.cache}
- name: Upload the build artifact
uses: actions/upload-artifact@v2
with:
name: package-${{ github.sha }}
path: /usr/share/miniconda/conda-bld
path: /usr/share/miniconda3/conda-bld
tests:
defaults:
run:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

We [keep a changelog.](http://keepachangelog.com/)

## Version 0.10.2

### Bug fixes

* [PR 340](https://github.com/Anaconda-Platform/anaconda-project/pull/340) Fix issue with progress bar


## Version 0.10.1

### Enhancements

* [PR 331](https://github.com/Anaconda-Platform/anaconda-project/pull/331) Add CLI progress bars for project download and extract
* [PR 330](https://github.com/Anaconda-Platform/anaconda-project/pull/330) Add CLI progress bars for data downloads

## Version 0.10.0

### Issues Closed
Expand Down
3 changes: 2 additions & 1 deletion anaconda_project/internal/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def writer(chunk):

try:
_file.write(chunk)
self._progress.update(len(chunk) / 1024 / 1024)
if self._progress is not None:
self._progress.update(len(chunk) / 1024 / 1024)
except EnvironmentError as e:
# we can't actually throw this error or Tornado freaks out, so instead
# we ignore all future chunks once we have an error, which does mean
Expand Down

0 comments on commit df5ec33

Please sign in to comment.