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

build(ingest): use gradle in commands + docs #2531

Merged
merged 4 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
21 changes: 8 additions & 13 deletions metadata-ingestion/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,16 @@ The architecture of this metadata ingestion framework is heavily inspired by [Ap
### Requirements

1. Python 3.6+ must be installed in your host environment.
2. You also need to build the `mxe-schemas` module as below.
```
(cd .. && ./gradlew :metadata-events:mxe-schemas:build)
```
This is needed to generate `MetadataChangeEvent.avsc` which is the schema for the `MetadataChangeEvent_v4` Kafka topic.
3. On MacOS: `brew install librdkafka`
4. On Debian/Ubuntu: `sudo apt install librdkafka-dev python3-dev python3-venv`
5. On Fedora (if using LDAP source integration): `sudo yum install openldap-devel`
2. On MacOS: `brew install librdkafka`
3. On Debian/Ubuntu: `sudo apt install librdkafka-dev python3-dev python3-venv`
4. On Fedora (if using LDAP source integration): `sudo yum install openldap-devel`

### Set up your Python environment

```shell
python3 -m venv venv
../gradlew build -x check # setup venv and install
shirshanka marked this conversation as resolved.
Show resolved Hide resolved
source venv/bin/activate
pip install --upgrade pip wheel setuptools
pip uninstall datahub || true ; rm -r src/*.egg-info || true
pip install -e .
(cd .. && ./gradlew :metadata-events:mxe-schemas:build) && ./scripts/codegen.sh
datahub version # check that it works
```

### Common setup issues
Expand Down Expand Up @@ -115,4 +107,7 @@ isort .
flake8 .
mypy .
pytest

# These steps are all included in the gradle build:
../gradlew build
```
2 changes: 1 addition & 1 deletion metadata-ingestion/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euxo pipefail

./gradlew build # also runs tests
../gradlew build # also runs tests

rm -rf build dist || true
python -m build
Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ envlist = py3-airflow{2,1}

[testenv]
setenv =
AIRFLOW_HOME = "/tmp/airflow/thisshouldnotexist-{envname}"
AIRFLOW_HOME = /tmp/airflow/thisshouldnotexist-{envname}
extras = dev
commands =
# TODO: look at https://github.com/pytest-dev/pytest-cov/blob/master/examples/src-layout/tox.ini
Expand Down