Skip to content

Commit

Permalink
Remove query package to port as a new tool (#495)
Browse files Browse the repository at this point in the history
* Remove query package to port as a new tool

* Fix package install test checks

* Fix package install check workflow

* Create optional docs,test dependency groups, install cycquery under test

* Fix broken notebooks
  • Loading branch information
amrit110 authored Oct 26, 2023
1 parent 1d60fc1 commit 2690be1
Show file tree
Hide file tree
Showing 58 changed files with 194 additions and 9,283 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
run: |
poetry env use '3.10'
source $(poetry env info --path)/bin/activate
poetry install --without dev,docs
poetry install --with test
pre-commit run --all-files
3 changes: 1 addition & 2 deletions .github/workflows/docs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
python3 -m pip install --upgrade pip && python3 -m pip install poetry
poetry env use '3.10'
source $(poetry env info --path)/bin/activate
poetry install --without dev
python3 -m ipykernel install --user --name cyclops
poetry install --with docs,test
# pandoc README.md -f markdown -t rst -s -o docs/source/intro.rst
cd docs && rm -rf source/reference/api/_autosummary && make html
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ jobs:
- run: |
poetry env use '3.10'
source $(poetry env info --path)/bin/activate
poetry install --without dev
python3 -m ipykernel install --user --name cyclops
poetry install --with docs,test
# pandoc README.md -f markdown -t rst -s -o docs/source/intro.rst
cd docs && rm -rf source/reference/api/_autosummary && make html
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
poetry env use '3.10'
source $(poetry env info --path)/bin/activate
poetry install --without dev,docs
poetry install --with test
coverage run -m pytest -m integration_test && coverage xml && coverage report -m
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v1.0.36
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,6 @@ jobs:
pip install -e .
pip install pytest
python3 -m pytest tests/package/*.py
extra-query-package-install-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pip
run: python3 -m pip install --upgrade pip
- uses: actions/setup-python@v4.7.1
with:
python-version: '3.10'
- name: Install package and test import
run: |
pip install -e ".[query]"
pip install pytest
python3 -m pytest tests/package/extras/query.py
extra-models-package-install-check:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ multirun/
_autosummary
*cyclops_reports*
*dummy_reports*
.mypy_cache
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
types_or: [python, jupyter]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.6.1
hooks:
- id: mypy
entry: python3 -m mypy --config-file pyproject.toml
Expand Down
21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

``cyclops`` is a toolkit for facilitating research and deployment of ML models for healthcare. It provides a few high-level APIs namely:

* `query` - Query EHR databases (such as MIMIC-IV)
* `data` - Create datasets for training, inference and evaluation. We use the popular 🤗 [datasets](https://github.com/huggingface/datasets) to efficiently load and slice different modalities of data.
* `models` - Use common model implementations using [scikit-learn](https://scikit-learn.org/stable/) and [PyTorch](https://pytorch.org/).
* `tasks` - Use canonical Healthcare ML tasks such as
Expand Down Expand Up @@ -42,11 +41,6 @@ and transform clinical data, for downstream tasks.

To install additional functionality from the other APIs, they can be installed as extras.

To install with `query` API support,

```bash
python3 -m pip install 'pycyclops[query]'
```

To install with `models`, `tasks`, `evaluate` and `monitor` API support,

Expand All @@ -60,11 +54,11 @@ To install with `report` API support,
python3 -m pip install 'pycyclops[report]'
```

Multiple extras could also be combined, for example to install with both `query` and
Multiple extras could also be combined, for example to install with both `report` and
`models` support:

```bash
python3 -m pip install 'pycyclops[query,models]'
python3 -m pip install 'pycyclops[report,models]'
```


Expand All @@ -81,22 +75,17 @@ python3 -m poetry install
source $(poetry env info --path)/bin/activate
```

### Using Conda

The development environment can also be set up using
[conda](https://docs.conda.io/en/latest/). Hence, make sure it is
installed and then run:
In order to install dependencies for testing, run:

```bash
conda env create
conda install conda-build
conda develop .
python3 -m poetry install --with test
```

API documentation is built using [Sphinx](https://www.sphinx-doc.org/en/master/) and
can be locally built by:

```bash
python3 -m poetry install --with docs
cd docs
make html SPHINXOPTS="-D nbsphinx_allow_errors=True"
```
Expand Down
16 changes: 0 additions & 16 deletions cyclops/query/__init__.py

This file was deleted.

Loading

0 comments on commit 2690be1

Please sign in to comment.