diff --git a/.gitignore b/.gitignore index 51b261c..3883e06 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ coverage.xml .coverage .ipynb_checkpoints dist +.dmypy.json diff --git a/README.md b/README.md index 7d03529..a7c2683 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,24 @@ ![GitHub contributors](https://img.shields.io/github/contributors/prql/pyprql) ![GitHub Repo stars](https://img.shields.io/github/stars/prql/pyprql) -[![CI/CD](https://github.com/prql/PyPrql/actions/workflows/cicd.yaml/badge.svg?branch=main)](https://github.com/prql/PyPrql/actions/workflows/cicd.yaml) +[![CI/CD](https://github.com/prql/PyPrql/actions/workflows/pull-request.yaml/badge.svg?branch=main)](https://github.com/prql/PyPrql/actions/workflows/pull-request.yaml) [![codecov](https://codecov.io/gh/prql/PyPrql/branch/main/graph/badge.svg?token=C6J2UI7FR5)](https://codecov.io/gh/prql/PyPrql) [![Codestyle: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) -PyPRQL contains these tools: +PyPRQL contains - pyprql.pandas_accessor - Pandas integration for PRQL - pyprql.magic - IPython magic for connecting to databases using `%%prql` -- pyprql.cli - TUI for databases using PRQL -For docs, Check out the [PyPRQL Docs](https://pyprql.readthedocs.io/), and the [PRQL Book][prql_docs]. +For docs, Check out the [PyPRQL Docs](https://pyprql.readthedocs.io/), and the +[PRQL Book][prql_docs]. -This project is maintained by [@charlie-sanders](https://github.com/charlie-sanders/) and [@rbpatt2019](https://github.com/rbpatt2019) +This project was created by +[@charlie-sanders](https://github.com/charlie-sanders/) & +[@rbpatt2019](https://github.com/rbpatt2019) and is now maintained by the +broader PRQL team. ## Installation @@ -32,7 +35,9 @@ This project is maintained by [@charlie-sanders](https://github.com/charlie-sand pip install pyprql ``` -### Try out the Pandas integration +## Examples + +### Pandas integration ```python import pandas as pd @@ -40,10 +45,9 @@ import pyprql.pandas_accessor df = (...) results_df = df.prql.query('select [age,name,occupation] | filter age > 21') - ``` -### Try out the Jupyter Magic +### Jupyter Magic ```python In [1]: %load_ext pyprql.magic @@ -59,20 +63,4 @@ In [4]: %%prql results << ``` -### Try out the TUI - -With a CSV file: - -```bash -curl https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv -pyprql zillow.csv -``` - -With a Database: - -```bash -pyprql 'postgresql://user:password@localhost:5432/database' -PRQL> show tables -``` - [prql_docs]: https://prql-lang.org/reference diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 246d05a..0000000 --- a/mypy.ini +++ /dev/null @@ -1,6 +0,0 @@ -# Global options: - -[mypy] -disable_error_code = union-attr, operator -exclude = /tests/ -# Per-module options:disable_error_code = union-atr diff --git a/pyproject.toml b/pyproject.toml index e7358cd..6fe414f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,7 +94,11 @@ profile = "black" skip_gitignore = true [tool.mypy] +disable_error_code = ["union-attr", 'operator'] +exclude = "/tests/" files = "pyprql" +# TODO: ideally we would list the modules that aren't yet typed +ignore_missing_imports = true [build-system] build-backend = "poetry.core.masonry.api" diff --git a/pyprql/cli/__init__.py b/pyprql/cli/__init__.py index 5062abb..0cbdd93 100644 --- a/pyprql/cli/__init__.py +++ b/pyprql/cli/__init__.py @@ -1,9 +1,22 @@ """The command line interface implementation for PyPRQL.""" import sys +import warnings from typing import List, Optional from pyprql.cli.cli import CLI +warnings.warn( + """ +Currently the is unfortunately deprecated, since the original creators are no +longer actively maintaning it. It was a valiant effort, and of the first things that +was built on top of PRQL. But it's a big project that requires work to keep it +current. + +If anyone would be interested in taking it over, please feel free to start contributing. +""", + DeprecationWarning, +) + def main(params: Optional[List[str]] = None) -> None: """Serve the CLI entrypoint.