From 25d341aee5dc4c146593bbb25f61248b5d41e840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Wed, 12 Apr 2023 17:40:25 +0200 Subject: [PATCH] Update samples and Readme --- .github/workflows/main.yml | 6 +++--- README.md | 11 +++++++---- pyproject.toml | 5 +++-- samples/CMakeLists.txt | 2 +- samples/sample.py | 4 ++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6adbf1b..1c2f576 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,14 +20,14 @@ jobs: with: submodules: recursive - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - name: Install dependencies run: | pip install -q --upgrade pip pip install -q scikit-learn cython - pip install -q --upgrade codecov coverage black flake8 codacy-coverage + pip install -q coverage black flake8 codacy-coverage - name: Build and install run: | make install @@ -40,7 +40,7 @@ jobs: coverage run -m unittest discover -v -s src coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml diff --git a/README.md b/README.md index 5cfe03a..ef60d30 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,12 @@ python samples/sample.py -h # for more options ```bash cd samples -mkdir build +cmake -B build cd build -cmake .. -make -./sample iris +make sample +./sample -f iris +./sample -h ``` + +### Based on +[https://github.com/rmontanana/mdlp](https://github.com/rmontanana/mdlp) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e3cc5fc..229bfd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dynamic = ['version'] dependencies = ["numpy", "joblib", "scikit-learn"] requires-python = ">=3.9" classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Topic :: Software Development", @@ -33,6 +33,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] [project.urls] @@ -40,7 +41,7 @@ Home = "https://github.com/doctorado-ml/FImdlp" [tool.black] line-length = 79 -target_version = ['py39', 'py310'] +target_version = ['py39', 'py310', 'py311'] include = '\.pyi?$' exclude = ''' /( diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index d10d2a9..ace3c51 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.20) -project(main) +project(sample) set(CMAKE_CXX_STANDARD 11) diff --git a/samples/sample.py b/samples/sample.py index d671ddb..781b9e8 100644 --- a/samples/sample.py +++ b/samples/sample.py @@ -44,10 +44,10 @@ test = FImdlp( now = time.time() test.fit(X, y) fit_time = time.time() -print("Fitting: ", fit_time - now) +print(f"Fitting ....: {fit_time - now:7.5f} seconds") now = time.time() Xt = test.transform(X) -print("Transforming: ", time.time() - now) +print(f"Transforming: {time.time() - now:7.5f} seconds") print(test.get_cut_points()) clf = RandomForestClassifier(random_state=0) print(