diff --git a/.sqlfluff b/.sqlfluff deleted file mode 100644 index 00205a66..00000000 --- a/.sqlfluff +++ /dev/null @@ -1,26 +0,0 @@ -[sqlfluff] -templater = jinja -dialect = athena -sql_file_exts = .sql,.sql.jinja -# this rule overfires on athena nested arrays -exclude_rules=references.from,structure.column_order -max_line_length = 88 - -[sqlfluff:indentation] -template_blocks_indent = false - -[sqlfluff:rules:layout.long_lines] -ignore_comment_lines = true - -[sqlfluff:rules:capitalisation.keywords] -capitalisation_policy = upper - -[sqlfluff:templater:jinja:context] -schema_name = test_schema -table_name = test_table -view_or_table_name = test_view_or_table -view_or_table = TABLE -prefix = Test -dataset = [["foo","foo"],["bar","bar"]] -table_cols = ["a","b"] -col_type_list = ["a string","b string"] diff --git a/.sqlfluff b/.sqlfluff new file mode 120000 index 00000000..ff79020e --- /dev/null +++ b/.sqlfluff @@ -0,0 +1 @@ +cumulus_library/.sqlfluff \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index d250a7b9..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include .sqlfluff diff --git a/cumulus_library/.sqlfluff b/cumulus_library/.sqlfluff new file mode 100644 index 00000000..00205a66 --- /dev/null +++ b/cumulus_library/.sqlfluff @@ -0,0 +1,26 @@ +[sqlfluff] +templater = jinja +dialect = athena +sql_file_exts = .sql,.sql.jinja +# this rule overfires on athena nested arrays +exclude_rules=references.from,structure.column_order +max_line_length = 88 + +[sqlfluff:indentation] +template_blocks_indent = false + +[sqlfluff:rules:layout.long_lines] +ignore_comment_lines = true + +[sqlfluff:rules:capitalisation.keywords] +capitalisation_policy = upper + +[sqlfluff:templater:jinja:context] +schema_name = test_schema +table_name = test_table +view_or_table_name = test_view_or_table +view_or_table = TABLE +prefix = Test +dataset = [["foo","foo"],["bar","bar"]] +table_cols = ["a","b"] +col_type_list = ["a string","b string"] diff --git a/cumulus_library/cli.py b/cumulus_library/cli.py index ccab468f..f836b680 100755 --- a/cumulus_library/cli.py +++ b/cumulus_library/cli.py @@ -131,7 +131,7 @@ def create_template(path: str) -> None: copy_lists = [ ["studies/template/manifest.toml", "manifest.toml"], - ["../.sqlfluff", ".sqlfluff"], + [".sqlfluff", ".sqlfluff"], ] for source, dest in copy_lists: source_path = Path(Path(__file__).resolve().parents[0], source) diff --git a/pyproject.toml b/pyproject.toml index d34675ac..7b2a5c2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cumulus-library" -version = "0.1.0" +version = "0.1.2" # In order to support 3.12, we wil need to refactor out load_module, which is # targeted for deprecation in that version. requires-python = ">= 3.9, <3.12" @@ -21,7 +21,6 @@ dependencies = [ description = "Clinical study SQL generation for data derived from bulk FHIR" readme = "README.md" license = { text="Apache License 2.0" } -home-page = "https://smarthealthit.org/cumulus-a-universal-sidecar-for-a-smart-learning-healthcare-system/" keywords = ["FHIR", "SQL", "Health Informatics"] classifiers = [ "License :: OSI Approved :: Apache Software License", @@ -39,12 +38,17 @@ test = [ ] [project.urls] +Home = "https://smarthealthit.org/cumulus-a-universal-sidecar-for-a-smart-learning-healthcare-system/" Documentation = "https://docs.smarthealthit.org/cumulus/" Source = "https://github.com/smart-on-fhir/cumulus-library-core" + [project.scripts] cumulus-library = "cumulus_library.cli:main" [build-system] requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" + +[tool.flit.sdist] +include = [".sqlfluff"]