From ddaeff7cab66ca7f079c6a9fbea6817874568459 Mon Sep 17 00:00:00 2001 From: Iztok Fister Jr Date: Sat, 25 Nov 2023 21:22:42 +0100 Subject: [PATCH 1/8] Add installation instructions for Alpine --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 9fcb701..8d0c1ee 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ To install FireflyAlgorithm on Arch Linux, please use an [AUR helper](https://wi ```sh $ yay -Syyu python-fireflyalgorithm ``` +To install FireflyAlgorithm on Alpine Linux: +```sh +$ apk add py3-fireflyalgorithm +``` ## Usage: From 8df73448b053186648e1e6905cb5f21541700ac1 Mon Sep 17 00:00:00 2001 From: "Iztok Fister Jr." Date: Sun, 3 Dec 2023 13:01:17 +0100 Subject: [PATCH 2/8] Update changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18d1380..2964d4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [0.4.1](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.4.1) (2023-11-10) + +[Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.4.0...0.4.1) + +**Closed issues:** + +- Create Problems.md [\#18](https://github.com/firefly-cpp/FireflyAlgorithm/issues/18) + +**Merged pull requests:** + +- Add Test Function definitions [\#19](https://github.com/firefly-cpp/FireflyAlgorithm/pull/19) ([zStupan](https://github.com/zStupan)) + +## [0.4.0](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.4.0) (2023-11-06) + +[Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.3.4...0.4.0) + +**Closed issues:** + +- Enhance tests [\#16](https://github.com/firefly-cpp/FireflyAlgorithm/issues/16) +- Provide Command Line Interface \(CLI\) [\#13](https://github.com/firefly-cpp/FireflyAlgorithm/issues/13) +- Add installation instructions for Arch Linux [\#11](https://github.com/firefly-cpp/FireflyAlgorithm/issues/11) + +**Merged pull requests:** + +- Add tests [\#17](https://github.com/firefly-cpp/FireflyAlgorithm/pull/17) ([zStupan](https://github.com/zStupan)) +- Added a Command Line Interface [\#15](https://github.com/firefly-cpp/FireflyAlgorithm/pull/15) ([zStupan](https://github.com/zStupan)) +- Improve workflows [\#14](https://github.com/firefly-cpp/FireflyAlgorithm/pull/14) ([firefly-cpp](https://github.com/firefly-cpp)) +- Add instructions for install FireflyAlgorithm in Arch Linux [\#12](https://github.com/firefly-cpp/FireflyAlgorithm/pull/12) ([carlosal1015](https://github.com/carlosal1015)) + ## [0.3.4](https://github.com/firefly-cpp/FireflyAlgorithm/tree/0.3.4) (2022-12-13) [Full Changelog](https://github.com/firefly-cpp/FireflyAlgorithm/compare/0.3.3...0.3.4) From c44467e8b252a3293393f46fbb4c6af28e954865 Mon Sep 17 00:00:00 2001 From: Tadej Lahovnik Date: Mon, 4 Dec 2023 10:36:46 +0100 Subject: [PATCH 3/8] doc: Templates --- .github/templates/FEATURE_REQUEST.md | 16 ++++++++++++++++ .github/templates/ISSUE_TEMPLATE.md | 18 ++++++++++++++++++ .github/templates/PULL_REQUEST.md | 14 ++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 .github/templates/FEATURE_REQUEST.md create mode 100644 .github/templates/ISSUE_TEMPLATE.md create mode 100644 .github/templates/PULL_REQUEST.md diff --git a/.github/templates/FEATURE_REQUEST.md b/.github/templates/FEATURE_REQUEST.md new file mode 100644 index 0000000..5a1ccc4 --- /dev/null +++ b/.github/templates/FEATURE_REQUEST.md @@ -0,0 +1,16 @@ +### Feature Request + +**About**: +**Title**: + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/templates/ISSUE_TEMPLATE.md b/.github/templates/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..90325f5 --- /dev/null +++ b/.github/templates/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ +### Bug Report + +**About**: +**Title**: + +**Steps to reproduce** +Tell us how to reproduce the bug. + +**Expected behavior** +Tell us what should happen. + +**Actual behavior** +Tell us what happens instead. + +**System configuration** + + - OS: + - Python version: \ No newline at end of file diff --git a/.github/templates/PULL_REQUEST.md b/.github/templates/PULL_REQUEST.md new file mode 100644 index 0000000..9a87d5d --- /dev/null +++ b/.github/templates/PULL_REQUEST.md @@ -0,0 +1,14 @@ +### Summary + +Provide a general description of the code changes in your pull +request... were there any bugs you had fixed? If so, mention them. If +these bugs have open GitHub issues, be sure to tag them here as well, +to keep the conversation linked together. + +### Other Information + +If there's anything else that's important and relevant to your pull +request, mention that information here. This could include +benchmarks, or other information. + +Thanks for contributing to Firefly Algorithm! \ No newline at end of file From 362c777e113913a14c5121ef6db12dc438c31059 Mon Sep 17 00:00:00 2001 From: Tadej Lahovnik Date: Mon, 4 Dec 2023 10:37:01 +0100 Subject: [PATCH 4/8] doc: Contribution guide --- CONTRIBUTING.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6162d8d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Contributing to Firefly Algorithm +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: + +## Code of Conduct +This project and everyone participating in it is governed by the [Firefly Algorithm Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [iztok.fister1@um.si](mailto:iztok.fister1@um.si). + +## How Can I Contribute? + +### Reporting Bugs +Before creating bug reports, please check existing issues list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible in the [issue template](.github/templates/ISSUE_TEMPLATE.md). + +### Suggesting Enhancements + +Open new issue using the [feature request template](.github/templates/FEATURE_REQUEST.md). + +### Pull requests + +Fill in the [pull request template](.github/templates/PULL_REQUEST.md) and make sure your code is documented. + +## Setup development environment + +### Requirements + +* Poetry: [https://python-poetry.org/docs](https://python-poetry.org/docs) + +After installing Poetry and cloning the project from GitHub, you should run the following command from the root of the cloned project: + +```sh +poetry install +``` + +All of the project's dependencies should be installed and the project ready for further development. **Note that Poetry creates a separate virtual environment for your project.** + +### Dependencies + +| Package | Version | Platform | +|----------|:-------:|:--------:| +| numpy | ^1.26.1 | All | + +#### Development dependencies + +| Package | Version | Platform | +|---------|:--------:|:--------:| +| pytest | ^7.4.3 | Any | + +## Development Tasks + +### Testing + +Manually run the tests: + +```sh +poetry run pytest +``` \ No newline at end of file From f89e607ea84b62ec4747b6bfb3cf4bbe3d0edd98 Mon Sep 17 00:00:00 2001 From: Tadej Lahovnik Date: Mon, 4 Dec 2023 10:40:47 +0100 Subject: [PATCH 5/8] doc: README --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 8d0c1ee..f0208fe 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ [![Percentage of issues still open](http://isitmaintained.com/badge/open/firefly-cpp/FireflyAlgorithm.svg)](http://isitmaintained.com/project/firefly-cpp/FireflyAlgorithm "Percentage of issues still open") ![GitHub contributors](https://img.shields.io/github/contributors/firefly-cpp/FireflyAlgorithm.svg) -## About +## About πŸ“‹ -This package implements a nature-inspired algorithm for optimization called Firefly Algorithm (FA) in Python programming language. +This package implements a nature-inspired algorithm for optimization called Firefly Algorithm (FA) in Python programming language. πŸŒΏπŸ”πŸ’» -## Installation: +## Installation πŸ“¦ Install FireflyAlgorithm with pip: ```sh @@ -42,7 +42,7 @@ To install FireflyAlgorithm on Alpine Linux: $ apk add py3-fireflyalgorithm ``` -## Usage: +## Usage πŸš€ ```python from fireflyalgorithm import FireflyAlgorithm @@ -54,7 +54,7 @@ best = FA.run(function=sphere, dim=10, lb=-5, ub=5, max_evals=10000) print(best) ``` -### Test functions +### Test functions πŸ“ˆ In the `fireflyalgorithm.problems` module, you can find the implementations of 33 popular optimization test problems. Additionally, the module provides a utility function, `get_problem`, that allows you to retrieve a specific optimization problem function by providing its name as a string: @@ -65,12 +65,11 @@ from fireflyalgorithm.problems import get_problem rosenbrock = get_problem('rosenbrock') ``` -For more information about the implemented test functions, [click here](Problems.md) +For more information about the implemented test functions, [click here](Problems.md). -### Command line interface +### Command line interface πŸ–₯️ -The package also comes with a simple command line interface which allows you to evaluate the algorithm on several -popular test functions +The package also comes with a simple command line interface which allows you to evaluate the algorithm on several popular test functions. πŸ”¬ ```shell firefly-algorithm -h @@ -100,10 +99,10 @@ options: --seed SEED Seed for the random number generator ``` -**Note:** The CLI script can also run as a python module (python -m niaarm ...) +**Note:** The CLI script can also run as a python module (python -m niaarm ...). -## Reference Papers: +## Reference Papers πŸ“š I. Fister Jr., X.-S. Yang, I. Fister, J. Brest. [Memetic firefly algorithm for combinatorial optimization](http://www.iztok-jr-fister.eu/static/publications/44.pdf) in Bioinspired Optimization Methods and their Applications (BIOMA 2012), B. Filipic and J.Silc, Eds. Jozef Stefan Institute, Ljubljana, Slovenia, 2012 From 6044bfe78ec0fefa8fdf38cc9ad71cab916c59eb Mon Sep 17 00:00:00 2001 From: Tadej Lahovnik Date: Mon, 4 Dec 2023 10:41:52 +0100 Subject: [PATCH 6/8] doc: Code of conduct --- CODE_OF_CONDUCT.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..7e77a3a --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ From 0d8243b5da7c63cb1ec0c87722345306f048499f Mon Sep 17 00:00:00 2001 From: Iztok Fister Jr Date: Mon, 4 Dec 2023 12:57:53 +0100 Subject: [PATCH 7/8] Fix error in CLI note --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0208fe..df9880d 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ options: --seed SEED Seed for the random number generator ``` -**Note:** The CLI script can also run as a python module (python -m niaarm ...). +**Note:** The CLI script can also run as a python module (python -m fireflyalgorithm ...). ## Reference Papers πŸ“š From 6deaed1838918ced61c34bcf0ac7bdd75f7c86a1 Mon Sep 17 00:00:00 2001 From: "Iztok Fister Jr." Date: Mon, 4 Dec 2023 13:21:03 +0100 Subject: [PATCH 8/8] Bump version to 0.4.2 --- fireflyalgorithm/__init__.py | 2 +- pyproject.toml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fireflyalgorithm/__init__.py b/fireflyalgorithm/__init__.py index 35ed0d4..1a8dc9b 100644 --- a/fireflyalgorithm/__init__.py +++ b/fireflyalgorithm/__init__.py @@ -2,4 +2,4 @@ __all__ = ["FireflyAlgorithm"] -__version__ = "0.4.1" +__version__ = "0.4.2" diff --git a/pyproject.toml b/pyproject.toml index 3fdb198..a35c836 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireflyalgorithm" -version = "0.4.1" +version = "0.4.2" description = "Implementation of Firefly Algorithm in Python" authors = ["Iztok Fister Jr. ", "Luka Pečnik ", "Ε½iga Stupan "] license = "MIT" @@ -9,7 +9,8 @@ homepage = "https://github.com/firefly-cpp/FireflyAlgorithm" repository = "https://github.com/firefly-cpp/FireflyAlgorithm" include = [ - { path="LICENSE", format="sdist" } + { path="LICENSE", format="sdist" }, + { path="Problems.md", format="sdist" } ] [tool.poetry.dependencies]