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

Huge refactor #309

Merged
merged 13 commits into from May 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Expand Up @@ -7,7 +7,7 @@ serialize =
{major}.{minor}.{patch}rc{rc}
{major}.{minor}.{patch}

[bumpversion:file:NiaPy/__init__.py]
[bumpversion:file:niapy/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

Expand Down
13 changes: 6 additions & 7 deletions .flake8
@@ -1,5 +1,5 @@
[flake8]
ignore = E203,E266,E501,W503,D302,D401,D413,D414,D202,RST210,RST299,RST304,RST305,RST399,FI
ignore = E126, E501, D302,D401,D413,D414,D202,RST210,RST299,RST304,RST305,RST399,FI
exclude =
.git,
__pycache__,
Expand All @@ -8,10 +8,9 @@ exclude =
build,
dist,
scent.py
per-file-ignores =
NiaPy/tests/*:B007,D100,D101,D102,D107,D208,D211,D413,E117,E302,E701,E704,F841,S110,W191,W293,D204,RST210,E101,D204,D205,D206,E741
NiaPy/algorithms/*:B305,B007,D100,D101,D102,D107,D204,D206,D413,E101,E117,E126,E302,E305,E701,E704,E711,E741,F812,RST201,RST203,RST204,RST210,RST301,W191
NiaPy/task/*:E701
NiaPy/util/*:W191,E117,E305,E302,E704,E701,RST203,D204,E306,D100
NiaPy/benchmarks/*:W191,E117,E305,E302,E704,E701,RST203,D204,E306,D206,D208
per-file-ignores =
niapy/tests/*:B007,D100,D101,D102,D107,D208,D211,D413,E117,E302,E701,E704,F841,S110,W191,W293,D204,RST210,E101,D204,D205,D206,E741
niapy/algorithms/*:B007,D100,D101,D102,D107,D204,D206,D413,RST201,RST203,RST204,RST210,RST301
niapy/util/*:RST203,D100
niapy/benchmarks/*:W191,RST203,D204,D206,D208

10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 9
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
env:
MPLBACKEND: "agg"
steps:
Expand All @@ -27,13 +27,13 @@ jobs:
pipenv install --skip-lock --dev
- name: Lint with flake8
run: |
pipenv run flake8 NiaPy tests scent.py setup.py
pipenv run flake8 niapy tests scent.py setup.py
- name: Check codestyle
run: |
pipenv run pycodestyle NiaPy tests scent.py setup.py --config=.pycodestyle.ini
pipenv run pycodestyle niapy tests scent.py setup.py --config=.pycodestyle.ini
- name: Check docstyle
run: |
pipenv run pydocstyle NiaPy tests scent.py setup.py
pipenv run pydocstyle niapy tests scent.py setup.py
- name: Run tests
run: |
pipenv run pytest -ra -vv --random --random-seed=32786 --cov=NiaPy --no-cov-on-fail --cov-report=term-missing:skip-covered --cov-report=html NiaPy tests --junitxml=xmlreport/overall.xml
pipenv run pytest -ra -vv --random --random-seed=32786 --cov=niapy --no-cov-on-fail --cov-report=term-missing:skip-covered --cov-report=html niapy tests --junitxml=xmlreport/overall.xml
20 changes: 2 additions & 18 deletions .pycodestyle.ini
Expand Up @@ -3,21 +3,5 @@
# E401 multiple imports on one line (checked by PyLint)
# E402 module level import not at top of file (checked by PyLint)
# E501: line too long (checked by PyLint)
# E711: comparison to None (used to improve test style)
# E712: comparison to True (used to improve test style)
# W191: intentation contains tabs
# E701: multiple statements on one line (dolon)
# E704: multiple statements on one line (def)
# E101: intentation contains mixed spaces nad tabs
# E242: tab after ':'
# E302: expected 2 blank lines
# E305: expected 2 blank lines after class or function definition
# E306: expected 1 blank line befor a nested definition
# E274: tab vefore keyword
# D204: 1 blank line required after class docstring
# D413: Missing blank line after last section
# E126: cntinuation line over-indented for hanging indent
# E702: Multiple statemets on one line (semicolon)
# E111 indentation is not a multiple of four
# E741 ambiguous variable name 'I'
ignore = E401,E402,E501,E711,E712,W504,W191,E701,E704,E101,E242,E302,E305,E306,E274,D204,D413,E126,E702,E111,E741,E117
# E126: continuation line over-indented for hanging indent
ignore = E401,E402,E501,E711,E712,E126
10 changes: 2 additions & 8 deletions .pydocstyle.ini
@@ -1,18 +1,12 @@
[pydocstyle]

# D211: No blank lines allowed before class docstring
add_select = D211
# add_select = D211

# D100: Missing docstring in public module
# D101: Missing docstring in public class
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D105: Missing docstring in magic method
# D107: Missing docstring in __init__
# D202: No blank lines allowed after function docstring
# D204: 1 blank line required after class docstring
# D206: Docstring should be indented with spaces, not tabs
# D413: Missing blank line after last section
# D414: Section has no content ('Returns')
add_ignore = D100,D101,D102,D103,D104,D105,D107,D202,D204,D206,D301,D302,D402,D413,D414
add_ignore = D100,D101,D102,D103,D104,D105
2 changes: 1 addition & 1 deletion Makefile
@@ -1,6 +1,6 @@
# Project settings
PROJECT := NiaPy
PACKAGE := NiaPy
PACKAGE := niapy
REPOSITORY := NiaOrg/NiaPy

# Project paths
Expand Down
22 changes: 0 additions & 22 deletions NiaPy/algorithms/__init__.py

This file was deleted.