mirror of
https://github.com/Doctorado-ML/mufs.git
synced 2025-08-18 17:15:52 +00:00
Compare commits
22 Commits
add_versio
...
main
Author | SHA1 | Date | |
---|---|---|---|
0fdd754050
|
|||
7035cc4edc
|
|||
edc8816041
|
|||
20db8c5745
|
|||
a9384685fe
|
|||
86aaf23dd9
|
|||
9395e8cc23
|
|||
5723da9535
|
|||
fb4ed468b0
|
|||
57334a0b74
|
|||
c47f69847e
|
|||
4532309309
|
|||
aa53e3dbc0
|
|||
2861e22c57
|
|||
e0acd6d239
|
|||
3d98a39d4b
|
|||
1a4de38328
|
|||
a9c40f1fb7
|
|||
81da48ec31
|
|||
2548ab8533
|
|||
08cade5dec
|
|||
0a13f5e5eb
|
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@@ -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 }}
|
35
.github/workflows/main.yml
vendored
35
.github/workflows/main.yml
vendored
@@ -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 }}
|
||||
|
@@ -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
|
||||
|
@@ -2,9 +2,9 @@
|
||||
[](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)
|
||||
[](https://lgtm.com/projects/g/Doctorado-ML/mufs/context:python)
|
||||
[](https://badge.fury.io/py/MUFS)
|
||||
[](https://haystack.rmontanana.es:25000/dashboard?id=mufs)
|
||||
[](https://haystack.rmontanana.es:25000/dashboard?id=mufs)
|
||||

|
||||
[](http://haystack.local:25000/dashboard?id=mufs)
|
||||
[](http://haystack.local:25000/dashboard?id=mufs)
|
||||
|
||||
# MUFS
|
||||
|
||||
|
@@ -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]
|
||||
|
@@ -1,3 +1,3 @@
|
||||
-r production.txt
|
||||
mdlp
|
||||
pandas
|
||||
pandas
|
@@ -1 +1,4 @@
|
||||
sonar.projectKey=mufs
|
||||
sonar.sourceEncoding=UTF-8
|
||||
sonar.sources=.
|
||||
sonar.python.version=3.8, 3.9, 3.10
|
Reference in New Issue
Block a user