-
Notifications
You must be signed in to change notification settings - Fork 3
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 #66 from RADAR-base/dev
Initial Release of RADAR-Pipeline
- Loading branch information
Showing
50 changed files
with
2,962 additions
and
328 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[flake8] | ||
ignore = E203, E266, E501, W503, F403, F401 | ||
ignore = E203, E266, W503, F403, F401 | ||
max-line-length = 88 | ||
max-complexity = 18 | ||
max-complexity = 15 | ||
select = B,C,E,F,W,T4,B9 |
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,44 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Lint and Test | ||
|
||
on: | ||
push: | ||
branches: ['main', 'dev'] | ||
pull_request: | ||
branches: ['main', 'dev'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
pip install -r requirements.txt | ||
- name: Install project | ||
run: | | ||
pip install -e . | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 radarpipeline/ --count --select=B,C,E,F,W,T4,B9 --ignore=E203,E266,W503,F403,F401 --show-source --statistics | ||
# exit-zero treats all errors as warnings. | ||
flake8 radarpipeline/ --count --exit-zero --max-complexity=15 --max-line-length=88 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=radarpipeline tests/ |
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,3 +1,3 @@ | ||
[settings] | ||
known_third_party = git,pandas,pyspark,requests,setuptools,yaml | ||
known_third_party = git,pandas,pyspark,pytest,requests,setuptools,yaml | ||
profile = black |
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,19 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM openjdk:slim | ||
|
||
COPY --from=python:3.9 / / | ||
|
||
RUN pip install --upgrade pip | ||
|
||
WORKDIR /radarpipeline | ||
|
||
COPY requirements.txt requirements.txt | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
RUN pip install -e . | ||
|
||
CMD ["python", "."] |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
project: | ||
project_name: mock_project | ||
description: mock_description | ||
version: mock_version | ||
|
||
input: | ||
data_type: mock # couldbe mock, local, sftp, s3 | ||
config: | ||
## In case of sftp, use the following format | ||
# sftp_host: | ||
# sftp_source_path: | ||
# sftp_username: | ||
# sftp_private_key: | ||
# sftp_target_path: | ||
## In case of s3, use the following format | ||
# aws_access_key_id: | ||
# aws_secret_access_key: | ||
# region_name: | ||
# s3_access_url: | ||
# bucket: | ||
# prefix: | ||
## In case of local or Mock, use the following format | ||
# source_path: mockdata/mockdata | ||
data_format: csv | ||
|
||
configurations: | ||
df_type: 'pandas' # can be pandas or spark | ||
|
||
features: | ||
- location: 'https://github.com/RADAR-base-Analytics/mockfeatures' | ||
branch: main | ||
feature_groups: | ||
- MockFeatureGroup | ||
feature_names: | ||
- all | ||
|
||
output: | ||
output_location: local # can be local, postgres, sftp | ||
config: | ||
target_path: output/mockdata | ||
data_format: csv | ||
compress: false | ||
|
||
spark_config: | ||
spark.executor.instances: 6 | ||
spark.driver.memory: 10G |
File renamed without changes.
Submodule mockdata
updated
3358 files
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,3 +1,40 @@ | ||
from pyspark.sql.types import ( | ||
BooleanType, | ||
ByteType, | ||
DoubleType, | ||
FloatType, | ||
IntegerType, | ||
LongType, | ||
ShortType, | ||
StringType, | ||
) | ||
|
||
ENCODING = "utf-8" | ||
LINESEP = "\n" | ||
CSV_DELIMITER = "," | ||
|
||
STRING_TYPE = StringType() | ||
BOOLEAN_TYPE = BooleanType() | ||
BYTE_TYPE = ByteType() | ||
SHORT_TYPE = ShortType() | ||
INT_TYPE = IntegerType() | ||
LONG_TYPE = LongType() | ||
FLOAT_TYPE = FloatType() | ||
DOUBLE_TYPE = DoubleType() | ||
|
||
DATA_TYPE_MAPPING = { | ||
"byte": BYTE_TYPE, | ||
"short": SHORT_TYPE, | ||
"int": INT_TYPE, | ||
"long": LONG_TYPE, | ||
"float": FLOAT_TYPE, | ||
"double": DOUBLE_TYPE, | ||
"string": STRING_TYPE, | ||
"char": STRING_TYPE, | ||
"enum": STRING_TYPE, | ||
"array": STRING_TYPE, | ||
"boolean": BOOLEAN_TYPE, | ||
} | ||
|
||
INTEGER_TYPES = set([BYTE_TYPE, SHORT_TYPE, INT_TYPE, LONG_TYPE]) | ||
FLOATING_TYPES = set([FLOAT_TYPE, DOUBLE_TYPE]) |
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
Oops, something went wrong.