Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare v.0.4.0 #223

Merged
merged 29 commits into from
Jan 29, 2019
Merged

Prepare v.0.4.0 #223

merged 29 commits into from
Jan 29, 2019

Conversation

ljvmiranda921
Copy link
Owner

@ljvmiranda921 ljvmiranda921 commented Aug 14, 2018

Still a long way to go, but just a tracker for v.0.4.0. Will be updating the description as we go along.

Need some help with the changelog! @whzup 👍

Changelog

ljvmiranda921 and others added 3 commits August 14, 2018 19:58
Reference: #198

Inheriting from a metaclass, rather than an object, grants
us more flexibility and stronger typechecking for our
abstract/base classes. It's also the more Pythonic option.
I also added `@abs.abstractmethod` decorators for abstract
methods.

Signed-off-by: ljvmiranda921 <ljvmiranda@gmail.com>
Removed the `environments` module in favor of the `plotters` module.

Signed-off by: ljvmiranda921 <ljvmiranda@gmail.com>
@ljvmiranda921 ljvmiranda921 added the admin System-related and potential overrides label Aug 14, 2018
@ljvmiranda921 ljvmiranda921 self-assigned this Aug 14, 2018
ljvmiranda921 and others added 24 commits August 14, 2018 22:09
Resolves: #201

Added fmt: off and fmt: on commments to n-dimensional arrays in the test suite to prevent the ugly wrapping of arrays. Ran the black package to format the whole project.
Resolves #209 

This commit adds a reporter module that implements a Reporter class.
Its goal is to separate the concern of logging and printing from the
optimizer classes.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Resolves #228 

Added a cost function decorator which allows the user to write a cost
function that serves as a model for how the cost will be computed for
every one particle. The decorator is tested with a pytest file where the
shape and the equality with an example function is checked. I added a
note to the documentation that some numpy functions will return arrays
with single values in them.
This commit exposes the "limits" parameter in the README, and updates some undocumented
parameters in the docstrings.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit removes the if-else hierarchy in GeneralOptimizer
by abstracting some parts of the topologies.
Resolves #232

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds test abstractions to PySwarms
Resolves #240, #241

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds a .coveragerc file to set-up the coverage
requirements when running pytest.
Related #245

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds an isort configuration to ensure that isort works out
of the box.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds the `init_pos` argument in the Optimizer
docstrings. Turns out that it's not documented in the high-level
optimizers, so here we go.

Related #251

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit removes the assert statement when verifying if
the resulting cost actually has the desired shape. Moreover,
additional tests were created to test this validator.

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Replaces compute_best_particle with compute_gbest.
Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Fixed a bug in the topologies where all the topologie would calculate
the global best position instead of the best positions of the
neighbourhoods.

Fixed the VonNeumann tests as well as the optimizers such that they
return the position with the best cost. I had to change the parameters
for the optimization in the test_objective_func_with_kwargs to satisfy
the conditions.

Adjusted the code to fit the refactoring of the code. Especially in the
topology tests where the sytax was wrong.

Fixed the test by just checking if either the best or the second best
position is inside of the matrix of the best positions...

Fixed the error with the class passing by adding parenthesis which seem
to have disappeared

Cleaned up the PR and skipped the tests which require a very good cost
as some topologies do not converge fast enough.

Resolves #250
For modern python, let's support py35 above

Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Copy link
Collaborator

@whzup whzup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@ljvmiranda921 ljvmiranda921 merged commit 5c22c83 into master Jan 29, 2019
@ljvmiranda921 ljvmiranda921 deleted the development branch February 9, 2019 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin System-related and potential overrides
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants