Skip to content

Commit

Permalink
Bump version to 0.1.1 (make it bypass the old PyPI version)
Browse files Browse the repository at this point in the history
  • Loading branch information
AzisK committed Dec 27, 2020
1 parent a9d8cea commit f5f0030
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: black
args: [-S]
#- repo: https://github.com/AzisK/readsql
# rev: 0.0.3-alpha
# rev: 0.1.1
# hooks:
# - id: readsql
- repo: https://github.com/sqlalchemyorg/zimports/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ How to add a [pre-commit](https://pre-commit.com/) hook of readsql?
```yaml
repos:
- repo: https://github.com/AzisK/readsql
rev: 0.0.5-alpha # Replace by any tag/version: https://github.com/azisk/readsql/tags
rev: 0.1.1 # Replace by any tag/version: https://github.com/azisk/readsql/tags
hooks:
- id: readsql
```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "readsql"
version = "0.0.6-alpha"
version = "0.1.1"
description = "Convert SQL to most human readable format"
authors = ["Azis <[email protected]>"]
maintainers = ["Azis <[email protected]>"]
Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
import pathlib

from setuptools import setup

packages = ['readsql']
Expand All @@ -9,11 +11,15 @@

entry_points = {'console_scripts': ['readsql = readsql.__main__:command_line']}

HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()

setup_kwargs = {
'name': 'readsql',
'version': '0.1.0',
# 'version': 'version is specified in poetry.toml',
'description': 'Convert SQL to most human readable format',
'long_description': '# readsql\n\nConvert SQL to most human readable format\n\nIt can convert SQL code and even SQL strings in other languages (only Python at the moment)\n\n# Installation\n\n`pip install readsql`\n\n# Usage\n\n1. Format SQL code provided in command line\n - `readsql <SQL_STRING> -s`\n2. Format an SQL file\n - `readsql <FILE_PATH>`\n\n# Usage examples\n\n1. `readsql <SQL_STRING> -s`\n - `readsql \'select sushi from tokyo\' -s`\n - returns `SELECT sushi FROM tokyo`\n2. `readsql <FILE_PATH>`\n 1. `readsql sql_example.sql`\n 2. given a Python file (ends with `.py`), it looks for variables `query` and formats their insides\n - variable to represent SQL code can be changed with `-py` option\n - `readsql sql_in_python_variable_example.py -py sql`\n - given a Python file with this code\n```python\ndef get_query():\n limit = 6\n sql = f"SELEct speed from world where animal=\'dolphin\' limit {limit}"\n return sql\n```\nconverts it to\n```python\ndef get_query():\n limit = 6\n sql = f"SELECT speed FROM world WHERE animal=\'dolphin\' LIMIT {limit}"\n return sql\n```\n\n# Development\nHaving the repo cloned\n\n- `python readsql tests/sql_example.sql` converts example SQL code to easier readable format\n- `python readsql tests/sql_in_python_example.py` converts example SQL code in Python (it looks for variables `query`)\n- we can change the SQL variable with `-py` option `python readsql tests/sql_in_python_variable_example.py -py sql`\n- `python readsql "select sushi from tokyo" -s` takes the `"select sushi from tokyo"` string as input and outputs it formatted\n\n# Testing\n\nHave `pytest` installed and run `pytest -v` (-v stands for verbose)\n',
'long_description': 'README',
'long_description_content_type': "text/markdown",
'author': 'Azis',
'author_email': '[email protected]',
'maintainer': 'Azis',
Expand Down

0 comments on commit f5f0030

Please sign in to comment.