Skip to content

Commit

Permalink
AL: refactor to Hyperscale
Browse files Browse the repository at this point in the history
  • Loading branch information
adalundhe committed Jun 19, 2024
1 parent fed4b8f commit cc41788
Show file tree
Hide file tree
Showing 1,612 changed files with 154,320 additions and 161 deletions.
10 changes: 10 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM corpheus91/devcontainers:python-3.12-bookworm


RUN apt-get update && \
apt-get install -y libssl-dev && \
pip install uv && \
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb && \
dpkg -i libssl1.1_1.1.1f-1ubuntu2.22_amd64.deb


48 changes: 48 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Python 3.12",
"dockerComposeFile": "docker-compose.yml",
// We can specify environmental variables via remoteEnv
// to make them only available for debugging/terminal sessions
// etc.
"service": "hyperscale",
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
// These are all common to https://github.com/datavant/datavant-devcontainers/blob/main/.devcontainer/devcontainer.json
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.enable": true,
"git.path": "/usr/local/bin/git",
"python.languageServer": "Pylance",
"pylint.path": [
"/usr/local/bin/python",
"-m",
"pylint"
],
"editor.formatOnSave": true,

"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always"
},
"editor.defaultFormatter": "charliermarsh.ruff",
"terminal.integrated.shellIntegration.decorationsEnabled": "both",
"editor.tabCompletion": "on",
"terminal.integrated.defaultProfile.linux": "bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"charliermarsh.ruff",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-azuretools.vscode-docker",
"skellock.just"
]
}
},
"postCreateCommand": "bash .devcontainer/run.sh",
"workspaceFolder": "/workspace"
}
22 changes: 22 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.10'

services:
hyperscale:
build:
context: ..
dockerfile: ./.devcontainer/dockerfile
ssh:
- default=${SSH_AUTH_SOCK}
environment:
- LD_LIBRARY_PATH=/usr/local/lib
volumes:
- ..:/workspace
- ../.git:/workspace/.git
- ../.devcontainer:/workspace/.devcontainer
- ~/.aws:/home/datavant/.aws
- ~/.ssh:/home/datavant/.ssh
- ~/.git:/home/datavant/.git
ports:
- 5003:5003
stdin_open: true
tty: true
15 changes: 15 additions & 0 deletions .devcontainer/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

if [[ -d .venv ]]; then
uv venv
fi

pip uninstall playwright

source .venv/bin/activate


uv pip install -r requirements.in
uv pip install -e .

playwright install
playwright install-de
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This is a basic workflow to help you get started with Actions

name: Publish to PyPi

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install pypa/setuptools
run: >-
python -m
pip install wheel
- name: Build a binary wheel
run: >-
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
178 changes: 17 additions & 161 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,162 +1,18 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
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/
cover/

# 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
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .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

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

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

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.idea
*.egg-info
__pycache__
*.pyc
build
dist
.vscode
*-secret.yaml
*-secret.yml
secret.yaml
secret.yml
chromedriver
.eggs
.vscode
kube_config
dev.yaml
.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/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
*.png
1 change: 1 addition & 0 deletions .version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.7.19
Loading

0 comments on commit cc41788

Please sign in to comment.