Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
adjavon committed Jan 26, 2024
0 parents commit 0ae0c64
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"template": "https://github.com/funkelab/pycookie/",
"commit": "0c80c663d9e5d01e80eb1067e4a45722ee36eb36",
"checkout": null,
"context": {
"cookiecutter": {
"full_name": "Funke Lab",
"email": "[email protected]",
"github_username": "funkelab",
"project_name": "quac",
"project_slug": "quac",
"project_short_description": "Quantitative Attribution with Counterfactuals",
"_copy_without_render": [
".github/workflows/tests.yaml"
],
"_template": "https://github.com/funkelab/pycookie/"
}
},
"directory": null
}
17 changes: 17 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Python Black

on: [push, pull_request]

jobs:
lint:
name: Python Lint
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
- name: Setup checkout
uses: actions/checkout@master
- name: Lint with Black
run: |
pip install black
black --diff --check src/quac tests
18 changes: 18 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Python mypy

on: [push, pull_request]

jobs:
static-analysis:
name: Python mypy
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
- name: Setup checkout
uses: actions/checkout@v2
- name: mypy
run: |
pip install .
pip install --upgrade mypy
mypy src/quac
25 changes: 25 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test

on:
push:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install ".[dev]"
- name: Test with pytest
run: |
pytest tests
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/__pycache__
**/*.egg-info
**/.vscode
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ci:
autoupdate_schedule: monthly
autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"

default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
hooks:
- id: mypy
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# quac

[![tests](https://github.com/funkelab/quac/actions/workflows/tests.yaml/badge.svg)](https://github.com/funkelab/quac/actions/workflows/tests.yaml)
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "wheel"]

[project]
name = "quac"
description = "Quantitative Attribution with Counterfactuals"
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
]
keywords = []
license = { text = "BSD 3-Clause License" }
authors = [
{ email = "[email protected]", name = "Funke Lab" },
]
dynamic = ["version"]
dependencies = []

[project.optional-dependencies]
dev = [
'pytest',
'black',
'mypy',
'pdoc',
'pre-commit'
]

[project.urls]
homepage = "https://github.com/funkelab/quac"
repository = "https://github.com/funkelab/quac"
3 changes: 3 additions & 0 deletions src/quac/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
.. include ../../README.md
"""
2 changes: 2 additions & 0 deletions tests/test_assert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_assert():
assert True

0 comments on commit 0ae0c64

Please sign in to comment.