koheesio 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- koheesio-0.7.0/.github/CODEOWNERS +1 -0
- koheesio-0.7.0/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
- koheesio-0.7.0/.github/ISSUE_TEMPLATE/feature_request.md +28 -0
- koheesio-0.7.0/.github/PULL_REQUEST_TEMPLATE.md +36 -0
- koheesio-0.7.0/.github/workflows/release.yml +90 -0
- koheesio-0.7.0/.github/workflows/test.yaml +71 -0
- koheesio-0.7.0/.gitignore +141 -0
- koheesio-0.7.0/CONTRIBUTING.md +103 -0
- koheesio-0.7.0/LICENSE.txt +201 -0
- koheesio-0.7.0/Makefile +250 -0
- koheesio-0.7.0/PKG-INFO +238 -0
- koheesio-0.7.0/README.md +147 -0
- koheesio-0.7.0/docs/api_reference/intro_api.md +2 -0
- koheesio-0.7.0/docs/assets/k_blue.svg +6 -0
- koheesio-0.7.0/docs/assets/k_in_logo.svg +8 -0
- koheesio-0.7.0/docs/assets/k_in_logo_white.svg +8 -0
- koheesio-0.7.0/docs/assets/k_white.svg +6 -0
- koheesio-0.7.0/docs/assets/logo_koheesio.svg +31 -0
- koheesio-0.7.0/docs/assets/logo_total_white.svg +31 -0
- koheesio-0.7.0/docs/assets/maintainance.png +0 -0
- koheesio-0.7.0/docs/community/approach-documentation.md +35 -0
- koheesio-0.7.0/docs/community/contribute.md +123 -0
- koheesio-0.7.0/docs/css/custom.css +69 -0
- koheesio-0.7.0/docs/gen_ref_nav.py +33 -0
- koheesio-0.7.0/docs/includes/glossary.md +7 -0
- koheesio-0.7.0/docs/index.md +3 -0
- koheesio-0.7.0/docs/misc/info.md +1 -0
- koheesio-0.7.0/docs/misc/tags.md +7 -0
- koheesio-0.7.0/docs/reference/concepts/concepts.md +136 -0
- koheesio-0.7.0/docs/reference/concepts/context.md +294 -0
- koheesio-0.7.0/docs/reference/concepts/logging.md +242 -0
- koheesio-0.7.0/docs/reference/concepts/readers.md +143 -0
- koheesio-0.7.0/docs/reference/concepts/steps.md +397 -0
- koheesio-0.7.0/docs/reference/concepts/tasks.md +8 -0
- koheesio-0.7.0/docs/reference/concepts/transformations.md +310 -0
- koheesio-0.7.0/docs/reference/concepts/writers.md +131 -0
- koheesio-0.7.0/docs/tutorials/advanced-data-processing.md +64 -0
- koheesio-0.7.0/docs/tutorials/getting-started.md +66 -0
- koheesio-0.7.0/docs/tutorials/hello-world.md +141 -0
- koheesio-0.7.0/docs/tutorials/how-to.md +8 -0
- koheesio-0.7.0/docs/tutorials/learn-koheesio.md +73 -0
- koheesio-0.7.0/docs/tutorials/onboarding.md +147 -0
- koheesio-0.7.0/docs/tutorials/testing-koheesio-steps.md +148 -0
- koheesio-0.7.0/mkdocs.yml +213 -0
- koheesio-0.7.0/pyproject.toml +653 -0
- koheesio-0.7.0/src/koheesio/__about__.py +48 -0
- koheesio-0.7.0/src/koheesio/__init__.py +37 -0
- koheesio-0.7.0/src/koheesio/asyncio/__init__.py +107 -0
- koheesio-0.7.0/src/koheesio/asyncio/http.py +383 -0
- koheesio-0.7.0/src/koheesio/context.py +480 -0
- koheesio-0.7.0/src/koheesio/integrations/__init__.py +3 -0
- koheesio-0.7.0/src/koheesio/integrations/box.py +664 -0
- koheesio-0.7.0/src/koheesio/integrations/spark/__init__.py +0 -0
- koheesio-0.7.0/src/koheesio/integrations/spark/dq/__init__.py +0 -0
- koheesio-0.7.0/src/koheesio/integrations/spark/dq/spark_expectations.py +166 -0
- koheesio-0.7.0/src/koheesio/integrations/spark/sftp.py +477 -0
- koheesio-0.7.0/src/koheesio/logger.py +267 -0
- koheesio-0.7.0/src/koheesio/models/__init__.py +668 -0
- koheesio-0.7.0/src/koheesio/models/sql.py +68 -0
- koheesio-0.7.0/src/koheesio/notifications/__init__.py +26 -0
- koheesio-0.7.0/src/koheesio/notifications/slack.py +122 -0
- koheesio-0.7.0/src/koheesio/secrets/__init__.py +72 -0
- koheesio-0.7.0/src/koheesio/secrets/cerberus.py +89 -0
- koheesio-0.7.0/src/koheesio/spark/__init__.py +53 -0
- koheesio-0.7.0/src/koheesio/spark/delta.py +311 -0
- koheesio-0.7.0/src/koheesio/spark/etl_task.py +141 -0
- koheesio-0.7.0/src/koheesio/spark/readers/__init__.py +56 -0
- koheesio-0.7.0/src/koheesio/spark/readers/databricks/__init__.py +0 -0
- koheesio-0.7.0/src/koheesio/spark/readers/databricks/autoloader.py +116 -0
- koheesio-0.7.0/src/koheesio/spark/readers/delta.py +326 -0
- koheesio-0.7.0/src/koheesio/spark/readers/dummy.py +44 -0
- koheesio-0.7.0/src/koheesio/spark/readers/file_loader.py +233 -0
- koheesio-0.7.0/src/koheesio/spark/readers/hana.py +66 -0
- koheesio-0.7.0/src/koheesio/spark/readers/jdbc.py +109 -0
- koheesio-0.7.0/src/koheesio/spark/readers/kafka.py +138 -0
- koheesio-0.7.0/src/koheesio/spark/readers/memory.py +113 -0
- koheesio-0.7.0/src/koheesio/spark/readers/metastore.py +21 -0
- koheesio-0.7.0/src/koheesio/spark/readers/rest_api.py +126 -0
- koheesio-0.7.0/src/koheesio/spark/readers/snowflake.py +33 -0
- koheesio-0.7.0/src/koheesio/spark/readers/spark_sql_reader.py +62 -0
- koheesio-0.7.0/src/koheesio/spark/readers/teradata.py +72 -0
- koheesio-0.7.0/src/koheesio/spark/snowflake.py +1343 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/__init__.py +552 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/arrays.py +509 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/camel_to_snake.py +82 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/cast_to_datatype.py +880 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/date_time/__init__.py +277 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/date_time/interval.py +345 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/drop_column.py +50 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/dummy.py +38 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/get_item.py +138 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/hash.py +103 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/lookup.py +174 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/repartition.py +66 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/replace.py +121 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/row_number_dedup.py +142 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/sql_transform.py +37 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/__init__.py +66 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/change_case.py +181 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/concat.py +129 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/pad.py +99 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/regexp.py +158 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/replace.py +108 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/split.py +135 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/substring.py +80 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/strings/trim.py +133 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/transform.py +104 -0
- koheesio-0.7.0/src/koheesio/spark/transformations/uuid5.py +166 -0
- koheesio-0.7.0/src/koheesio/spark/utils.py +179 -0
- koheesio-0.7.0/src/koheesio/spark/writers/__init__.py +79 -0
- koheesio-0.7.0/src/koheesio/spark/writers/buffer.py +486 -0
- koheesio-0.7.0/src/koheesio/spark/writers/delta/__init__.py +15 -0
- koheesio-0.7.0/src/koheesio/spark/writers/delta/batch.py +366 -0
- koheesio-0.7.0/src/koheesio/spark/writers/delta/scd.py +577 -0
- koheesio-0.7.0/src/koheesio/spark/writers/delta/stream.py +36 -0
- koheesio-0.7.0/src/koheesio/spark/writers/delta/utils.py +68 -0
- koheesio-0.7.0/src/koheesio/spark/writers/dummy.py +84 -0
- koheesio-0.7.0/src/koheesio/spark/writers/kafka.py +180 -0
- koheesio-0.7.0/src/koheesio/spark/writers/snowflake.py +5 -0
- koheesio-0.7.0/src/koheesio/spark/writers/stream.py +358 -0
- koheesio-0.7.0/src/koheesio/sso/__init__.py +0 -0
- koheesio-0.7.0/src/koheesio/sso/okta.py +108 -0
- koheesio-0.7.0/src/koheesio/steps/__init__.py +685 -0
- koheesio-0.7.0/src/koheesio/steps/dummy.py +43 -0
- koheesio-0.7.0/src/koheesio/steps/http.py +447 -0
- koheesio-0.7.0/src/koheesio/utils.py +102 -0
- koheesio-0.7.0/tests/_data/context/common.yml +11 -0
- koheesio-0.7.0/tests/_data/context/dev.yml +7 -0
- koheesio-0.7.0/tests/_data/context/sample.json +1 -0
- koheesio-0.7.0/tests/_data/context/sample.toml +8 -0
- koheesio-0.7.0/tests/_data/context/sample.yaml +6 -0
- koheesio-0.7.0/tests/_data/readers/avro_file/.part-00000-c95e3fda-3943-4701-b0ae-cb6bc7e015e4-c000.avro.crc +0 -0
- koheesio-0.7.0/tests/_data/readers/avro_file/part-00000-c95e3fda-3943-4701-b0ae-cb6bc7e015e4-c000.avro +0 -0
- koheesio-0.7.0/tests/_data/readers/csv_file/dummy.csv +4 -0
- koheesio-0.7.0/tests/_data/readers/csv_file/dummy_semicolon.csv +4 -0
- koheesio-0.7.0/tests/_data/readers/delta_file/.part-00000-0f8b246f-e779-4d48-896a-6a12362bf370-c000.snappy.parquet.crc +0 -0
- koheesio-0.7.0/tests/_data/readers/delta_file/_delta_log/.00000000000000000000.json.crc +0 -0
- koheesio-0.7.0/tests/_data/readers/delta_file/_delta_log/00000000000000000000.json +4 -0
- koheesio-0.7.0/tests/_data/readers/delta_file/part-00000-0f8b246f-e779-4d48-896a-6a12362bf370-c000.snappy.parquet +0 -0
- koheesio-0.7.0/tests/_data/readers/json_file/dummy.json +20 -0
- koheesio-0.7.0/tests/_data/readers/json_file/dummy_simple.json +3 -0
- koheesio-0.7.0/tests/_data/readers/orc_file/.part-00000-ddcce057-2ef4-44b1-baf4-d263f748b060-c000.snappy.orc.crc +0 -0
- koheesio-0.7.0/tests/_data/readers/orc_file/part-00000-ddcce057-2ef4-44b1-baf4-d263f748b060-c000.snappy.orc +0 -0
- koheesio-0.7.0/tests/_data/sql/spark_sql_reader.sql +1 -0
- koheesio-0.7.0/tests/_data/steps/expected_step_output.yaml +11 -0
- koheesio-0.7.0/tests/_data/steps/expected_step_output_simple.yaml +7 -0
- koheesio-0.7.0/tests/_data/transformations/dummy.sql +3 -0
- koheesio-0.7.0/tests/_data/transformations/spark_expectations_resources/test_product_dq_stats.ddl +22 -0
- koheesio-0.7.0/tests/_data/transformations/spark_expectations_resources/test_product_rules.ddl +16 -0
- koheesio-0.7.0/tests/_data/transformations/spark_expectations_resources/test_product_rules.sql +12 -0
- koheesio-0.7.0/tests/_data/transformations/string_data/100000_rows_with_strings.json +100000 -0
- koheesio-0.7.0/tests/asyncio/test_asyncio_http.py +191 -0
- koheesio-0.7.0/tests/conftest.py +22 -0
- koheesio-0.7.0/tests/core/test_context.py +347 -0
- koheesio-0.7.0/tests/core/test_init.py +8 -0
- koheesio-0.7.0/tests/core/test_logger.py +117 -0
- koheesio-0.7.0/tests/deprecated/nike/ada/__init__.py +0 -0
- koheesio-0.7.0/tests/models/test_models.py +233 -0
- koheesio-0.7.0/tests/notifications/test_slack.py +48 -0
- koheesio-0.7.0/tests/spark/conftest.py +307 -0
- koheesio-0.7.0/tests/spark/integrations/box/test_box.py +308 -0
- koheesio-0.7.0/tests/spark/integrations/dq/test_spark_expectations.py +218 -0
- koheesio-0.7.0/tests/spark/integrations/snowflake/test_snowflake.py +365 -0
- koheesio-0.7.0/tests/spark/integrations/snowflake/test_sync_task.py +530 -0
- koheesio-0.7.0/tests/spark/readers/test_auto_loader.py +51 -0
- koheesio-0.7.0/tests/spark/readers/test_delta_reader.py +125 -0
- koheesio-0.7.0/tests/spark/readers/test_file_loader.py +154 -0
- koheesio-0.7.0/tests/spark/readers/test_hana.py +34 -0
- koheesio-0.7.0/tests/spark/readers/test_jdbc.py +76 -0
- koheesio-0.7.0/tests/spark/readers/test_memory.py +53 -0
- koheesio-0.7.0/tests/spark/readers/test_metastore_reader.py +16 -0
- koheesio-0.7.0/tests/spark/readers/test_reader.py +19 -0
- koheesio-0.7.0/tests/spark/readers/test_rest_api.py +90 -0
- koheesio-0.7.0/tests/spark/readers/test_spark_sql_reader.py +41 -0
- koheesio-0.7.0/tests/spark/readers/test_teradata.py +34 -0
- koheesio-0.7.0/tests/spark/tasks/test_etl_task.py +112 -0
- koheesio-0.7.0/tests/spark/test_delta.py +144 -0
- koheesio-0.7.0/tests/spark/test_spark.py +34 -0
- koheesio-0.7.0/tests/spark/test_warnings.py +26 -0
- koheesio-0.7.0/tests/spark/transformations/date_time/test_date_time.py +202 -0
- koheesio-0.7.0/tests/spark/transformations/date_time/test_interval.py +167 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_change_case.py +148 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_concat.py +188 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_pad.py +121 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_regexp.py +157 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_split.py +218 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_string_replace.py +96 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_substring.py +78 -0
- koheesio-0.7.0/tests/spark/transformations/strings/test_trim.py +124 -0
- koheesio-0.7.0/tests/spark/transformations/test_arrays.py +389 -0
- koheesio-0.7.0/tests/spark/transformations/test_camel_to_snake_transform.py +39 -0
- koheesio-0.7.0/tests/spark/transformations/test_cast_to_datatype.py +465 -0
- koheesio-0.7.0/tests/spark/transformations/test_drop_column.py +66 -0
- koheesio-0.7.0/tests/spark/transformations/test_get_item.py +83 -0
- koheesio-0.7.0/tests/spark/transformations/test_hash.py +115 -0
- koheesio-0.7.0/tests/spark/transformations/test_lookup.py +73 -0
- koheesio-0.7.0/tests/spark/transformations/test_repartition.py +63 -0
- koheesio-0.7.0/tests/spark/transformations/test_replace.py +110 -0
- koheesio-0.7.0/tests/spark/transformations/test_row_number_dedup.py +169 -0
- koheesio-0.7.0/tests/spark/transformations/test_sql_transform.py +121 -0
- koheesio-0.7.0/tests/spark/transformations/test_transform.py +85 -0
- koheesio-0.7.0/tests/spark/transformations/test_transformation.py +200 -0
- koheesio-0.7.0/tests/spark/transformations/test_uuid5.py +64 -0
- koheesio-0.7.0/tests/spark/writers/delta/test_delta_writer.py +402 -0
- koheesio-0.7.0/tests/spark/writers/delta/test_scd.py +396 -0
- koheesio-0.7.0/tests/spark/writers/test_buffer.py +265 -0
- koheesio-0.7.0/tests/spark/writers/test_dummy.py +26 -0
- koheesio-0.7.0/tests/spark/writers/test_sftp.py +509 -0
- koheesio-0.7.0/tests/spark/writers/test_stream.py +66 -0
- koheesio-0.7.0/tests/sso/test_okta.py +58 -0
- koheesio-0.7.0/tests/steps/test_http.py +221 -0
- koheesio-0.7.0/tests/steps/test_steps.py +413 -0
- koheesio-0.7.0/tests/utils/test_utils.py +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @Nike-Inc/koheesio-dev
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: "[BUG] Please add your bug title here"
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- Please provide as much detail as possible to help us understand and reproduce the issue. This will enable us to address it more effectively. -->
|
|
11
|
+
|
|
12
|
+
## Describe the bug
|
|
13
|
+
<!-- A clear and concise description of what the bug is. -->
|
|
14
|
+
|
|
15
|
+
## Steps to Reproduce
|
|
16
|
+
<!-- Steps to reproduce the behavior. For example:
|
|
17
|
+
1. Go to '...'
|
|
18
|
+
2. Click on '....'
|
|
19
|
+
3. Scroll down to '....'
|
|
20
|
+
4. See error
|
|
21
|
+
-->
|
|
22
|
+
|
|
23
|
+
## Expected behavior
|
|
24
|
+
<!-- A clear and concise description of what you expected to happen. -->
|
|
25
|
+
|
|
26
|
+
## Screenshots
|
|
27
|
+
<!-- If applicable, add screenshots to help explain your problem. -->
|
|
28
|
+
|
|
29
|
+
## Environment
|
|
30
|
+
<!-- Please provide information about your environment. For example:
|
|
31
|
+
- OS: [e.g. iOS]
|
|
32
|
+
- Browser [e.g. chrome, safari]
|
|
33
|
+
- Version [e.g. 22]
|
|
34
|
+
-->
|
|
35
|
+
|
|
36
|
+
## Additional context
|
|
37
|
+
<!-- Add any other context about the problem here. -->
|
|
38
|
+
|
|
39
|
+
## Applicable Stack Trace
|
|
40
|
+
<!-- If applicable, add the full stack trace or the clearly applicable sections of the stack trace here. -->
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: "[FEATURE] Please add your feature request title"
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- We follow Design thinking principles to bring the new feature request to life. Please read through [Design thinking](https://www.interaction-design.org/literature/article/5-stages-in-the-design-thinking-process) principles if you are not familiar. -->
|
|
11
|
+
|
|
12
|
+
<!-- This is the [Board](https://github.com/orgs/Nike-Inc/projects/4) your feature request would go through, so keep in mind that there would be more back and forth on this. If you are very clear with all phases, please describe them here for faster development. -->
|
|
13
|
+
|
|
14
|
+
## Is your feature request related to a problem? Please describe.
|
|
15
|
+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
|
16
|
+
...
|
|
17
|
+
|
|
18
|
+
## Describe the solution you'd like
|
|
19
|
+
<!-- A clear and concise description of what you want to happen. -->
|
|
20
|
+
...
|
|
21
|
+
|
|
22
|
+
## Describe alternatives you've considered
|
|
23
|
+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
## Additional context
|
|
27
|
+
<!-- Add any other context or screenshots about the feature request here. -->
|
|
28
|
+
...
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!--- Provide a general summary of your changes in the Title above -->
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
<!--- Describe your changes in detail -->
|
|
5
|
+
|
|
6
|
+
## Related Issue
|
|
7
|
+
<!--- This project only accepts pull requests related to open issues -->
|
|
8
|
+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
|
|
9
|
+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
|
|
10
|
+
<!--- Please link to the issue here: -->
|
|
11
|
+
|
|
12
|
+
## Motivation and Context
|
|
13
|
+
<!--- Why is this change required? What problem does it solve? -->
|
|
14
|
+
|
|
15
|
+
## How Has This Been Tested?
|
|
16
|
+
<!--- Please describe in detail how you tested your changes. -->
|
|
17
|
+
<!--- Include details of your testing environment, and the tests you ran to -->
|
|
18
|
+
<!--- see how your change affects other areas of the code, etc. -->
|
|
19
|
+
|
|
20
|
+
## Screenshots (if appropriate):
|
|
21
|
+
|
|
22
|
+
## Types of changes
|
|
23
|
+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
|
24
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
25
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
26
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
|
27
|
+
|
|
28
|
+
## Checklist:
|
|
29
|
+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
|
30
|
+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
|
31
|
+
- [ ] My code follows the code style of this project.
|
|
32
|
+
- [ ] My change requires a change to the documentation.
|
|
33
|
+
- [ ] I have updated the documentation accordingly.
|
|
34
|
+
- [ ] I have read the **CONTRIBUTING** document.
|
|
35
|
+
- [ ] I have added tests to cover my changes.
|
|
36
|
+
- [ ] All new and existing tests passed.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- koheesio-v*
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
defaults:
|
|
15
|
+
run:
|
|
16
|
+
shell: bash
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
APP_NAME: koheesio
|
|
20
|
+
PYTHON_VERSION: "3.12"
|
|
21
|
+
PYOXIDIZER_VERSION: "0.24.0"
|
|
22
|
+
DIST_URL: "https://github.com/Nike-Inc/koheesio/releases"
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
python-artifacts:
|
|
26
|
+
name: Build wheel and source distribution
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
|
|
29
|
+
outputs:
|
|
30
|
+
old-version: ${{ steps.version.outputs.old-version }}
|
|
31
|
+
version: ${{ steps.version.outputs.version }}
|
|
32
|
+
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout code
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
|
|
39
|
+
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
|
40
|
+
uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
43
|
+
|
|
44
|
+
- name: Install Hatch
|
|
45
|
+
uses: pypa/hatch@install
|
|
46
|
+
|
|
47
|
+
# Windows installers don't accept non-integer versions so we ubiquitously
|
|
48
|
+
# perform the following transformation: X.Y.Z.devN -> X.Y.Z.N
|
|
49
|
+
- name: Set project version
|
|
50
|
+
id: version
|
|
51
|
+
run: |-
|
|
52
|
+
old_version="$(hatch version)"
|
|
53
|
+
version="${old_version/dev/}"
|
|
54
|
+
|
|
55
|
+
echo "old-version=$old_version" >> $GITHUB_OUTPUT
|
|
56
|
+
echo "version=$version" >> $GITHUB_OUTPUT
|
|
57
|
+
echo "$version"
|
|
58
|
+
|
|
59
|
+
- name: Build
|
|
60
|
+
run: hatch build
|
|
61
|
+
|
|
62
|
+
- name: Upload artifacts
|
|
63
|
+
uses: actions/upload-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: python-artifacts
|
|
66
|
+
path: dist/*
|
|
67
|
+
if-no-files-found: error
|
|
68
|
+
|
|
69
|
+
publish-pypi:
|
|
70
|
+
name: Publish to PyPI
|
|
71
|
+
needs: python-artifacts
|
|
72
|
+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
# Specifying a GitHub environment is optional, but strongly encouraged
|
|
75
|
+
environment: release
|
|
76
|
+
permissions:
|
|
77
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
78
|
+
id-token: write
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- name: Download Python artifacts
|
|
82
|
+
uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: python-artifacts
|
|
85
|
+
path: dist
|
|
86
|
+
|
|
87
|
+
- name: Publish package to PyPI
|
|
88
|
+
uses: pypa/gh-action-pypi-publish@v1.8.14
|
|
89
|
+
with:
|
|
90
|
+
print-hash: true
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
STABLE_PYTHON_VERSION: '3.11'
|
|
14
|
+
PYTHONUNBUFFERED: "1"
|
|
15
|
+
FORCE_COLOR: "1"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
tests:
|
|
19
|
+
name: Python ${{ matrix.python-version }} with PySpark ${{ matrix.pyspark-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
# os: [ubuntu-latest, windows-latest, macos-latest] # FIXME: Add Windows and macOS
|
|
25
|
+
os: [ubuntu-latest]
|
|
26
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
27
|
+
pyspark-version: ['33', '34', '35']
|
|
28
|
+
exclude:
|
|
29
|
+
- python-version: '3.9'
|
|
30
|
+
pyspark-version: '35'
|
|
31
|
+
- python-version: '3.11'
|
|
32
|
+
pyspark-version: '33'
|
|
33
|
+
- python-version: '3.11'
|
|
34
|
+
pyspark-version: '34'
|
|
35
|
+
- python-version: '3.12'
|
|
36
|
+
pyspark-version: '33'
|
|
37
|
+
- python-version: '3.12'
|
|
38
|
+
pyspark-version: '34'
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
44
|
+
uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: ${{ matrix.python-version }}
|
|
47
|
+
|
|
48
|
+
- name: Install Hatch
|
|
49
|
+
uses: pypa/hatch@install
|
|
50
|
+
|
|
51
|
+
# - name: Check Code Quality
|
|
52
|
+
# run: |-
|
|
53
|
+
# hatch fmt --check --python=${{ matrix.python-version }}
|
|
54
|
+
|
|
55
|
+
- name: Run tests
|
|
56
|
+
run: hatch test --python=${{ matrix.python-version }} -i version=pyspark${{ matrix.pyspark-version }}
|
|
57
|
+
|
|
58
|
+
# https://github.com/marketplace/actions/alls-green#why
|
|
59
|
+
final_check: # This job does nothing and is only used for the branch protection
|
|
60
|
+
if: always()
|
|
61
|
+
|
|
62
|
+
needs:
|
|
63
|
+
- tests
|
|
64
|
+
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
|
|
67
|
+
steps:
|
|
68
|
+
- name: Decide whether the needed jobs succeeded or failed
|
|
69
|
+
uses: re-actors/alls-green@release/v1
|
|
70
|
+
with:
|
|
71
|
+
jobs: ${{ toJSON(needs) }}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
MANIFEST
|
|
27
|
+
schema*.json
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.coverage
|
|
43
|
+
.coverage.*
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
*.cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
.htmlcov/
|
|
51
|
+
XML_FOLDER
|
|
52
|
+
|
|
53
|
+
# Translations
|
|
54
|
+
*.mo
|
|
55
|
+
*.pot
|
|
56
|
+
|
|
57
|
+
# Django stuff:
|
|
58
|
+
*.log
|
|
59
|
+
local_settings.py
|
|
60
|
+
db.sqlite3
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
target/
|
|
74
|
+
|
|
75
|
+
# Jupyter Notebook
|
|
76
|
+
.ipynb_checkpoints
|
|
77
|
+
|
|
78
|
+
# pyenv
|
|
79
|
+
.python-version
|
|
80
|
+
|
|
81
|
+
# sdkman
|
|
82
|
+
.sdkmanrc
|
|
83
|
+
|
|
84
|
+
# celery beat schedule file
|
|
85
|
+
celerybeat-schedule
|
|
86
|
+
|
|
87
|
+
# SageMath parsed files
|
|
88
|
+
*.sage.py
|
|
89
|
+
|
|
90
|
+
# Environments
|
|
91
|
+
.env
|
|
92
|
+
.venv
|
|
93
|
+
env/
|
|
94
|
+
venv/
|
|
95
|
+
ENV/
|
|
96
|
+
env.bak/
|
|
97
|
+
venv.bak/
|
|
98
|
+
|
|
99
|
+
# Spyder project settings
|
|
100
|
+
.spyderproject
|
|
101
|
+
.spyproject
|
|
102
|
+
|
|
103
|
+
# Rope project settings
|
|
104
|
+
.ropeproject
|
|
105
|
+
|
|
106
|
+
# mkdocs documentation
|
|
107
|
+
/site
|
|
108
|
+
|
|
109
|
+
# ruff
|
|
110
|
+
.ruff_cache/
|
|
111
|
+
|
|
112
|
+
# mypy
|
|
113
|
+
.mypy_cache/
|
|
114
|
+
.DS_Store
|
|
115
|
+
|
|
116
|
+
# IDE
|
|
117
|
+
.idea/
|
|
118
|
+
metastore_db/
|
|
119
|
+
spark-warehouse
|
|
120
|
+
.run
|
|
121
|
+
.obsidian
|
|
122
|
+
|
|
123
|
+
# Pre-commit
|
|
124
|
+
.pre-commit-config.yaml
|
|
125
|
+
|
|
126
|
+
out/**
|
|
127
|
+
*.iml
|
|
128
|
+
|
|
129
|
+
/tests/integration/**/task_definition/*.yaml
|
|
130
|
+
/.vscode/settings.json
|
|
131
|
+
/.vscode/launch.json
|
|
132
|
+
|
|
133
|
+
.databricks
|
|
134
|
+
|
|
135
|
+
# PYTEST
|
|
136
|
+
/tests/_data/spark-warehouse
|
|
137
|
+
/tests/_data/checkpoint
|
|
138
|
+
/tests/_data/snowflake_staging.parq/
|
|
139
|
+
|
|
140
|
+
# DevContainer
|
|
141
|
+
.devcontainer
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# How to contribute
|
|
2
|
+
|
|
3
|
+
There are a few guidelines that we need contributors to follow so that we are able to process requests as efficiently as possible.
|
|
4
|
+
|
|
5
|
+
<!-- uncomment the below once Open Source is ready -->
|
|
6
|
+
[//]: # (If you have any questions or concerns please feel free to contact us at [opensource@nike.com](mailto:opensource@nike.com).)
|
|
7
|
+
|
|
8
|
+
[//]: # ()
|
|
9
|
+
[//]: # (## Getting Started)
|
|
10
|
+
|
|
11
|
+
[//]: # ()
|
|
12
|
+
[//]: # (* Review our [Code of Conduct](https://github.com/Nike-Inc/nike-inc.github.io/blob/master/CONDUCT.md))
|
|
13
|
+
|
|
14
|
+
[//]: # (* Submit the [Individual Contributor License Agreement](https://www.clahub.com/agreements/Nike-Inc/fastbreak))
|
|
15
|
+
|
|
16
|
+
[//]: # (* Make sure you have a [GitHub account](https://github.com/signup/free))
|
|
17
|
+
|
|
18
|
+
[//]: # (* Submit a ticket for your issue, assuming one does not already exist.)
|
|
19
|
+
|
|
20
|
+
[//]: # ( * Clearly describe the issue including steps to reproduce when it is a bug.)
|
|
21
|
+
|
|
22
|
+
[//]: # ( * Make sure you fill in the earliest version that you know has the issue.)
|
|
23
|
+
|
|
24
|
+
[//]: # (* Fork the repository on GitHub)
|
|
25
|
+
|
|
26
|
+
## Making Changes
|
|
27
|
+
|
|
28
|
+
* Create a feature branch off of `main` before you start your work.
|
|
29
|
+
* Please avoid working directly on the `main` branch.
|
|
30
|
+
* Setup the required package manager [poetry](#-package-manager)
|
|
31
|
+
* Setup the dev environment [see below](#-dev-environment-setup)
|
|
32
|
+
* Make commits of logical units.
|
|
33
|
+
* You may be asked to squash unnecessary commits down to logical units.
|
|
34
|
+
* Check for unnecessary whitespace with `git diff --check` before committing.
|
|
35
|
+
* Write meaningful, descriptive commit messages.
|
|
36
|
+
* Please follow existing code conventions when working on a file
|
|
37
|
+
* Make sure to check the standards on the code [see below](#-linting-and-standards)
|
|
38
|
+
* Make sure to test the code before you push changes [see below](#-testing)
|
|
39
|
+
|
|
40
|
+
## ๐ค Submitting Changes
|
|
41
|
+
|
|
42
|
+
* Push your changes to a topic branch in your fork of the repository.
|
|
43
|
+
* Submit a pull request to the repository in the Nike-Inc organization.
|
|
44
|
+
* After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request
|
|
45
|
+
if it isn't showing any activity.
|
|
46
|
+
* Bug fixes or features that lack appropriate tests may not be considered for merge.
|
|
47
|
+
* Changes that lower test coverage may not be considered for merge.
|
|
48
|
+
|
|
49
|
+
### ๐ฆ Package manager
|
|
50
|
+
|
|
51
|
+
We use `make` for managing different steps of setup and maintenance in the project. You can install make by following
|
|
52
|
+
the instructions [here](https://formulae.brew.sh/formula/make)
|
|
53
|
+
|
|
54
|
+
We use `poetry` as our package manager.
|
|
55
|
+
|
|
56
|
+
Please DO NOT use pip or conda to install the dependencies. Instead, use poetry:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
make poetry-install
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### ๐ Dev Environment Setup
|
|
63
|
+
|
|
64
|
+
To ensure our standards, make sure to install the required packages.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
make dev
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### ๐งน Linting and Standards
|
|
71
|
+
|
|
72
|
+
We use `pylint`, and `black` to maintain standards in the codebase
|
|
73
|
+
<small>(`mypy` to be added later)</small>
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
make check
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Make sure that the linter does not report any errors or warnings before submitting a pull request.
|
|
80
|
+
|
|
81
|
+
### ๐งช Testing
|
|
82
|
+
|
|
83
|
+
We use `pytest` to test our code. You can run the tests by running the following command:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
make test
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Make sure that all tests pass before submitting a pull request.
|
|
90
|
+
|
|
91
|
+
## ๐ Release Process
|
|
92
|
+
|
|
93
|
+
At the moment, the release process is manual. We try to make frequent releases. Usually, we release a new version when we have a new feature or bugfix. A developer with admin rights to the repository will create a new release on GitHub, and then publish the new version to PyPI.
|
|
94
|
+
|
|
95
|
+
# Additional Resources
|
|
96
|
+
|
|
97
|
+
* [General GitHub documentation](https://help.github.com/)
|
|
98
|
+
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
|
99
|
+
* [Nike's Code of Conduct](https://github.com/Nike-Inc/nike-inc.github.io/blob/master/CONDUCT.md)
|
|
100
|
+
|
|
101
|
+
[//]: # (* [Nike's Individual Contributor License Agreement](https://www.clahub.com/agreements/Nike-Inc/fastbreak))
|
|
102
|
+
|
|
103
|
+
[//]: # (* [Nike OSS](https://nike-inc.github.io/))
|