Skip to content

Commit

Permalink
Merge pull request #5 from ayrna/development
Browse files Browse the repository at this point in the history
Codecov inclusion
  • Loading branch information
franberchez authored Nov 22, 2023
2 parents 6f0322a + 7bc2afe commit ac69d72
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 35 deletions.
26 changes: 26 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PR status check
coverage:
status:
project:
default:
target: auto
threshold: 1%
# If true PRs will always pass and reports are just for information
informational: true
patch:
default:
target: auto
threshold: 1%
# If true PRs will always pass and reports are just for information
informational: true

# post coverage report as comment on PR
comment: false

# enable codecov to report to GitHub status checks
github_checks:
annotations: false

# paths to ignore
ignore:
- ".github/"
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[report]
show_missing = True

[run]
branch = True
source = dlordinal
parallel = True
31 changes: 0 additions & 31 deletions .github/workflows/actions.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: "Run Tests"

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
tests:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codecov
pip install pytest-cov
pip install .
- name: Run tests
run: |
pytest -v
codecov:
needs: tests
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codecov
pip install pytest-cov
pip install .
- name: Run tests for codecov
run: |
pytest --cov=dlordinal --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[![!codecov](https://img.shields.io/codecov/c/github/ayrna/dlordinal?label=codecov&logo=codecov)](https://codecov.io/gh/ayrna/dlordinal)

# Deep learning utilities library
## Installation

You can install **dlordinal** directly from the GitHub repository using the following command in your terminal:

pip install git+https://github.com/ayrna/dlordinal.git@main
pip install git+https://github.com/ayrna/dlordinal.git@master

Also, you can clone the repository and then install the library from the local repository folder:

Expand Down
Empty file removed __init__.py
Empty file.
4 changes: 1 addition & 3 deletions dlordinal/models/tests/test_experiment_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from torch import nn
from torch.nn import functional as F

from ..experiment_model import (
ExperimentModel,
) # Reemplaza "your_module" con la ruta real de tu módulo
from ..experiment_model import ExperimentModel


class MockExperimentModel(ExperimentModel):
Expand Down

0 comments on commit ac69d72

Please sign in to comment.