Skip to content

Commit e0f9374

Browse files
authored
Merge pull request #562 from lahovniktadej/master
README & development dependencies
2 parents 6730515 + 488d593 commit e0f9374

File tree

2 files changed

+143
-107
lines changed

2 files changed

+143
-107
lines changed

CONTRIBUTING.md

+11-13
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ If you are not so familiar with Git or/and GitHub, we suggest you take a look at
2323
- Make sure all the code goes through Flake8 without problems (run ```make check``` command)
2424
- Make sure PR builds goes through
2525

26-
27-
2826
## Setup development environment
2927

3028
### Requirements
@@ -38,25 +36,25 @@ If you are not so familiar with Git or/and GitHub, we suggest you take a look at
3836

3937
| Package | Version | Platform |
4038
|------------|:---------:|:--------:|
41-
| numpy | \>=1.26.1 | All |
42-
| matplotlib | \>=3.8.0 | All |
43-
| pandas | \>=2.1.1 | All |
44-
| openpyxl | \>=3.1.2 | All |
39+
| numpy | ^1.26.1 | All |
40+
| pandas | ^2.1.1 | All |
41+
| openpyxl | ^3.1.2 | All |
42+
| matplotlib | ^3.8.0 | All |
4543

4644
**Test dependencies:**
4745

48-
| Package | Version | Platform |
49-
|-----------------|:---------:|:--------:|
50-
| pytest | \>=7.4.2 | Any |
51-
| pytest-cov | \>=4.1.0 | Any |
52-
| pytest-randomly | \>=3.15.0 | Any |
46+
| Package | Version | Platform |
47+
|-----------------|:----------------:|:--------:|
48+
| pytest | >=7.4.2,<9.0.0 | Any |
49+
| pytest-cov | ^4.1.0 | Any |
50+
| pytest-randomly | ^3.15.0 | Any |
5351

5452
**Documentation dependencies (optional):**
5553

5654
| Package | Version | Platform |
5755
|--------------------|:--------:|:--------:|
58-
| sphinx | \>=7.2.6 | Any |
59-
| sphinx-press-theme | \>=0.8.0 | Any |
56+
| sphinx | ^7.2.6 | Any |
57+
| sphinx-rtd-theme | ^1.3.0 | Any |
6058

6159
### Installation
6260

README.md

+132-94
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,79 @@
1-
<p align="center"><img src=".github/imgs/NiaPyLogo.png" alt="NiaPy" title="NiaPy"/></p>
1+
<p align="center">
2+
<img src=".github/imgs/NiaPyLogo.png" alt="NiaPy" title="NiaPy"/>
3+
</p>
24

35
---
46

