Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
juanbc committed Feb 8, 2024
2 parents d5802e4 + 5f829f7 commit 3bf9f32
Show file tree
Hide file tree
Showing 103 changed files with 4,218 additions and 454 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- pull_request

env:
default-python: 3.9
default-python: '3.10'

jobs:
testing:
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@6db4ae6bfd66bd03d52bd82b780b30770fff3247
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@ccb10d1900e528cea481f170ad76cac2c15c283b
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
testing:
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@6db4ae6bfd66bd03d52bd82b780b30770fff3247
uses: quatrope/scikit-criteria/.github/workflows/tests.yml@ccb10d1900e528cea481f170ad76cac2c15c283b

deploy:
needs: testing
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
workflow_call:

env:
default-python: 3.9
default-python: '3.10'

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
tox_env: [py38, py39, py310, py311]
os: [ubuntu-latest, windows-latest, macos-latest]
tox_env: [py39, py310, py311, py312]
include:
- tox_env: style
- tox_env: docstyle
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ setuptools-*.zip
.vscode/
result_images/
docs/source/_dynamic/*.rst
**/.ipynb_checkpoints
2 changes: 1 addition & 1 deletion .header-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# -*- coding: utf-8 -*-
# License: BSD-3 (https://tldrlegal.com/license/bsd-3-clause-license-(revised))
# Copyright (c) 2016-2021, Cabral, Juan; Luczywo, Nadia
# Copyright (c) 2022, 2023, QuatroPe
# Copyright (c) 2022, 2023, 2024 QuatroPe
# All rights reserved.
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@

<!-- BODY -->

## Version 0.8.7

- **New** Added functionality for user extension of scikit-criteria with
decorators for creating aggregation and transformation models using
functions.

```python
>>> from skcriteria.extend import mkagg, mktransformer
>>>
>>> @mkagg
>>> def MyAgg(**kwargs):
>>> # Implementation of the aggregation function
>>>
>>> @mkagg(foo=1)
>>> def MyAggWithHyperparam(**kwargs):
>>> # Implementation of the aggregation function with
>>> # hyperparameter 'foo'
>>>
>>> @mktransformer
>>> def MyTransformer(**kwargs):
>>> # Implementation of the transformation function
>>>
>>> @mktransformer(bar=2)
>>> def MyTransformerWithHyperparam(**kwargs):
>>> # Implementation of the transformation function with
>>> # hyperparameter 'bar'
```

These decorators enable the creation of aggregation and transformation
classes based on provided functions, allowing users to
define decision-making models with less flexibility than traditional
inheritance-based models.

- **New Module:** Introduced the `skcriteria.testing` module, exposing utility functions for for comparing objects created in Scikit-Criteria in a testing environment. These functions facilitate the comparison of instances of the `DecisionMatrix`, `ResultABC`, and `RanksComparator` classes.

The assertion functions utilize pandas and numpy testing utilities for comparing matrices, series, and other attributes.

- **New** The API of the agg, pipeline, preprocessing, and extend modules has
been cleaned up to prevent autocompletion with imports from other modules.
The imported modules are still present, but they are excluded when attempting
to autocomplete. This functionality is achieved thanks to the context manager
`skcriteria.utils.cmanagers.hidden()`.

- **New** All methods (agg and transformers) has a new `get_method_name`
instance method.

- **Drop** Drop support for Python 3.8

---

## Version 0.8.6

- **New** Rank reversal 1 implementhed in the `RankInvariantChecker` class
Expand All @@ -26,18 +76,21 @@
- Now all cached methods and properties are stored inside the instance.
Previously this was stored inside the class generating a memoryleak.

---

## Version 0.8.3

- Fixed a bug detected on the EntropyWeighted, Now works as the literature
specifies

---

## Version 0.8.2

- We bring back Python 3.7 because is the version used in google.colab.
- Bugfixes in `plot.frontier` and `dominance.eq`.

---

## Version 0.8

Expand Down Expand Up @@ -99,6 +152,8 @@
- `skcriteria.core.methods.SKCMatrixAndWeightTransformerABC` `->`
`skcriteria.preprocessing.SKCMatrixAndWeightTransformerABC`
---
## Version 0.7
- **New method**: `ELECTRE2`.
Expand All @@ -120,6 +175,7 @@
- `kernel_size_` to know the number of alternatives in the kernel.
- `kernel_where_` was replaced by `kernelwhere_` to standardize the api.
---
## Version 0.6
Expand All @@ -140,6 +196,8 @@
- New deprecation mechanism through the
- `skcriteria.utils.decorators.deprecated` decorator.
---
## Version 0.5
In this version scikit-criteria was rewritten from scratch. Among other things:
Expand All @@ -153,10 +211,14 @@ In this version scikit-criteria was rewritten from scratch. Among other things:
**Full Changelog**: https://github.com/quatrope/scikit-criteria/commits/0.5
---
## Version 0.2
First OO stable version.
---
## Version 0.1
Only functions.
7 changes: 7 additions & 0 deletions docs/source/api/extend.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.extend`` module
==============================

.. automodule:: skcriteria.extend
:members:
:undoc-members:
:show-inheritance:
11 changes: 10 additions & 1 deletion docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@

pipeline

.. toctree::
:maxdepth: 2

extend

.. toctree::
:maxdepth: 2

utils/index
testing


.. toctree::
:maxdepth: 2

utils/index

.. toctree::
:maxdepth: 2
Expand Down
7 changes: 7 additions & 0 deletions docs/source/api/testing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.testing`` module
==============================

.. automodule:: skcriteria.testing
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/utils/dict_cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.utils.dict_cmp`` module
========================================

.. automodule:: skcriteria.utils.dict_cmp
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/utils/object_diff.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
``skcriteria.utils.object_diff`` module
========================================

.. automodule:: skcriteria.utils.object_diff
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

# General information about the project.
project = skcriteria.NAME
copyright = "2016-2021, Juan B. Cabral - Nadia A. Luczywo - Copyright (c) 2022, QuatroPe"
copyright = "2016-2021, Juan B. Cabral - Nadia A. Luczywo - Copyright (c) 2022-2024, QuatroPe"


author = "Juan BC"
Expand Down Expand Up @@ -302,7 +302,7 @@
for md_name, rst_name in DYNAMIC_RST.items():
md_path = SKCRITERIA_PATH / md_name
with open(md_path) as fp:
readme_md = fp.read().split("<!-- BODY -->")[-1]
readme_md = fp.read().split("<!-- BODY -->", 1)[-1]

rst_path = CURRENT_PATH / "_dynamic" / rst_name

Expand Down
8 changes: 0 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ Ver. |version|

----

|
.. warning::
If you are using Scikit-Criteria version **<= 0.2.11** check the
documentation here: https://scikit-criteria.readthedocs.io/en/0.2/

|
.. Here we render the README.md of the repository as a main page
.. include:: _dynamic/README.rst

Expand Down
Loading

0 comments on commit 3bf9f32

Please sign in to comment.