Skip to content

Commit

Permalink
Merge branch 'main' into export-slice-airflow
Browse files Browse the repository at this point in the history
  • Loading branch information
marov committed Oct 24, 2021
2 parents c0b2745 + 7dfe4e2 commit 20e0899
Show file tree
Hide file tree
Showing 37 changed files with 1,824 additions and 627 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = __snapshots__
exclude = __snapshots__,examples
per-file-ignores =
# ignore get_ipython missing
lineapy/ipython.py: F821
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.sqlite filter=lfs diff=lfs merge=lfs -text
examples/data/mushroom.csv filter=lfs diff=lfs merge=lfs -text
examples/data/diabetes.csv filter=lfs diff=lfs merge=lfs -text
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/eng_item.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Eng item
about: new engineering TODO for Linea devs
title: ''
assignees: ''

---


**What**:

**Why**:

**Possible Approaches**:
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?
2 changes: 2 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# https://docs.docker.com/language/python/build-images/#create-a-dockerfile-for-python
FROM python:3.9.7-slim

RUN apt-get update && apt-get -y install git && apt clean && apt-get autoclean && apt-get autoremove

WORKDIR /usr/src/base

Expand Down
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ bash:
docker-compose run --rm ${imagename} /bin/bash

test:
docker-compose run --rm ${imagename} pytest ${args}
docker-compose run --rm ${imagename} pytest ${args} --snapshot-update

lint:
docker run --rm -v "${PWD}":/apps alpine/flake8:latest --verbose .
docker run --rm -v "${PWD}":/apps alpine/flake8:latest --verbose . && \
docker-compose run --rm ${imagename} isort . --check

blackfix:
docker run --rm -v "${PWD}":/data cytopia/black .

typecheck:
#docker run --rm -v "${PWD}":/data cytopia/mypy .
docker-compose run --rm ${imagename} mypy .
docker-compose run --rm ${imagename} mypy -p lineapy
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ services:
volumes:
- ./lineapy:/usr/src/base/lineapy
- ./tests:/usr/src/base/tests
- ./pyproject.toml:/usr/src/base/pyproject.toml
1 change: 1 addition & 0 deletions examples/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/data/diabetes.csv filter=lfs diff=lfs merge=lfs -text
30 changes: 30 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Lineapy Examples

To validate our features, we downloaded some Kaggle notebook and added the two lines of `lineapy` instrumentation:

```python
import lineapy
... # user code
lineapy.linea_publish(variable, "a description")
```

To fetch the data for the examples, you first have to install [Git LFS](https://git-lfs.github.com/)

Currently we have a working example, `kaggle_example1.py` (the other example, `kaggle_example2.py` is [WIP due to a known bug](https://github.com/LineaLabs/lineapy/issues/204)).

```bash
lineapy --print-source kaggle_example1.py --slice 'mushroom feature importance'
```

## Limitations

- The second notebook doesn't currently work

```bash
lineapy --print-source kaggle_example2.py --slice 'nn for diabetes'
```

- [Can only slice one variable through the CLI](https://github.com/LineaLabs/lineapy/issues/307)
- [The CLI does not run a notebook](https://github.com/LineaLabs/lineapy/issues/304)

Again, we welcome any feature requests you might have!
3 changes: 3 additions & 0 deletions examples/data/diabetes.csv
Git LFS file not shown
3 changes: 3 additions & 0 deletions examples/data/mushroom.csv
Git LFS file not shown
Loading

0 comments on commit 20e0899

Please sign in to comment.