22 Commits

Author SHA1 Message Date
0fdd754050 Add constant features treatment 2023-10-13 13:35:24 +02:00
7035cc4edc Update readme 2022-05-19 17:52:54 +02:00
edc8816041 Update Setup and __init__ 2022-05-19 17:46:00 +02:00
20db8c5745 Add version to _version file, method and test 2022-05-19 17:36:59 +02:00
a9384685fe Clean main.yml 2022-05-19 17:27:40 +02:00
86aaf23dd9 Patch main.yml 2022-05-19 17:18:45 +02:00
9395e8cc23 Patch main.yml 2022-05-19 17:08:44 +02:00
5723da9535 Patch main.yml 2022-05-19 16:46:25 +02:00
fb4ed468b0 Patch main.yml 2022-05-19 16:37:19 +02:00
57334a0b74 Patch main.yml 2022-05-19 16:31:37 +02:00
c47f69847e Patch main.yml 2022-05-19 16:22:31 +02:00
4532309309 Patch main.yml 2022-05-19 16:09:36 +02:00
aa53e3dbc0 update main.yml 2022-05-19 14:22:10 +02:00
2861e22c57 Update main using checkout@v3 2022-05-19 12:53:14 +02:00
e0acd6d239 Update main.yml 2022-05-19 12:30:29 +02:00
3d98a39d4b Update sonar.sources 2022-05-19 11:57:44 +02:00
1a4de38328 Update sonar.project.properties 2022-05-19 11:52:23 +02:00
a9c40f1fb7 Fix issue in gh action 2022-05-19 11:46:48 +02:00
81da48ec31 Fix format issue 2022-05-19 11:41:09 +02:00
2548ab8533 Update formatter version 2022-05-19 11:37:45 +02:00
08cade5dec Add sonarqube scanner to gh actions 2022-05-19 11:21:55 +02:00
0a13f5e5eb Update main.yml requirements 2022-05-19 01:20:11 +02:00
7 changed files with 43 additions and 34 deletions

View File

@@ -1,23 +0,0 @@
name: Build
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -12,11 +12,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python: [3.8, "3.10"]
os: [ubuntu-latest]
python: ["3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
@@ -28,12 +30,35 @@ jobs:
pip install -q numpy
pip install -q git+https://github.com/doctorado-ml/mdlp
pip install -q -r requirements/dev.txt
pip install -q --upgrade codecov coverage black flake8 codacy-coverage
pip install -q --upgrade codecov coverage black flake8 codacy-coverage unittest-xml-reporting
- name: Lint
run: |
black --check --diff mufs
flake8 --count mufs
- name: Tests & coverage
run: |
coverage run -m unittest -v mufs.tests
mkdir .report
coverage run -m xmlrunner -v mufs.tests -o .report
coverage xml -i -o .report/coverage.xml
coverage report -m --fail-under=100
- name: Get project version
run: echo "project_version=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Override Coverage Source Path for Sonar
run: sed -i 's/\/home\/runner\/work\/mufs\/mufs\//\/github\/workspace\//g' .report/coverage.xml
- name: SonarQube scanner
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectVersion=${{ env.project_version }}
-Dsonar.python.coverage.reportPaths=.report/coverage.xml
-Dsonar.python.xunit.reportPath=.report/TEST*
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
- name: Quality Gate
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/ambv/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
exclude: ".virtual_documents"
language_version: python3.8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
rev: 3.9.2
hooks:
- id: flake8
exclude: ".virtual_documents"
@@ -16,7 +16,7 @@ repos:
# - id: mypy
# # args: [--strict, --ignore-missing-imports]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: check-case-conflict

View File

@@ -2,9 +2,9 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/66ad727eb13e4c7a8816db1e44d994a7)](https://www.codacy.com/gh/Doctorado-ML/mufs/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Doctorado-ML/mufs&utm_campaign=Badge_Grade)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Doctorado-ML/mufs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Doctorado-ML/mufs/context:python)
[![PyPI version](https://badge.fury.io/py/MUFS.svg)](https://badge.fury.io/py/MUFS)
[![Technical Debt](https://haystack.rmontanana.es:25000/api/project_badges/measure?project=mufs&metric=sqale_index&token=1119a3bfd4025d50ef3009a44c600c16670ee31a)](https://haystack.rmontanana.es:25000/dashboard?id=mufs)
[![Quality Gate Status](https://haystack.rmontanana.es:25000/api/project_badges/measure?project=mufs&metric=alert_status&token=1119a3bfd4025d50ef3009a44c600c16670ee31a)](https://haystack.rmontanana.es:25000/dashboard?id=mufs)
![https://img.shields.io/badge/python-3.8%2B-blue](https://img.shields.io/badge/python-3.8%2B-brightgreen)
[![Security Rating](https://haystack.rmontanana.es:25000/api/project_badges/measure?project=mufs&metric=security_rating&token=1119a3bfd4025d50ef3009a44c600c16670ee31a)](http://haystack.local:25000/dashboard?id=mufs)
[![Technical Debt](https://haystack.rmontanana.es:25000/api/project_badges/measure?project=mufs&metric=sqale_index&token=1119a3bfd4025d50ef3009a44c600c16670ee31a)](http://haystack.local:25000/dashboard?id=mufs)
# MUFS

View File

@@ -172,6 +172,10 @@ class MUFS:
id_selected = idx
merit = merit_new
candidates.pop()
if id_selected is None:
# No more features to add all merits are nan because of
# constant features
break
candidates.append(feature_order[id_selected])
self._scores.append(merit)
del feature_order[id_selected]

View File

@@ -1,3 +1,3 @@
-r production.txt
mdlp
pandas
pandas

View File

@@ -1 +1,4 @@
sonar.projectKey=mufs
sonar.sourceEncoding=UTF-8
sonar.sources=.
sonar.python.version=3.8, 3.9, 3.10