Skip to content

Commit 261787e

Browse files
author
Leo Lindén
authored
Merge pull request #2 from superannotateai/develop
Project restructure
2 parents 3f2e9a3 + cdeec2e commit 261787e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+303
-1375
lines changed

.DS_Store

-6 KB
Binary file not shown.

.gitignore

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.pyc
4+
*.py[cod]
5+
*$py.class
6+
*mypy*
7+
*.egg*
8+
*DS_Store*
9+
envs/
10+
dist/
11+
*.egg-info
12+
tasks/
13+
*.dump
14+
*rdb
15+
MnesiaCore.rabbit*
16+
kubernetes/config
17+
#static/
18+
# C extensions
19+
nohup.out
20+
*.so
21+
minikube-darwin-amd64
22+
23+
# Distribution / packaging
24+
.Python
25+
src/staticfiles/
26+
build/
27+
develop-eggs/
28+
dist/
29+
downloads/
30+
eggs/
31+
.eggs/
32+
lib64/
33+
parts/
34+
sdist/
35+
var/
36+
wheels/
37+
pip-wheel-metadata/
38+
share/python-wheels/
39+
*.egg-info/
40+
.installed.cfg
41+
*.egg
42+
MANIFEST
43+
44+
# PyInstaller
45+
# Usually these files are written by a python script from a template
46+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
47+
*.manifest
48+
*.spec
49+
50+
# Installer logs
51+
pip-log.txt
52+
pip-delete-this-directory.txt
53+
54+
# Unit test / coverage reports
55+
htmlcov/
56+
.tox/
57+
.nox/
58+
.coverage
59+
.coverage.*
60+
.cache
61+
nosetests.xml
62+
coverage.xml
63+
*.cover
64+
*.py,cover
65+
.hypothesis/
66+
.pytest_cache/
67+
ml_models/
68+
69+
# Translations
70+
*.mo
71+
*.pot
72+
*.env
73+
# Django stuff:
74+
*.log
75+
local_settings.py
76+
db.sqlite3
77+
db.sqlite3-journal
78+
79+
# Flask stuff:
80+
instance/
81+
.webassets-cache
82+
83+
# Scrapy stuff:
84+
.scrapy
85+
86+
# Sphinx documentation
87+
docs/_build/
88+
89+
# PyBuilder
90+
target/
91+
92+
# Jupyter Notebook
93+
.ipynb_checkpoints
94+
95+
# IPython
96+
profile_default/
97+
ipython_config.py
98+
99+
# pyenv
100+
.python-version
101+
102+
# pipenv
103+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
105+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
106+
# install all needed dependencies.
107+
#Pipfile.lock
108+
109+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
110+
__pypackages__/
111+
112+
# Celery stuff
113+
celerybeat-schedule
114+
celerybeat.pid
115+
116+
# SageMath parsed files
117+
*.sage.py
118+
119+
# Environments
120+
.env
121+
.venv
122+
env/
123+
venv/
124+
ENV/
125+
env.bak/
126+
venv.bak/
127+
128+
# Spyder project settings
129+
.spyderproject
130+
.spyproject
131+
132+
# Rope project settings
133+
.ropeproject
134+
135+
# mkdocs documentation
136+
/site
137+
138+
# mypy
139+
.mypy_cache/
140+
.dmypy.json
141+
dmypy.json
142+
143+
# Pyre type checker
144+
.pyre/
145+
146+
sample_large_files
147+
sample_tif_files
148+
149+
# Vscode settings folder
150+
.vscode/
151+
152+
# python virtual env for SDK testing
153+
venv_*
154+
pylint.html
155+
_mask.c
156+
tags
157+
debug_*
158+
*.idea
159+
*.DS_Store
160+
htmlcov

superannotate-databricks-connector/Dockerfile.spark renamed to Dockerfile.spark

File renamed without changes.

superannotate-databricks-connector/Dockerfile.test renamed to Dockerfile.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
FROM spark_docker_v2
22

3-
# Add neccessary data
4-
ADD superannotate_databricks_connector superannotate_databricks_connector
5-
ADD setup.py setup.py
6-
ADD tests tests
7-
83
# Build the package
94
RUN python setup.py sdist bdist_wheel
105

116
# Add the distribution
12-
ADD dist dist
7+
COPY src src
8+
9+
RUN python -m build src
1310

1411
# Install the package
1512
RUN pip install dist/*.whl
1613

14+
# Add necessary data
15+
ADD tests tests
16+
1717
# Run unit tests
1818
RUN python -m unittest discover tests
File renamed without changes.

pyproject.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[project]
2+
3+
name = "superannotate_databricks_connector" # Required
4+
5+
version = "0.0.1dev1"
6+
7+
description = "Custom functions to work with SuperAnnotate in Databricks"
8+
9+
readme = "README.md"
10+
11+
requires-python = ">=3.8"
12+
13+
license = { file = "LICENSE.txt" }
14+
15+
keywords = ["superannotate_databricks_connector", "superannotate"]
16+
17+
authors = [
18+
{ name = "Leo Lindén", email = "leo@superannotate.com" }
19+
]
20+
21+
maintainers = [
22+
{ name = "Leo Lindén", email = "leo@superannotate.com" }
23+
]
24+
25+
classifiers = [# Optional
26+
"Intended Audience :: Developers",
27+
"Topic :: Software Development :: Build Tools",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3 :: Only",
34+
]
35+
36+
dependencies = [
37+
"pyspark~=3.4.0"
38+
]
39+
40+
[project.optional-dependencies]
41+
test = ["pytest"]
42+
43+
[project.urls] # Optional
44+
"Homepage" = "https://github.com/superannotateai/superannotate-databricks-connector"
45+
"Bug Reports" = "https://github.com/superannotateai/superannotate-databricks-connector/issues"
46+
"Source" = "https://github.com/superannotateai/superannotate-databricks-connector/"
47+
48+
[build-system]
49+
requires = ["setuptools>=43.0.0", "wheel"]
50+
build-backend = "setuptools.build_meta"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from superannotate_databricks_connector import schemas
2+
from superannotate_databricks_connector import text
3+
from superannotate_databricks_connector import vector
4+
5+
6+
__all__ = [
7+
'schemas',
8+
'text',
9+
'vector'
10+
]

superannotate-databricks-connector/superannotate_databricks_connector/__init__.py renamed to src/superannotate_databricks_connector/schemas/__init__.py

File renamed without changes.

superannotate-databricks-connector/superannotate_databricks_connector/schemas/comment.py renamed to src/superannotate_databricks_connector/schemas/comment.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ def get_comment_schema():
1313
comment_schema = StructType([
1414
StructField("correspondence",
1515
ArrayType(MapType(
16-
StringType(),
17-
StringType())),
16+
StringType(),
17+
StringType())),
1818
True),
1919
StructField("x", FloatType(), True),
2020
StructField("y", FloatType(), True),
2121
StructField("resolved", BooleanType(), True),
2222
StructField("createdAt", StringType(), True),
2323
StructField("createdBy", MapType(
24-
StringType(),
25-
StringType()),
24+
StringType(),
25+
StringType()),
2626
True),
2727
StructField("creationType", StringType(), True),
2828
StructField("updatedAt", StringType(), True),
2929
StructField("updatedBy", MapType(
30-
StringType(),
31-
StringType()),
30+
StringType(),
31+
StringType()),
3232
True)
3333
])
34-
return comment_schema
34+
return comment_schema

superannotate-databricks-connector/superannotate_databricks_connector/schemas/text_schema.py renamed to src/superannotate_databricks_connector/schemas/text_schema.py

File renamed without changes.

0 commit comments

Comments
 (0)