Skip to content

Commit abed0ca

Browse files
committed
initial commit
0 parents  commit abed0ca

10 files changed

Lines changed: 305 additions & 0 deletions

File tree

.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Vim swapfiles
2+
.*.swp
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
env/
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# dotenv
86+
.env
87+
88+
# virtualenv
89+
.venv
90+
venv/
91+
ENV/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: python
2+
python:
3+
- '3.5'
4+
install:
5+
- pip install -r requirements.txt
6+
- pip install .
7+
script: py.test tests
8+
deploy:
9+
provider: pypi
10+
user: machow
11+
password:
12+
secure: rln5w0ZBtGmleGD1rqkVnRZoP3dMtmya3Nz8yFFu/zudBzrUPu6dG3CjneVRPiSqh0Y6MqnnHOKMf4F69HG34o2jybhdCVrZfhSLUPcHDobUq9z2WC/dfAx0B0oALDP3qtbs80MeLwvoyC+OkaFESDee7CX/R4nGUdp7CDeoi3faNjzytAT0PprBHrVqxZpUPC7TMBL1wvyAhEcyWM/b8s1WDTHwfIu6KkumcAOqQbNCUsSScOOCuFKN/NtKVFEn+7ZWZ9kk6uaCGw6K+8Po55Zf+W0CZxHBQMvcYfEegMV7HXBr4V+KKnZSedwoeu4PNFmQyV07Ew7VH4VoS2pt88AeQaQv9XGuM+AReq6tIK9OZ341nYhvBaNr3jDteiPM4WRoHlLNqsRP6qLXXWvVbFxcDBUZpbZJSK3Xje+P1LxULz2UaU5XrIKLr/kA2m/WkTgBwDIPexXbHMx18H7fy8V+DrQGFlaKCDTPRm2kn7M5YgeIS+JAxhyTkJg6bRTBkbegmY8UATPD2XKcz/BKwgLQTO9MStf7jOvq5o1YKfaDSEUKwXTgdMk/EW5SGEGjTysDBXlKP6/nf1wiU9dXrBfj7yBHdfyQFkXFsZBEU+vj+HCmGdFkAJ4T8uueqtBmZ9g6F63izbkF/ojPSU84ObI6yeu29BIEIRNsnng8tms=
13+
on:
14+
tags: true
15+
distributions: sdist bdist_wheel
16+
repo: datacamp/sqlwhat-ext
17+
skip_upload_docs: true

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# sqlwhat-ext
2+
extensions (high-level SCTs) for sqlwhat

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = sqlwhat
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
#
4+
# sqlwhat documentation build configuration file, created by
5+
# sphinx-quickstart on Thu Feb 23 11:22:59 2017.
6+
#
7+
# This file is execfile()d with the current directory set to its
8+
# containing dir.
9+
#
10+
# Note that not all possible configuration values are present in this
11+
# autogenerated file.
12+
#
13+
# All configuration values have a default; values that are commented out
14+
# serve to show the default.
15+
16+
# Mock heavy duty pythonwhat dependencies for autodoc
17+
import os
18+
import sys
19+
from unittest import mock
20+
from functools import wraps
21+
22+
def state_dec(f):
23+
@wraps(f)
24+
def wrapper(*args, **kwargs):
25+
return f(*args, **kwargs)
26+
return wrapper
27+
28+
MOCK_MODULES = ['sqlwhat.grammar.plsql.ast', 'sqlwhat', 'sqlwhat.sct_syntax']
29+
for mod_name in MOCK_MODULES:
30+
sys.modules[mod_name] = mock.Mock(state_dec = state_dec)
31+
32+
# If extensions (or modules to document with autodoc) are in another directory,
33+
# add these directories to sys.path here. If the directory is relative to the
34+
# documentation root, use os.path.abspath to make it absolute, like shown here.
35+
#
36+
sys.path.insert(0, os.path.abspath('..'))
37+
38+
39+
# -- General configuration ------------------------------------------------
40+
41+
# If your documentation needs a minimal Sphinx version, state it here.
42+
#
43+
# needs_sphinx = '1.0'
44+
45+
# Add any Sphinx extension module names here, as strings. They can be
46+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
47+
# ones.
48+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
49+
50+
# Add any paths that contain templates here, relative to this directory.
51+
templates_path = ['_templates']
52+
53+
# The suffix(es) of source filenames.
54+
# You can specify multiple suffix as a list of string:
55+
#
56+
# source_suffix = ['.rst', '.md']
57+
source_suffix = '.rst'
58+
59+
# The master toctree document.
60+
master_doc = 'index'
61+
62+
# General information about the project.
63+
project = 'sqlwhat-ext'
64+
copyright = '2017, DataCamp'
65+
author = 'DataCamp'
66+
67+
# The version info for the project you're documenting, acts as replacement for
68+
# |version| and |release|, also used in various other places throughout the
69+
# built documents.
70+
#
71+
# The short X.Y version.
72+
version = '0.0.7'
73+
# The full version, including alpha/beta/rc tags.
74+
release = '0.0.7'
75+
76+
# The language for content autogenerated by Sphinx. Refer to documentation
77+
# for a list of supported languages.
78+
#
79+
# This is also used if you do content translation via gettext catalogs.
80+
# Usually you set "language" from the command line for these cases.
81+
language = None
82+
83+
# List of patterns, relative to source directory, that match files and
84+
# directories to ignore when looking for source files.
85+
# This patterns also effect to html_static_path and html_extra_path
86+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
87+
88+
# The name of the Pygments (syntax highlighting) style to use.
89+
pygments_style = 'sphinx'
90+
91+
# If true, `todo` and `todoList` produce output, else they produce nothing.
92+
todo_include_todos = False
93+
94+
95+
# -- Options for HTML output ----------------------------------------------
96+
97+
# Theme options are theme-specific and customize the look and feel of a theme
98+
# further. For a list of options available for each theme, see the
99+
# documentation.
100+
#
101+
# html_theme_options = {}
102+
103+
# Add any paths that contain custom static files (such as style sheets) here,
104+
# relative to this directory. They are copied after the builtin static files,
105+
# so a file named "default.css" will overwrite the builtin "default.css".
106+
html_static_path = ['_static']
107+
108+
109+
# -- Options for HTMLHelp output ------------------------------------------
110+
111+
# Output file base name for HTML help builder.
112+
htmlhelp_basename = 'sqlwhatdoc'
113+
114+
115+
def setup(app):
116+
app.add_stylesheet('theme_overrides.css')
117+
118+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
119+
if not on_rtd: # only import and set the theme if we're building docs locally
120+
import sphinx_rtd_theme
121+
html_theme = 'sphinx_rtd_theme'
122+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
123+
def setup(app):
124+
app.add_stylesheet('theme_overrides.css')

docs/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. sqlwhat documentation master file, created by
2+
sphinx-quickstart on Thu Feb 23 11:22:59 2017.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
pythonwhat extensions
7+
===================================
8+
9+
Api
10+
----
11+
12+
.. automodule:: pythonwhat_ext
13+
:members:

pythonwhat_ext.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.0.0'

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pytest

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
3+
import re
4+
import ast
5+
from setuptools import setup
6+
7+
_version_re = re.compile(r'__version__\s+=\s+(.*)')
8+
9+
with open('pythonwhat_ext.py', 'rb') as f:
10+
version = str(ast.literal_eval(_version_re.search(
11+
f.read().decode('utf-8')).group(1)))
12+
13+
setup(
14+
name = 'pythonwhat-ext',
15+
version = version,
16+
py_modules= ['pythonwhat_ext'],
17+
install_requires = [],
18+
description = 'pythonwhat extensions - high level SCTs',
19+
author = 'Michael Chow',
20+
author_email = 'michael@datacamp.com',
21+
url = 'https://github.com/datacamp/pythonwhat-ext')

0 commit comments

Comments
 (0)