Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aamend authored May 2, 2024
0 parents commit 6ef5892
Show file tree
Hide file tree
Showing 14 changed files with 326 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: publish

env:
DB_PROFILES: ${{ secrets.DB_PROFILES }}

on:
workflow_dispatch:
inputs:
db_profile:
type: string
description: 'Databricks environment to publish HTML from'
default: 'DEMO'
db_path:
type: string
description: 'Repository path on databricks environment'
required: true
split_markdown:
description: 'Splitting HTML by markdown'
type: choice
required: true
default: 'false'
options:
- 'true'
- 'false'

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
release:
runs-on: html_publisher
steps:

- name: Checkout project
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.9"

- name: Install dependencies
run: |
pip install git+https://github.com/databricks-industry-solutions/industry-solutions-release
- name: Package solution accelerator
run: |
import os
import configparser
import io
from databricks.solutions import Accelerator
config = configparser.ConfigParser()
config.read_file(io.StringIO(os.environ['DB_PROFILES']))
if '${{ github.event.inputs.db_profile }}' not in config.sections():
raise Exception('Provided DB_PROFILE is not supported')
config = config['${{ github.event.inputs.db_profile }}']
split_markdown = '${{ github.event.inputs.split_markdown }}' == 'true'
Accelerator(
db_host=config['host'],
db_token=config['token'],
db_path='${{ github.event.inputs.db_path }}',
db_name='${{ github.event.repository.name }}',
markdown=split_markdown,
).release()
shell: python

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
131 changes: 131 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
.DS_Store

# C extensions
*.so

# Distribution / packaging
.idea
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
9 changes: 9 additions & 0 deletions 00_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Databricks notebook source
# MAGIC %md
# MAGIC # Databricks technical notebook source
# MAGIC
# MAGIC Notebook `00_*` will not be published as part of HTML and therefore not part of the story telling. This notebook is typically used to guide user through technical concepts around the solution itself.

# COMMAND ----------

print('Hello, World')
9 changes: 9 additions & 0 deletions 01_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Databricks notebook source
# MAGIC %md
# MAGIC # Databricks notebook source
# MAGIC
# MAGIC Separate business logic into specific markdown sections (ensure space after pound sign)

# COMMAND ----------

print('Hello, Databricks')
9 changes: 9 additions & 0 deletions 02_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Databricks notebook source
# MAGIC %md
# MAGIC # Databricks notebook source
# MAGIC
# MAGIC Separate business logic into specific markdown sections (ensure space after pound sign)

# COMMAND ----------

print('Hello, Databricks')
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
We happily welcome contributions to this project. We use GitHub Issues to track community reported issues and GitHub Pull Requests for accepting changes pursuant to a CLA.
43 changes: 43 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
%md
Copyright (2024) Databricks, Inc.

This library (the "Software") may not be used except in connection with the Licensee's use of the Databricks Platform Services pursuant
to an Agreement (defined below) between Licensee (defined below) and Databricks, Inc. ("Databricks"). The Object Code version of the
Software shall be deemed part of the Downloadable Services under the Agreement, or if the Agreement does not define Downloadable Services,
Subscription Services, or if neither are defined then the term in such Agreement that refers to the applicable Databricks Platform
Services (as defined below) shall be substituted herein for “Downloadable Services.” Licensee's use of the Software must comply at
all times with any restrictions applicable to the Downloadable Services and Subscription Services, generally, and must be used in
accordance with any applicable documentation. For the avoidance of doubt, the Software constitutes Databricks Confidential Information
under the Agreement.

Additionally, and notwithstanding anything in the Agreement to the contrary:

* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* you may view, make limited copies of, and may compile the Source Code version of the Software into an Object Code version of the
Software. For the avoidance of doubt, you may not make derivative works of Software (or make any any changes to the Source Code
version of the unless you have agreed to separate terms with Databricks permitting such modifications (e.g., a contribution license
agreement)).

If you have not agreed to an Agreement or otherwise do not agree to these terms, you may not use the Software or view, copy or compile
the Source Code of the Software.

This license terminates automatically upon the termination of the Agreement or Licensee's breach of these terms. Additionally,
Databricks may terminate this license at any time on notice. Upon termination, you must permanently delete the Software and all
copies thereof (including the Source Code).

Agreement: the agreement between Databricks and Licensee governing the use of the Databricks Platform Services, which shall be, with
respect to Databricks, the Databricks Terms of Service located at www.databricks.com/termsofservice, and with respect to Databricks
Community Edition, the Community Edition Terms of Service located at www.databricks.com/ce-termsofuse, in each case unless Licensee
has entered into a separate written agreement with Databricks governing the use of the applicable Databricks Platform Services.

Databricks Platform Services: the Databricks services or the Databricks Community Edition services, according to where the Software is used.

Licensee: the user of the Software, or, if the Software is being used on behalf of a company, the company.

Object Code: is version of the Software produced when an interpreter or a compiler translates the Source Code into recognizable and
executable machine code.

Source Code: the human readable portion of the Software.
4 changes: 4 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Copyright (2024) Databricks, Inc.

This Software includes software developed at Databricks (https://www.databricks.com/) and its use is subject to the included LICENSE file.
By using this repository and the notebooks within, you consent to Databricks collection and use of usage and tracking information in accordance with our privacy policy at www.databricks/privacypolicy.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<img src=https://raw.githubusercontent.com/databricks-industry-solutions/.github/main/profile/solacc_logo.png width="600px">

[![DBR](https://img.shields.io/badge/DBR-CHANGE_ME-red?logo=databricks&style=for-the-badge)](https://docs.databricks.com/release-notes/runtime/CHANGE_ME.html)
[![CLOUD](https://img.shields.io/badge/CLOUD-CHANGE_ME-blue?logo=googlecloud&style=for-the-badge)](https://databricks.com/try-databricks)

## Business Problem
WHAT IS THE BUSINESS PROBLEM ADDRESSED BY THIS SOLUTION

## Reference Architecture
IMAGE TO REFERENCE ARCHITECTURE

## Authors
<[email protected]>

## Project support

Please note the code in this project is provided for your exploration only, and are not formally supported by Databricks with Service Level Agreements (SLAs). They are provided AS-IS and we do not make any guarantees of any kind. Please do not submit a support ticket relating to any issues arising from the use of these projects. The source in this project is provided subject to the Databricks [License](./LICENSE.md). All included or referenced third party libraries are subject to the licenses set forth below.

Any issues discovered through the use of this project should be filed as GitHub Issues on the Repo. They will be reviewed as time permits, but there are no formal SLAs for support.

## License

&copy; 2024 Databricks, Inc. All rights reserved. The source in this notebook is provided subject to the Databricks License [https://databricks.com/db-license-source]. All included or referenced third party libraries are subject to the licenses set forth below.

| library | description | license | source |
|----------------------------------------|-------------------------|------------|-----------------------------------------------------|
3 changes: 3 additions & 0 deletions RUNME.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Run me...

Guiding users through implementation details. This may contain gotchas', code snippets and / or general guidance expressed as markdown.
6 changes: 6 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Security Policy

## Reporting a Vulnerability

Please email [email protected] to report any security vulnerabilities. We will acknowledge receipt of your vulnerability and strive to send you regular updates about our progress. If you're curious about the status of your disclosure please feel free to email us again. If you want to encrypt your disclosure email, you can use [this PGP key](https://keybase.io/arikfr/key.asc).

Empty file added requirements.txt
Empty file.
Empty file added scripts/__init__.py
Empty file.
Empty file added scripts/test.py
Empty file.

0 comments on commit 6ef5892

Please sign in to comment.