5-
6-
7-
![Check codestyle and test build](https://github.com/NiaOrg/NiaPy/actions/workflows/main.yml/badge.svg)
8-
[![PyPI Version](https://img.shields.io/pypi/v/NiaPy.svg)](https://pypi.python.org/pypi/NiaPy)
9-
![PyPI - Status](https://img.shields.io/pypi/status/NiaPy.svg)
10-
![PyPI - Downloads](https://img.shields.io/pypi/dm/NiaPy.svg)
11-
[![Anaconda Badge](https://anaconda.org/niaorg/niapy/badges/version.svg)](https://conda.anaconda.org/niaorg)
12-
[![Fedora package](https://img.shields.io/fedora/v/python3-niapy?color=blue&label=Fedora%20Linux&logo=fedora)](https://src.fedoraproject.org/rpms/python-niapy)
13-
[![AUR package](https://img.shields.io/aur/version/python-niapy?color=blue&label=Arch%20Linux&logo=arch-linux)](https://aur.archlinux.org/packages/python-niapy)
14-
[![Packaging status](https://repology.org/badge/tiny-repos/python:niapy.svg)](https://repology.org/project/python:niapy/versions)
15-
[![Documentation Status](https://readthedocs.org/projects/niapy/badge/?version=latest)](http://niapy.readthedocs.io/en/latest/?badge=latest)
16-
[![GitHub license](https://img.shields.io/github/license/NiaOrg/NiaPy.svg)](https://github.com/NiaOrg/NiaPy/blob/master/LICENSE)
17-
18-
![GitHub commit activity](https://img.shields.io/github/commit-activity/w/NiaOrg/NiaPy.svg)
19-
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/NiaOrg/NiaPy.svg)](http://isitmaintained.com/project/NiaOrg/NiaPy "Average time to resolve an issue")
20-
[![Percentage of issues still open](http://isitmaintained.com/badge/open/NiaOrg/NiaPy.svg)](http://isitmaintained.com/project/NiaOrg/NiaPy "Percentage of issues still open")
21-
![GitHub contributors](https://img.shields.io/github/contributors/NiaOrg/NiaPy.svg)
22-
23-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1205048.svg)](https://doi.org/10.5281/zenodo.1205048)
24-
[![DOI](http://joss.theoj.org/papers/10.21105/joss.00613/status.svg)](https://doi.org/10.21105/joss.00613)
25-
7+
<p align="center">
8+
<a href="https://pypi.python.org/pypi/NiaPy">
9+
<img alt="PyPI Version" src="https://img.shields.io/pypi/v/NiaPy.svg">
10+
</a>
11+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/niapy.svg">
12+
<img alt="PyPI - Status" src="https://img.shields.io/pypi/status/NiaPy.svg">
13+
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/NiaPy.svg">
14+
<a href="https://repology.org/project/python:niapy/versions">
15+
<img alt="Packaging status" src="https://repology.org/badge/tiny-repos/python:niapy.svg">
16+
<a href="https://conda.anaconda.org/niaorg">
17+
<img alt="Anaconda Badge" src="https://img.shields.io/badge/Anaconda.org-2.0.4-blue.svg?style=rounded">
18+
</a>
19+
<a href="https://src.fedoraproject.org/rpms/python-niapy">
20+
<img alt="Fedora package" src="https://img.shields.io/fedora/v/python3-niapy?color=blue&label=Fedora%20Linux&logo=fedora">
21+
</a>
22+
<a href="https://aur.archlinux.org/packages/python-niapy">
23+
<img alt="AUR package" src="https://img.shields.io/aur/version/python-niapy?color=blue&label=Arch%20Linux&logo=arch-linux">
24+
</a>
25+
</a>
26+
<a href="https://github.com/NiaOrg/NiaPy/blob/master/LICENSE">
27+
<img alt="GitHub license" src="https://img.shields.io/github/license/NiaOrg/NiaPy.svg">
28+
</a>
29+
<img alt="Check codestyle and test build" src="https://github.com/NiaOrg/NiaPy/actions/workflows/main.yml/badge.svg">
30+
<a href="http://niapy.readthedocs.io/en/latest/?badge=latest">
31+
<img alt="Documentation Status" src="https://readthedocs.org/projects/niapy/badge/?version=latest">
32+
</a>
33+
</p>
34+
35+
<p align="center">
36+
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/w/NiaOrg/NiaPy.svg">
37+
<a href='http://isitmaintained.com/project/NiaOrg/NiaPy "Average time to resolve an issue"'>
38+
<img alt="Average time to resolve an issue" src="http://isitmaintained.com/badge/resolution/NiaOrg/NiaPy.svg">
39+
</a>
40+
<a href='http://isitmaintained.com/project/NiaOrg/NiaPy "Percentage of issues still open"'>
41+
<img alt="Percentage of issues still open" src="http://isitmaintained.com/badge/open/NiaOrg/NiaPy.svg">
42+
</a>
43+
<a href="#-contributors">
44+
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/NiaOrg/NiaPy.svg">
45+
</a>
46+
</p>
47+
48+
<p align="center">
49+
<a href="https://doi.org/10.5281/zenodo.1205048">
50+
<img alt="DOI" src="https://zenodo.org/badge/DOI/10.5281/zenodo.1205048.svg">
51+
</a>
52+
<a href="https://doi.org/10.21105/joss.00613">
53+
<img alt="JOSS" src="http://joss.theoj.org/papers/10.21105/joss.00613/status.svg">
54+
</a>
55+
</p>
56+
57+
<p align="center">
58+
<a href="#-mission">🎯 Mission</a> •
59+
<a href="#-installation">📦 Installation</a> •
60+
<a href="#-algorithms">🧠 Algorithms</a> •
61+
<a href="#-problems">🧪 Problems</a> •
62+
<a href="#-usage">🚀 Usage</a> •
63+
<a href="#-contributors">🫂 Contributors</a> •
64+
<a href="#-contributing">🙇 Contributing</a> •
65+
<a href="#-license">🔑 License</a> •
66+
<a href="#-cite-us">📄 Cite us</a>
67+
</p>
2668

2769
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.
2870

2971
* **Free software:** MIT license
30-
* **Documentation:** https://niapy.readthedocs.io/en/stable/
72+
* **Documentation:** https://niapy.readthedocs.io/en/stable
3173
* **Python versions:** 3.9.x, 3.10.x, 3.11.x, 3.12.x
32-
* **Dependencies:** [click here](CONTRIBUTING.md#development-dependencies)
74+
* **Dependencies:** listed in [CONTRIBUTING.md](CONTRIBUTING.md#development-dependencies)
3375

34-
# Mission
76+
## 🎯 Mission
3577

3678
Our mission is to build a collection of nature-inspired algorithms and create a simple interface for managing the optimization process. NiaPy offers:
3779

@@ -40,68 +82,67 @@ Our mission is to build a collection of nature-inspired algorithms and create a
4082
- easy comparison between nature-inspired algorithms, and
4183
- export of results in various formats such as Pandas DataFrame, JSON or even Excel.
4284

85+
## 📦 Installation
4386

44-
# Installation
45-
46-
Install NiaPy with pip:
87+
To install `NiaPy` with pip, use:
4788

4889
```sh
4990
pip install niapy
5091
```
5192

52-
To install NiaPy with conda, use:
93+
To install `NiaPy` with conda, use:
5394

5495
```sh
5596
conda install -c niaorg niapy
5697
```
5798

58-
To install NiaPy on Fedora, use:
99+
To install `NiaPy` on Fedora, use:
59100

60101
```sh
61102
dnf install python3-niapy
62103
```
63104

64-
To install NiaPy on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):
105+
To install `NiaPy` on Arch Linux, use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):
65106

66107
```sh
67108
yay -Syyu python-niapy
68109
```
69110

70-
To install NiaPy on Alpine Linux, please enable Community repository and use:
111+
To install `NiaPy` on Alpine Linux, enable Community repository and use:
71112

72113
```sh
73114
apk add py3-niapy
74115
```
75116

76-
To install NiaPy on NixOS, please use:
117+
To install `NiaPy` on NixOS, use:
77118

78119
```sh
79120
nix-env -iA nixos.python310Packages.niapy
80121
```
81122

82-
To install NiaPy on Void Linux, use:
123+
To install `NiaPy` on Void Linux, use:
83124

84125
```sh
85126
xbps-install -S python3-niapy
86127
```
87128

88-
## Install from source
129+
### Installation from source
89130

90-
In case you want to install directly from the source code, use:
131+
To install `NiaPy` directly from the source code, use:
91132

92133
```sh
93134
pip install git+https://github.com/NiaOrg/NiaPy.git
94135
```
95136

96-
# Algorithms
137+
## 🧠 Algorithms
97138

98139
[Click here](Algorithms.md) for the list of implemented algorithms.
99140

100-
# Problems
141+
## 🧪 Problems
101142

102143
[Click here](Problems.md) for the list of implemented test problems.
103144

104-
# Usage
145+
## 🚀 Usage
105146

106147
After installation, you can import NiaPy as any other Python module:
107148

@@ -111,10 +152,9 @@ $ python
111152
>>> niapy.__version__
112153
```
113154

114-
115155
Let's go through a basic and advanced example.
116156

117-
## Basic Example
157+
### Basic Example
118158
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.
119159

120160
```python
@@ -144,7 +184,7 @@ Given example can be run with *python basic_example.py* command and should give
144184
0.06732518679742806
145185
```
146186

147-
## Advanced Example
187+
### Advanced Example
148188

149189
In this example we will show you how to implement a custom problem class and use it with any of
150190
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.
204244

205245
More advanced examples can also be found in the [NiaPy-examples repository](https://github.com/NiaOrg/NiaPy-examples).
206246

207-
208-
209-
# Cite us
210-
211-
Are you using NiaPy in your project or research? Please cite us!
212-
213-
## Plain format
214-
215-
```
216-
Vrbančič, G., Brezočnik, L., Mlakar, U., Fister, D., & Fister Jr., I. (2018).
217-
NiaPy: Python microframework for building nature-inspired algorithms.
218-
Journal of Open Source Software, 3(23), 613\. <https://doi.org/10.21105/joss.00613>
219-
```
220-
221-
## Bibtex format
222-
223-
```
224-
@article{NiaPyJOSS2018,
225-
author = {Vrban{\v{c}}i{\v{c}}, Grega and Brezo{\v{c}}nik, Lucija
226-
and Mlakar, Uro{\v{s}} and Fister, Du{\v{s}}an and {Fister Jr.}, Iztok},
227-
title = {{NiaPy: Python microframework for building nature-inspired algorithms}},
228-
journal = {{Journal of Open Source Software}},
229-
year = {2018},
230-
volume = {3},
231-
issue = {23},
232-
issn = {2475-9066},
233-
doi = {10.21105/joss.00613},
234-
url = {https://doi.org/10.21105/joss.00613}
235-
}
236-
```
237-
238-
## RIS format
239-
240-
```
241-
TY - JOUR
242-
T1 - NiaPy: Python microframework for building nature-inspired algorithms
243-
AU - Vrbančič, Grega
244-
AU - Brezočnik, Lucija
245-
AU - Mlakar, Uroš
246-
AU - Fister, Dušan
247-
AU - Fister Jr., Iztok
248-
PY - 2018
249-
JF - Journal of Open Source Software
250-
VL - 3
251-
IS - 23
252-
DO - 10.21105/joss.00613
253-
UR - http://joss.theoj.org/papers/10.21105/joss.00613
254-
```
255-
256-
## Contributors ✨
247+
## 🫂 Contributors
257248

258249
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
259250

@@ -301,16 +292,63 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
301292

302293
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!
303294

304-
## Contributing
295+
## 🙇 Contributing
305296

306297
We encourage you to contribute to NiaPy! Please check out the [Contributing to NiaPy guide](CONTRIBUTING.md) for guidelines about how to proceed.
307298

308299
Everyone interacting in NiaPy's codebases, issue trackers, chat rooms and mailing lists is expected to follow the NiaPy [code of conduct](CODE_OF_CONDUCT.md).
309300

310-
## Licence
301+
## 🔑 License
311302

312303
This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.
313304

314305
## Disclaimer
315306

316307
This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!
308+
309+
## 📄 Cite us
310+
311+
Are you using NiaPy in your project or research? Please cite us!
312+
313+
### Plain format
314+
315+
```
316+
Vrbančič, G., Brezočnik, L., Mlakar, U., Fister, D., & Fister Jr., I. (2018).
317+
NiaPy: Python microframework for building nature-inspired algorithms.
318+
Journal of Open Source Software, 3(23), 613\. <https://doi.org/10.21105/joss.00613>
319+
```
320+
321+
### Bibtex format
322+
323+
```bibtex
324+
@article{NiaPyJOSS2018,
325+
author = {Vrban{\v{c}}i{\v{c}}, Grega and Brezo{\v{c}}nik, Lucija
326+
and Mlakar, Uro{\v{s}} and Fister, Du{\v{s}}an and {Fister Jr.}, Iztok},
327+
title = {{NiaPy: Python microframework for building nature-inspired algorithms}},
328+
journal = {{Journal of Open Source Software}},
329+
year = {2018},
330+
volume = {3},
331+
issue = {23},
332+
issn = {2475-9066},
333+
doi = {10.21105/joss.00613},
334+
url = {https://doi.org/10.21105/joss.00613}
335+
}
336+
```
337+
338+
### RIS format
339+
340+
```
341+
TY - JOUR
342+
T1 - NiaPy: Python microframework for building nature-inspired algorithms
343+
AU - Vrbančič, Grega
344+
AU - Brezočnik, Lucija
345+
AU - Mlakar, Uroš
346+
AU - Fister, Dušan
347+
AU - Fister Jr., Iztok
348+
PY - 2018
349+
JF - Journal of Open Source Software
350+
VL - 3
351+
IS - 23
352+
DO - 10.21105/joss.00613
353+
UR - http://joss.theoj.org/papers/10.21105/joss.00613
354+
```

0 commit comments

Comments
 (0)