diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd90f22a..5efd5770 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ To run the code generation make sure you have pre-requisites installed: Then you should be able to run the code generation by invoking: ``` -python generate_api.py +python utils/generate_api.py ``` diff --git a/Dockerfile b/utils/Dockerfile similarity index 97% rename from Dockerfile rename to utils/Dockerfile index 81e1e31f..6b84ac16 100644 --- a/Dockerfile +++ b/utils/Dockerfile @@ -6,7 +6,7 @@ RUN pip install ipdb python-dateutil GitPython RUN git clone https://github.com/elastic/elasticsearch.git /code/elasticsearch WORKDIR /code/elasticsearch-py -COPY . . +COPY .. . RUN pip install .[develop] RUN python setup.py develop CMD ["/code/wait-for-elasticsearch.sh", "http://elasticsearch:9200", "--", "python", "setup.py", "test"] diff --git a/docker-compose.yml b/utils/docker-compose.yml similarity index 96% rename from docker-compose.yml rename to utils/docker-compose.yml index 5cd32f1f..33fc4573 100644 --- a/docker-compose.yml +++ b/utils/docker-compose.yml @@ -10,7 +10,7 @@ services: environment: - "TEST_ES_SERVER=http://elasticsearch:9200" volumes: - - .:/code/elasticsearch-py + - ..:/code/elasticsearch-py - esvol:/tmp networks: - esnet diff --git a/generate_api.py b/utils/generate_api.py similarity index 99% rename from generate_api.py rename to utils/generate_api.py index 1c893476..9ff4003d 100644 --- a/generate_api.py +++ b/utils/generate_api.py @@ -17,7 +17,7 @@ SEPARATOR = " # AUTO-GENERATED-API-DEFINITIONS #" # global substitutions for python keywords SUBSTITUTIONS = {"type": "doc_type", "from": "from_"} # api path(s) -CODE_ROOT = Path(__file__).absolute().parent +CODE_ROOT = Path(__file__).absolute().parent.parent BASE_PATH = ( CODE_ROOT.parent / "elasticsearch" diff --git a/wait-for-elasticsearch.sh b/utils/wait-for-elasticsearch.sh similarity index 100% rename from wait-for-elasticsearch.sh rename to utils/wait-for-elasticsearch.sh