Skip to content

Adding validation that keys are covered by selects #714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: zipline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
76 changes: 76 additions & 0 deletions .github/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FROM ubuntu:latest

# build using command: docker build --progress=plain -t chronon-base .

# Install necessary tools and Python
RUN apt update && apt install -y wget curl bash python3 python3-pip openjdk-17-jdk python3.12-venv

# java
ENV JAVA_HOME=/usr/lib/jvm/default-jvm
ENV PATH=$PATH:$JAVA_HOME/bin

# sbt for scala
RUN curl -L "https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.tgz" | tar -xz -C /usr/local
ENV PATH="/usr/local/sbt/bin:${PATH}"

# bazel
RUN curl -fsSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64" -o /usr/local/bin/bazel
RUN chmod +x /usr/local/bin/bazel
ENV PATH="/usr/local/bin:${PATH}"

# thrift
ARG THRIFT_VERSION=0.21.0
RUN apt install -y \
build-essential \
cmake \
libboost-dev \
libssl-dev \
libevent-dev \
bison \
flex \
autoconf \
automake \
libtool \
curl && \
curl -LSs https://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz -o thrift-${THRIFT_VERSION}.tar.gz && \
tar -xzf thrift-${THRIFT_VERSION}.tar.gz && \
cd thrift-${THRIFT_VERSION} && \
./configure --without-python --without-cpp --without-nodejs --without-java && \
make && \
make install && \
cd .. && \
rm -rf thrift-${THRIFT_VERSION} thrift-${THRIFT_VERSION}.tar.gz && \
apt purge -y \
build-essential \
cmake \
libboost-dev \
libssl-dev \
libevent-dev \
bison \
flex \
autoconf \
automake \
libtool \
curl && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*

# Upgrade pip and install some common Python packages
RUN pip3 install --break-system-packages pytest tox flake8 ruff

RUN apt update && apt install -y build-essential git
RUN mkdir -p /usr/lib/jvm && ln -s /usr/lib/jvm/java-17-openjdk-amd64/ /usr/lib/jvm/default-jvm

# Verify installations
RUN java -version && \
thrift -version && \
python3 --version && \
pip3 --version && \
bazel --version && \
git --version

# Set working directory
WORKDIR /app

# Cmd to run when starting the container
CMD ["/bin/bash"]
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Summary

## Checklist
- [ ] Added Unit Tests
- [ ] Covered by existing CI
- [ ] Integration tested
- [ ] Documentation update

17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Major features / breaking changes
labels:
- Semver-Major
- title: Minor features
labels:
- Semver-Minor
- title: Bug fixes
labels:
- Semver-Patch
- title: Other changes
labels:
- "*"
35 changes: 35 additions & 0 deletions .github/workflows/build_and_push_docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Push Docker Image

on:
push:
paths:
- '.github/image/Dockerfile'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-ci

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .github/image
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
14 changes: 14 additions & 0 deletions .github/workflows/require_triggered_status_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: branch_protection
on:
push:
jobs:
enforce_triggered_workflows:
runs-on: ubuntu-latest
permissions:
checks: read
steps:
- name: GitHub Checks
uses: poseidon/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
delay: "10s"
53 changes: 53 additions & 0 deletions .github/workflows/test_bazel_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test Bazel Config

on:
push:
branches:
- main
paths:
- 'tools/**'
- '.github/workflows/test_bazel_config.yaml'
- '.bazelrc'
- '.bazeliskrc'
- 'WORKSPACE'
pull_request:
branches:
- main
paths:
- 'tools/**'
- '.github/workflows/test_bazel_config.yaml'
- '.bazelrc'
- '.bazeliskrc'
- 'WORKSPACE'


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
bazel_config_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
working-directory: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4

- name: Setup Bazel cache credentials
run: |
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json

- name: Run bazel sync
run: |
bazel build \
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \
--google_credentials=bazel-cache-key.json \
--nobuild \
//...
71 changes: 71 additions & 0 deletions .github/workflows/test_python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Test Python

on:
push:
branches:
- main
paths:
- 'api/python/**'
- '.github/workflows/test_python.yaml'
pull_request:
branches:
- main
paths:
- 'api/python/**'
- '.github/workflows/test_python.yaml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
python_tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
working-directory: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4

- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"

- name: Set up Python virtual environment
shell: bash
run: |
python3 -m venv chronon_py_env
source chronon_py_env/bin/activate

- name: Run Chronon Python lint (ruff)
shell: bash
run: |
source chronon_py_env/bin/activate
cd api/python
pip install ruff
ruff check .

- name: Run Chronon Python tests
shell: bash
run: |
set -euxo pipefail
source chronon_py_env/bin/activate
for file in api/thrift/*.thrift; do
thrift --gen py -out api/python/ "$file"
done
cd api/python
pip3 install -r requirements/dev.txt
pip3 install tox
tox

- uses: actions/upload-artifact@v4
with:
name: htmlcov
path: api/python/htmlcov
Loading