Skip to content

Commit

Permalink
Merge pull request #13 from cvs-health/release-branch/v0.1.0
Browse files Browse the repository at this point in the history
Release of LangFair v0.1.0
  • Loading branch information
dylanbouchard authored Oct 23, 2024
2 parents 066fc1d + d271699 commit 07e6a33
Show file tree
Hide file tree
Showing 100 changed files with 118,443 additions and 34 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
pull_request:

jobs:
run-tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- "3.9"
- "3.10"
- "3.11"

name: Test
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install dependencies
run: python -m pip install pytest pytest-asyncio .

- name: Run tests
run: pytest -v

45 changes: 11 additions & 34 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
constants.py

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -49,7 +51,9 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
cover/
.ruff_cache/
cov-term-missing.txt
cov.xml

# Translations
*.mo
Expand All @@ -72,7 +76,6 @@ instance/
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
Expand All @@ -83,9 +86,7 @@ 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
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand All @@ -94,24 +95,7 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.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

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

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

# Celery stuff
Expand Down Expand Up @@ -148,15 +132,8 @@ dmypy.json
# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/
#Mac things
*.DS_Store

# 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/
#Example generated files
examples/evaluations/text_generation/final_metrics.txt
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.8
hooks:
# Run the linter.
- id: ruff
# args: [ --fix ] # will try to fix linting error on the spot
# types_or: [ python, pyi, jupyter ] # lets you include notebooks in linting
# Run the formatter.
- id: ruff-format
# types_or: [ python, pyi, jupyter ] # lets you include notebooks in formatting
87 changes: 87 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Contributing to LangFair

Welcome and thank you for considering contributing to LangFair!

It takes a lot of time and effort to use software much less build upon it, so we deeply appreciate your desire to help make this project thrive.

## Table of Contents

1. [How to Contribute](#how-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Pull Requests](#pull-requests)
2. [Development Setup](#development-setup)
3. [Style Guides](#style-guides)
- [Code Style](#code-style)
4. [License](#license)

## How to Contribute

### Reporting Bugs

If you find a bug, please report it by opening an issue on GitHub. Include as much detail as possible:
- Steps to reproduce the bug.
- Expected and actual behavior.
- Screenshots if applicable.
- Any other information that might help us understand the problem.

### Suggesting Enhancements

We welcome suggestions for new features or improvements. To suggest an enhancement, please open an issue on GitHub and include:
- A clear description of the suggested enhancement.
- Why you believe this enhancement would be useful.
- Any relevant examples or mockups.

### Pull Requests

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature-name`).
3. Make your changes.
4. Commit your changes (`git commit -m 'Add some feature'`).
5. Push to the branch (`git push origin feature/your-feature-name`).
6. Open a pull request.

Please ensure your pull request adheres to the following guidelines:
- Follow the project's code style.
- Include tests for any new features or bug fixes.

## Development Setup

1. Clone the repository: `git clone https://github.aetna.com/cvs-health/langfair`
2. Navigate to the project directory: `cd langfair`
3. Create and activate a virtual environment (using `venv` or `conda`)
4. Install dependencies: `poetry install`
5. Install our pre-commit hooks to ensure code style compliance: `pre-commit install`
6. Run tests to ensure everything is working: `pre-commit run --all-files`

You're ready to develop!

**For documentation contributions**
Our documentation lives on the gh-pages branch and is hosted via GitHub Pages.

There are two relevant directories:
* `docs_src` - where source documentation files are located
* `docs` - where the built documentation that is shown on GitHub Pages lives.

To build documentation:
1. Checkout the `gh-pages` branch
2. Navigate to the source dir: `cd docs_src`
3. Build documentation for a GitHub Pages deployment: `make github`

## Style Guides

### Code Style

- We use [Ruff](https://github.com/astral-sh/ruff) to lint and format our files.
- Our pre-commit hook will run Ruff linting and formatting when you commit.
- You can manually run Ruff at any time (see [Ruff usage](https://github.com/astral-sh/ruff#usage)).

Please ensure your code is properly formatted and linted before committing.

## License

Before contributing to this CVS Health sponsored project, you will need to sign the associated [Contributor License Agreement (CLA)](https://forms.office.com/r/gMNfs4yCck)

---

Thanks again for using and supporting LangFair!
Loading

0 comments on commit 07e6a33

Please sign in to comment.