diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ebe589b..780bd495 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,8 +23,6 @@ If you are not so familiar with Git or/and GitHub, we suggest you take a look at - Make sure all the code goes through Flake8 without problems (run ```make check``` command) - Make sure PR builds goes through - - ## Setup development environment ### Requirements @@ -38,25 +36,25 @@ If you are not so familiar with Git or/and GitHub, we suggest you take a look at | Package | Version | Platform | |------------|:---------:|:--------:| -| numpy | \>=1.26.1 | All | -| matplotlib | \>=3.8.0 | All | -| pandas | \>=2.1.1 | All | -| openpyxl | \>=3.1.2 | All | +| numpy | ^1.26.1 | All | +| pandas | ^2.1.1 | All | +| openpyxl | ^3.1.2 | All | +| matplotlib | ^3.8.0 | All | **Test dependencies:** -| Package | Version | Platform | -|-----------------|:---------:|:--------:| -| pytest | \>=7.4.2 | Any | -| pytest-cov | \>=4.1.0 | Any | -| pytest-randomly | \>=3.15.0 | Any | +| Package | Version | Platform | +|-----------------|:----------------:|:--------:| +| pytest | >=7.4.2,<9.0.0 | Any | +| pytest-cov | ^4.1.0 | Any | +| pytest-randomly | ^3.15.0 | Any | **Documentation dependencies (optional):** | Package | Version | Platform | |--------------------|:--------:|:--------:| -| sphinx | \>=7.2.6 | Any | -| sphinx-press-theme | \>=0.8.0 | Any | +| sphinx | ^7.2.6 | Any | +| sphinx-rtd-theme | ^1.3.0 | Any | ### Installation diff --git a/README.md b/README.md index 52d3dd62..55e47216 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,79 @@ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 🎯 Mission • + 📦 Installation • + 🧠Algorithms • + 🧪 Problems • + 🚀 Usage • + 🫂 Contributors • + 🙇 Contributing • + 🔑 License • + 📄 Cite us +
Nature-inspired algorithms are a very popular tool for solving optimization problems. Numerous variants of nature-inspired algorithms have been developed ([paper 1](https://arxiv.org/abs/1307.4186), [paper 2](https://www.mdpi.com/2076-3417/8/9/1521)) since the beginning of their era. To prove their versatility, those were tested in various domains on various applications, especially when they are hybridized, modified or adapted. However, implementation of nature-inspired algorithms is sometimes a difficult, complex and tedious task. In order to break this wall, NiaPy is intended for simple and quick use, without spending time for implementing algorithms from scratch. * **Free software:** MIT license -* **Documentation:** https://niapy.readthedocs.io/en/stable/ +* **Documentation:** https://niapy.readthedocs.io/en/stable * **Python versions:** 3.9.x, 3.10.x, 3.11.x, 3.12.x -* **Dependencies:** [click here](CONTRIBUTING.md#development-dependencies) +* **Dependencies:** listed in [CONTRIBUTING.md](CONTRIBUTING.md#development-dependencies) -# Mission +## 🎯 Mission Our mission is to build a collection of nature-inspired algorithms and create a simple interface for managing the optimization process. NiaPy offers: @@ -40,68 +82,67 @@ Our mission is to build a collection of nature-inspired algorithms and create a - easy comparison between nature-inspired algorithms, and - export of results in various formats such as Pandas DataFrame, JSON or even Excel. +## 📦 Installation -# Installation - -Install NiaPy with pip: +To install `NiaPy` with pip, use: ```sh pip install niapy ``` -To install NiaPy with conda, use: +To install `NiaPy` with conda, use: ```sh conda install -c niaorg niapy ``` -To install NiaPy on Fedora, use: +To install `NiaPy` on Fedora, use: ```sh dnf install python3-niapy ``` -To install NiaPy on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers): +To install `NiaPy` on Arch Linux, use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers): ```sh yay -Syyu python-niapy ``` -To install NiaPy on Alpine Linux, please enable Community repository and use: +To install `NiaPy` on Alpine Linux, enable Community repository and use: ```sh apk add py3-niapy ``` -To install NiaPy on NixOS, please use: +To install `NiaPy` on NixOS, use: ```sh nix-env -iA nixos.python310Packages.niapy ``` -To install NiaPy on Void Linux, use: +To install `NiaPy` on Void Linux, use: ```sh xbps-install -S python3-niapy ``` -## Install from source +### Installation from source -In case you want to install directly from the source code, use: +To install `NiaPy` directly from the source code, use: ```sh pip install git+https://github.com/NiaOrg/NiaPy.git ``` -# Algorithms +## 🧠Algorithms [Click here](Algorithms.md) for the list of implemented algorithms. -# Problems +## 🧪 Problems [Click here](Problems.md) for the list of implemented test problems. -# Usage +## 🚀 Usage After installation, you can import NiaPy as any other Python module: @@ -111,10 +152,9 @@ $ python >>> niapy.__version__ ``` - Let's go through a basic and advanced example. -## Basic Example +### Basic Example Let’s say, we want to try out PSO against the Pintér problem function. Firstly, we have to create new file, with name, for example *basic_example.py*. Then we have to import chosen algorithm from NiaPy, so we can use it. Afterwards we initialize ParticleSwarmAlgorithm class instance and run the algorithm. Given bellow is the complete source code of basic example. ```python @@ -144,7 +184,7 @@ Given example can be run with *python basic_example.py* command and should give 0.06732518679742806 ``` -## Advanced Example +### Advanced Example In this example we will show you how to implement a custom problem class and use it with any of implemented algorithms. First let's create new file named advanced_example.py. As in the previous examples @@ -204,56 +244,7 @@ For more usage examples please look at [examples](/examples) folder. More advanced examples can also be found in the [NiaPy-examples repository](https://github.com/NiaOrg/NiaPy-examples). - - -# Cite us - -Are you using NiaPy in your project or research? Please cite us! - -## Plain format - -``` - Vrbančič, G., Brezočnik, L., Mlakar, U., Fister, D., & Fister Jr., I. (2018). - NiaPy: Python microframework for building nature-inspired algorithms. - Journal of Open Source Software, 3(23), 613\.