Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD configured #1

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Created by https://www.toptal.com/developers/gitignore/api/django,python,pycharm,jupyternotebooks,visualstudiocode,r,macos,latex,c,c++,cmake
# Edit at https://www.toptal.com/developers/gitignore?templates=django,python,pycharm,jupyternotebooks,visualstudiocode,r,macos,latex,c,c++,cmake
baseline/
# Created by https://www.toptal.com/developers/gitignore/api/django,python,pycharm,jupyternotebooks,visualstudiocode,r,macos,latex,c,c++
# Edit at https://www.toptal.com/developers/gitignore?templates=django,python,pycharm,jupyternotebooks,visualstudiocode,r,macos,latex,c,c++
baseline/*

### C ###
# Prerequisites
Expand Down Expand Up @@ -75,23 +75,6 @@ dkms.conf

# Executables

### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps

### CMake Patch ###
# External projects
*-prefix/

### Django ###
*.log
*.pot
Expand Down Expand Up @@ -891,4 +874,4 @@ rsconnect/
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/django,python,pycharm,jupyternotebooks,visualstudiocode,r,macos,latex,c,c++,cmake
# End of https://www.toptal.com/developers/gitignore/api/django,python,pycharm,jupyternotebooks,visualstudiocode,r,macos,latex,c,c++
7 changes: 5 additions & 2 deletions .idea/syncombat.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 28 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
# Travis CI/CD configuration file
branches:
only:
- main

language: python
python:
- "3.9"
# - "python-nightly"

before_install:
- export CI_BUILD_CPU_ONLY=1
- curl -sSL https://install.python-poetry.org | python -
- export PATH="$HOME/.poetry/bin:$PATH"
- export PATH="$HOME/.poetry/bin:$PATH"
- cd $TRAVIS_BUILD_DIR && echo $TRAVIS_BUILD_DIR

cache:
directories:
- $HOME/.cache/pypoetry
- $HOME/.cache/pip

language: python
python:
- "3.11"

# command to install dependencies
install:
- make install

# command to run tests
script:
- make test
# Run jobs for CI
jobs:
include:
- stage: "Lint"
name: "Linting using Ruff"
script: make lint

- stage: "Testing"
name: "Unit Testing"
script: make test
# - stage: "Build"
# name: "Build"
# script: poetry build
# - stage: "Deploy"
# name: "Deploy"
# script: poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# A Makefile that runs the important commands for the project
# This should include running the tests, linting, and building the project
.PHONY: test lint install all
.DEFAULT_GOAL := help

# Run the tests, coverage and coverage badge for the syncombat package
test:
poetry run pytest --cov=syncombat --cov-report=term-missing --mpl-generate-path=baseline tests/
poetry run coverage-badge -o badges/coverage.svg -f

# Lint the project
lint:
poetry run ruff check syncombat tests --line-length 120

# Install the project using poetry
install:
poetry install

# Build the project
all: install lint test

clean-build:
rm -rf dist/
rm -rf build/
find . -name '*.egg-info' -exec rm -rf {} +
find . -name '*.egg' -exec rm -rf {} +


help:
@echo "test - run the tests, coverage and coverage badge for the syncombat package"
@echo "lint - lint the project"
@echo "install - install the project using poetry"
@echo "all - build the project"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SynComBat
[![Build Status](https://app.travis-ci.com/sssilvar/syncombat.svg?branch=main)](https://app.travis-ci.com/sssilvar/syncombat)
![codecov](badges/coverage.svg)

**SynComBat** is a Python package for generating biased synthetic data following the ComBat model. It provides a framework for generating synthetic datasets with built-in support for introducing biases, incorporating random effects, and applying data transformations.
Expand Down
6 changes: 3 additions & 3 deletions badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
382 changes: 380 additions & 2 deletions examples/generating-unbiased-phenotypes.ipynb

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions main.py

This file was deleted.

Loading