Skip to content
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
124 changes: 124 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Python CircleCI 2.1 configuration file
# Check https://circleci.com/docs/2.1/language-python/ for more details
#
# https://coveralls.io/github/eustomaqua/PyFairness
# https://circleci.com/developer/orbs/orb/coveralls/coveralls
# https://docs.codacy.com/coverage-reporter/#generating-coverage
#
version: 2.1

# Aliases to reuse
_defaults: &defaults
docker:
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/developer/images/image/cimg/python
- image: cimg/python:3.11.8
# - image: cimg/python:3.12
working_directory: ~/project


jobs:
build-and-test:
<<: *defaults
steps:
- checkout

- run:
name: Run tests
command: |
pip install --upgrade setuptools pip
pip install -r requirements.txt
pip install carbontracker pytest
pip install coverage coveralls pytest-xdist
coverage run -m pytest --ignore-glob="*/excl_test_*,*/*excl.py,*/pkgs*"
coverage report
coverage html
# rm *.png && rm *.csv && rm *.log
coverage xml
export CODACY_PROJECT_TOKEN=c3b63ca4c921490eb82dfd6f7afa2b98
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml
# bash <(curl -Ls https://coverage.codacy.com/get.sh)
# python -m pytest fairml/facils/excl_test*
# rm chart*.pdf && rm cheers*.pdf && rm fairgbm*.pdf
# export CODACY_PROJECT_TOKEN=e5364f1287c94650b2575c849d47c40a
# export CODECOV_TOKEN=c7609124-b53c-4019-a893-cec9f98cfe97
# export COVERALLS_REPO_TOKEN=vVh9U1eIjWuYcPfvpPaNif7kL8rJA6iRZ

- persist_to_workspace:
root: ~/project
paths:
- .

workflows:
version: 2
default:
jobs:
- build-and-test

# orbs:
# coveralls: coveralls/coveralls@2.2.5
# orbs:
# codecov: codecov/codecov@5
# workflows:
# upload-to-codecov:
# jobs:
# - checkout
# - codecov/upload

# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload coverage reports to Coveralls
# uses: coveralls/coveralls@2.2.5
# with:
# token: ${{ secrets.COVERALLS_REPO_TOKEN }}




# # Use the latest 2.1 version of CircleCI pipeline process engine.
# # See: https://circleci.com/docs/configuration-reference
#
# # For a detailed guide to building and testing with Python, read the docs:
# # https://circleci.com/docs/language-python/ for more details
# version: 2.1
#
# # Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# # See: https://circleci.com/docs/orb-intro/
# orbs:
# # See the Python orb documentation here: https://circleci.com/developer/orbs/orb/circleci/python
# python: circleci/python@2.1.1
#
# # Define a job to be invoked later in a workflow.
# # See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
# jobs:
# build-and-test:
# # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
# docker:
# # Specify the version you desire here
# # See:https://circleci.com/developer/images/image/cimg/python
# - image: cimg/python:3.12
#
# # Add steps to the job
# # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
# steps:
# # Checkout the code as the first step.
# - checkout
# - python/install-packages:
# pkg-manager: pip
# # app-dir: ~/project/package-directory/ # If your requirements.txt isn't in the root directory.
# # pip-dependency-file: test-requirements.txt # if you have a different name for your requirements file, maybe one that combines your runtime and test requirements.
# - run:
# name: Run tests
# # This assumes pytest is installed via the install-package step above
# command: pytest
#
# # Orchestrate jobs using workflows
# # See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
# workflows:
# sample: # This is the name of the workflow, feel free to change it to better match your workflow.
# # Inside the workflow, you define the jobs you want to run.
# jobs:
# - build-and-test
1 change: 0 additions & 1 deletion .coverage

This file was deleted.

6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

223 changes: 213 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,219 @@
# ignore files
.DS_Store
*/.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# ignore folders
*.DS_Store
*.pdf
# .DS_Store # ignore files
# */.DS_Store
# */__pycache__/ # ignore folders
.idea/
.vscode/
.pytest_cache/
# Codacy, Coverage
# coverage.xml
# htmlcov/

# Byte-compiled / optimized / DLL files
__pycache__/
*/__pycache__/

# Codacy, Coverage
coverage.xml
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Cursor
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
# refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/
Loading