Skip to content
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

feature/finish-db-models #7

Merged
merged 15 commits into from
Nov 7, 2020
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
python-version: 3.8
- name: Install graphviz
run: |
sudo apt-get install graphviz libgraphviz-dev -y
sudo apt-get install graphviz
- name: Install Dependencies
run: |
pip install --upgrade pip
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,39 @@ on:
branches:
- main
schedule:
# <minute [0,59]> <hour [0,23]> <day of the month [1,31]> <month of the year [1,12]> <day of the week [0,6]>
# <minute [0,59]> <hour [0,23]> <day of the month [1,31]>
# <month of the year [1,12]> <day of the week [0,6]>
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07
# Run every Monday at 18:00:00 UTC (Monday at 10:00:00 PST)
- cron: '0 18 * * 1'
# Run every Monday at 18:00:00 UTC (Monday at 10:24:00 PST)
# (Since these CRONs are used by a lot of people -
# let's be nice to the servers and schedule it _not_ on the hour)
- cron: '24 18 * * 1'

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install graphviz
- name: Install graphviz (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install graphviz
- name: Install graphviz (Mac)
if: matrix.os == 'macOS-latest'
run: |
brew install graphviz
- name: Install graphviz (Windows)
if: matrix.os == 'windows-latest'
run: |
sudo apt-get install graphviz libgraphviz-dev -y
choco install graphviz
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -44,7 +59,7 @@ jobs:
python-version: 3.8
- name: Install graphviz
run: |
sudo apt-get install graphviz libgraphviz-dev -y
sudo apt-get install graphviz
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,29 @@ on: pull_request

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install graphviz
- name: Install graphviz (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install graphviz
- name: Install graphviz (Mac)
if: matrix.os == 'macOS-latest'
run: |
brew install graphviz
- name: Install graphviz (Windows)
if: matrix.os == 'windows-latest'
run: |
sudo apt-get install graphviz libgraphviz-dev -y
choco install graphviz
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -36,7 +48,7 @@ jobs:
python-version: 3.8
- name: Install graphviz
run: |
sudo apt-get install graphviz libgraphviz-dev -y
sudo apt-get install graphviz
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -58,7 +70,7 @@ jobs:
python-version: 3.8
- name: Install graphviz
run: |
sudo apt-get install graphviz libgraphviz-dev -y
sudo apt-get install graphviz
- name: Install Dependencies
run: |
pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions cdp_backend/bin/create_cdp_database_uml.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _construct_dot_file(output_file: str):

# First pass: create nodes for each model
for model_name, cls in inspect.getmembers(models, inspect.isclass):
if model_name not in ["Model", "datetime"]:
if model_name not in models._BUILD_IGNORE_CLASSES:
# Attach fields for each model by using the Example
fields = []
m = cls.Example()
Expand Down Expand Up @@ -106,7 +106,7 @@ def _construct_dot_file(output_file: str):

# Second pass: Create DAG
for model_name, cls in inspect.getmembers(models, inspect.isclass):
if model_name not in ["Model", "datetime"]:
if model_name not in models._BUILD_IGNORE_CLASSES:
# Attach fields for each model by using the Example
m = cls.Example()

Expand Down
Loading