-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2838 from cal-itp/bring-in-calitp-data-analysis
Bring in calitp-data-analysis and remove calitp-data
- Loading branch information
Showing
53 changed files
with
3,585 additions
and
1,247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Test, visualize, and build calitp-data-analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- '.github/workflows/build-calitp-data-analysis.yml' | ||
- 'packages/calitp-data-analysis/calitp_data_analysis/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/build-calitp-data-analysis.yml' | ||
- 'packages/calitp-data-analysis/calitp_data_analysis/**' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check_and_build: | ||
name: check python | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- uses: google-github-actions/setup-gcloud@v0 | ||
with: | ||
service_account_key: ${{ secrets.GCP_SA_KEY }} | ||
export_default_credentials: true | ||
- name: Run checks | ||
working-directory: packages/calitp-data-analysis | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python - | ||
poetry install | ||
poetry run mypy . | ||
poetry run pytest | ||
poetry build | ||
# TODO: add publishing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,12 @@ | ||
"""Macros for Operators""" | ||
import os | ||
|
||
from calitp_data.config import is_development | ||
|
||
# To add a macro, add its definition in the appropriate section | ||
# And then add it to the dictionary at the bottom of this file | ||
|
||
# Is Development ====================================================== | ||
|
||
|
||
def is_development_macro(): | ||
"""Make calitp-py's is_development function available via macro""" | ||
|
||
return is_development() | ||
|
||
|
||
# ACTUALLY DEFINE MACROS ============================================================= | ||
|
||
# template must be added here to be accessed in dags.py | ||
# key is alias that will be used to reference the template in DAG tasks | ||
# value is name of function template as defined above | ||
|
||
|
||
data_infra_macros = { | ||
"is_development": is_development_macro, | ||
"image_tag": lambda: "development" if is_development() else "latest", | ||
"image_tag": lambda: "development" | ||
if os.environ["AIRFLOW_ENV"] == "development" | ||
else "latest", | ||
"get_project_id": lambda: "cal-itp-data-infra-staging" | ||
if os.environ["AIRFLOW_ENV"] == "development" | ||
else "cal-itp-data-infra", | ||
"env_var": os.getenv, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
146 changes: 0 additions & 146 deletions
146
airflow/plugins/operators/amplitude_to_flattened_json.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.