Skip to content

Commit

Permalink
Merge pull request #12 from JAAdrian/develop
Browse files Browse the repository at this point in the history
Release 3.4.0
  • Loading branch information
JAAdrian authored Sep 2, 2023
2 parents 5e9e294 + e2cfbd0 commit 60ac26b
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 70 deletions.
50 changes: 33 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.4.0] - 2023-09-03
### Added
- Support for nested loops where the inner one is a parallel `parfor` loop. Thanks
@tunakasif!

## [3.3.0] - 2021-02-28
### Added
- Optional switch to completely disable the bar's progress and printing functionality via `IsActive`. If `false`, the progress bar is disabled. The default is `true`.
- Optional switch to completely disable the bar's progress and printing functionality
via `IsActive`. If `false`, the progress bar is disabled. The default is `true`.

## [3.2.0] - 2020-11-13
### Added
- Optional switch to override default MATLAB font in Windows by `OverrideDefaultFont` property. If `true` and while the bar is not released, MATLAB's code font will be changed programmatically to `Courier New`
- Optional switch to override default MATLAB font in Windows by `OverrideDefaultFont`
property. If `true` and while the bar is not released, MATLAB's code font will be
changed programmatically to `Courier New`
- Proper unit testing as a test-case class

### Changed
- Demos should now be a bit prettier

### Fixed
- Progress bar in non-finite and iteration mode (not having a konwn total number of iterations) will now show correct unit string `it` instead of toggling wrongly between `it` and `s`
- Progress bar in non-finite and iteration mode (not having a konwn total number of
iterations) will now show correct unit string `it` instead of toggling wrongly between
`it` and `s`


## [3.1.1] - 2019-11-26
Expand All @@ -29,7 +39,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


## [3.1.0] - 2019-11-03
### Fixed
- Moved setup-related method-calls to the setup phase of the object. In v3.0.0, the
timer object was initialized in the constructor, leading to potential issues in
computing the elapsed time and estimated time until completion. Also, user-set
properties (like, e.g., the bar's title) could have had no influence while calling the
step function due to the same reason.
### Changed
- Renamed private properties
- The class' version is now stated as a constant property
- Made some properties constant and method static
- Cleaned up comments
- Updated README and CHANGELOG
Expand All @@ -38,15 +56,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [3.0.0] - 2017-05-02
### Changed
The whole class has been re-factored to be a **MATLAB System Object**
- Since updating a progress bar is an iterative process with a setup/reset/release paradigm, this object type fits the purpose best
- Due to the System Object class structure, multiple methods have been renamed and optional input arguments for the `step()` (formerly `update()`) method are now mandatory. See the example in `README.md`.
- The bar's **title** is now mandatory and has a default string: `'Processing'`. Notable change is that if the title exceeds the length of 20 characters the title will act like a banner and cycle with a shift of 3 characters each time the bar is updated. This way, the progress bar can have a constant width (for now, 90 characters seem to fit many screens).


## [3.1.0] - 2019-11-03
### Fixed
- Moved setup-related method-calls to the setup phase of the object. In v3.0.0, the timer object was initialized in the constructor, leading to potential issues in computing the elapsed time and estimated time until completion. Also, user-set properties (like, e.g., the bar's title) could have had no influence while calling the step function due to the same reason.

### Changed
- Renamed private properties
- The class' version is now stated as a constant property
- Since updating a progress bar is an iterative process with a setup/reset/release
paradigm, this object type fits the purpose best
- Due to the System Object class structure, multiple methods have been renamed and
optional input arguments for the `step()` (formerly `update()`) method are now
mandatory. See the example in `README.md`.
- The bar's **title** is now mandatory and has a default string: `'Processing'`. Notable
change is that if the title exceeds the length of 20 characters the title will act
like a banner and cycle with a shift of 3 characters each time the bar is updated.
This way, the progress bar can have a constant width (for now, 90 characters seem to
fit many screens).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause

Copyright (c) 2020, Jens-Alrik Adrian
Copyright (c) 2023, Jens-Alrik Adrian
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
12 changes: 6 additions & 6 deletions ProgressBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
properties (Constant)
% Tag every timer with this to find it properly
TIMER_TAG_NAME = 'ProgressBar';
VERSION = '3.3.0';
VERSION = '3.4.0';
end

properties (Nontunable)
Expand Down Expand Up @@ -279,15 +279,15 @@
obj.CurrentTitleState = [obj.CurrentTitleState, ' -- '];
end

% if the bar is used in a parallel setup start the timer right now
if obj.IsParallel
obj.startTimer();
end

% if this is a nested bar hit return
if obj.IsThisBarNested
fprintf(1, '\n');
end

% if the bar is used in a parallel setup start the timer right now
if obj.IsParallel
obj.startTimer();
end
obj.printProgressBar();
end
end
Expand Down
Loading

0 comments on commit 60ac26b

Please sign in to comment.