Skip to content

Commit

Permalink
Release/0.2.3 (#81)
Browse files Browse the repository at this point in the history
* Refactor (#74)

* Azure Pipelines replaced by GitHub Actions

* GitHub Actions refactored

* Experiment tests deactivated

* Black applied to all Python files

* PR fixes

* Fix default Latex "rank" macro for score tables (#75)

* Small fixes.

* Fix default rank macro for Latex tables.

* Fix string quotes.

* Fix bracket location.

* Some fixes for the score tables (#76)

* Small fixes.

* Fix default rank macro for Latex tables.

* Fix string quotes.

* Fix bracket location.

* Some fixes.

* Feature/experiment scoring (#77)

* Small fixes.

* Allow to customize the scoring method used.

* Fix URL in UCR datasets. (#79)

* Release 0.2.3

---------

Co-authored-by: Carlos Ramos Carreño <vnmabus@gmail.com>
  • Loading branch information
daviddiazvico and vnmabus authored Jun 19, 2023
1 parent 2231e74 commit 74fb4e4
Show file tree
Hide file tree
Showing 41 changed files with 912 additions and 760 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: CodeClimate upload

on:
workflow_run:
workflows: [Tests]
types:
- completed

jobs:
download:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: 'Download artifact'
uses: actions/github-script@v5
uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand All @@ -32,15 +29,12 @@ jobs:
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/code-coverage-report.zip`, Buffer.from(download.data));
- name: 'Unzip artifact'
run: unzip code-coverage-report.zip

- name: Install dependencies
run: |
pip3 install codecov pytest-cov || pip3 install --user codecov pytest-cov;
- name: Upload coverage to CodeClimate
uses: paambaati/codeclimate-action@v3.0.0
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ on:
push:
branches:
- master
- develop
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/checkout@master
- uses: actions/setup-python@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install package
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand All @@ -33,7 +26,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
16 changes: 4 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
name: Tests

on:
push:
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9']

python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip3 install codecov pytest-cov || pip3 install --user codecov pytest-cov;
- name: Run tests
run: |
#pip3 debug --verbose .
pip3 install --upgrade-strategy eager -v ".[test]"
coverage run --source=skdatasets/ -m pytest;
coverage xml -o coverage.xml # explicitely exporting coverage file to be read by coverage report command.
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage.xml
path: coverage.xml
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Scikit-learn-compatible datasets
[![Tests](https://github.com/daviddiazvico/scikit-datasets/actions/workflows/tests.yml/badge.svg)](https://github.com/daviddiazvico/scikit-datasets/actions/workflows/tests.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/a37c9ee152b41a0cb577/maintainability)](https://codeclimate.com/github/daviddiazvico/scikit-datasets/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/a37c9ee152b41a0cb577/test_coverage)](https://codeclimate.com/github/daviddiazvico/scikit-datasets/test_coverage)
[![Build Status](https://dev.azure.com/daviddiazvico0337/daviddiazvico/_apis/build/status/daviddiazvico.scikit-datasets?branchName=master)](https://dev.azure.com/daviddiazvico0337/daviddiazvico/_build/latest?definitionId=1&branchName=master)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6383047.svg)](https://doi.org/10.5281/zenodo.6383047)

## Installation
Expand Down
30 changes: 0 additions & 30 deletions azure-pipelines.yml

This file was deleted.

38 changes: 19 additions & 19 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import pytest

collect_ignore = ['setup.py']


def pytest_addoption(parser):
parser.addoption(
"--runslow", action="store_true", default=False, help="run slow tests"
)


def pytest_collection_modifyitems(config, items):
if config.getoption("--runslow"):
# --runslow given in cli: do not skip slow tests
return
skip_slow = pytest.mark.skip(reason="need --runslow option to run")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)
import pytest

collect_ignore = ["setup.py"]


def pytest_addoption(parser):
parser.addoption(
"--runslow", action="store_true", default=False, help="run slow tests"
)


def pytest_collection_modifyitems(config, items):
if config.getoption("--runslow"):
# --runslow given in cli: do not skip slow tests
return
skip_slow = pytest.mark.skip(reason="need --runslow option to run")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)
Loading

0 comments on commit 74fb4e4

Please sign in to comment.