Skip to content

Commit

Permalink
Merge pull request #12 from clarityai-eng/feat/support-super-type
Browse files Browse the repository at this point in the history
Feat/support redshift super type
  • Loading branch information
pablosjv authored Mar 29, 2022
2 parents e098375 + e0bffd9 commit 744992d
Show file tree
Hide file tree
Showing 100 changed files with 5,069 additions and 9,443 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: snok/install-poetry@v1.1.2

- name: Build and test
run: make
run: make install test

- name: Dry run deploy
run: make version
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python 3.10.1
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ help: ## show help message
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n \033[36m\033[0m\n"} /^[$$()% a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)


.PHONY: setup
setup: ## Setup dev environment
.PHONY: install
install: ## Install project using poetry
poetry install


.PHONY: lint
lint: ## Perform linting and formatting
@echo "Formatting with autopep8"
@poetry run autopep8 -i -r ./
@echo "Formatting with black"
@poetry run black .
@echo "Check for errors with flake8"
@poetry run flake8 ./

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ conn.comit()
* Support pattern constrints
* Support redirects when validating the `$schema`
* Support nested refs in schema
* Parse array in type for ['string', 'null'] cases
1 change: 0 additions & 1 deletion docs/api/jsonschema2ddl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jsonschema2ddl.utils module
:undoc-members:
:show-inheritance:


Module contents
---------------

Expand Down
80 changes: 41 additions & 39 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
import shutil
import sys

__location__ = os.path.join(os.getcwd(), os.path.dirname(
inspect.getfile(inspect.currentframe())))
__location__ = os.path.join(os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe())))

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.join(__location__, '../src'))
sys.path.insert(0, os.path.join(__location__, "../src"))

# -- Run sphinx-apidoc ------------------------------------------------------
# This hack is necessary since RTD does not issue `sphinx-apidoc` before running
Expand Down Expand Up @@ -49,7 +48,7 @@
cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir)

args = cmd_line.split(" ")
if parse_version(sphinx.__version__) >= parse_version('1.7'):
if parse_version(sphinx.__version__) >= parse_version("1.7"):
args = args[1:]

apidoc.main(args)
Expand All @@ -64,46 +63,46 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.autosummary',
'sphinx.ext.viewcode',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.ifconfig',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx_rtd_theme',
'm2r2',
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.ifconfig",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx_rtd_theme",
"m2r2",
]

autodoc_inherit_docstrings = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = ['.rst', '.md']
source_suffix = [".rst", ".md"]

# The encoding of source files.
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = u'jsonschema2ddl'
copyright = u'2020, Clarity.ai'
project = "jsonschema2ddl"
copyright = "2020, Clarity.ai"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '' # Is set by calling `setup.py docs`
version = "" # Is set by calling `setup.py docs`
# The full version, including alpha/beta/rc tags.
release = '' # Is set by calling `setup.py docs`
release = "" # Is set by calling `setup.py docs`

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -117,7 +116,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ["_build"]

# The reST default role (used for this markup: `text`) to use for all documents.
# default_role = None
Expand All @@ -134,7 +133,7 @@
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
Expand Down Expand Up @@ -189,7 +188,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down Expand Up @@ -233,27 +232,30 @@
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'jsonschema2ddl-doc'
htmlhelp_basename = "jsonschema2ddl-doc"


# -- Options for LaTeX output --------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'user_guide.tex', u'jsonschema2ddl Documentation',
u'Data Engineer', 'manual'),
(
"index",
"user_guide.tex",
"jsonschema2ddl Documentation",
"Data Engineer",
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand All @@ -277,13 +279,13 @@
# latex_domain_indices = True

# -- External mapping ------------------------------------------------------------
python_version = '.'.join(map(str, sys.version_info[0:2]))
python_version = ".".join(map(str, sys.version_info[0:2]))
intersphinx_mapping = {
'sphinx': ('http://www.sphinx-doc.org/en/stable', None),
'python': ('https://docs.python.org/' + python_version, None),
'matplotlib': ('https://matplotlib.org', None),
'numpy': ('https://docs.scipy.org/doc/numpy', None),
'sklearn': ('http://scikit-learn.org/stable', None),
'pandas': ('http://pandas.pydata.org/pandas-docs/stable', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
"sphinx": ("http://www.sphinx-doc.org/en/stable", None),
"python": ("https://docs.python.org/" + python_version, None),
"matplotlib": ("https://matplotlib.org", None),
"numpy": ("https://docs.scipy.org/doc/numpy", None),
"sklearn": ("http://scikit-learn.org/stable", None),
"pandas": ("http://pandas.pydata.org/pandas-docs/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
}
Binary file modified docs/doctrees/api/jsonschema2ddl.doctree
Binary file not shown.
Binary file modified docs/doctrees/api/modules.doctree
Binary file not shown.
Binary file modified docs/doctrees/changelog.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/readme.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: cc93d2f010a70bcea25f46c4e0d24d96
config: d02f8bc6437b1046cf9b3cdb8fad0fda
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading

0 comments on commit 744992d

Please sign in to comment.