File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,18 +10,19 @@ RUN composer install \
1010
1111FROM python:3 AS parser
1212RUN mkdir /app/data -p
13- ADD data-new/ /app/
14- ADD scripts/merge-dimensions.py /app/
13+ ADD data-new/ /app/data-new
14+ ADD scripts/merge-dimensions.py /app/scripts/merge-dimensions.py
1515WORKDIR /app
1616RUN pip install pyyaml
17- RUN python3 ./merge-dimensions.py
17+ RUN python3 ./scripts/ merge-dimensions.py
1818
1919FROM php:7.2-apache
2020RUN apt-get update && apt-get -y install apt-utils libyaml-dev
2121RUN docker-php-ext-install gettext
2222RUN pecl channel-update pecl.php.net && pecl install yaml-2.0.0 && docker-php-ext-enable yaml
2323RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
2424COPY . /var/www/html/
25+ RUN chmod 777 /var/www/html/selectedData.csv
2526COPY --from=vendor /app/vendor/ /var/www/html/vendor/
2627COPY --from=parser /app/data/dimensions.yaml /var/www/html/data/dimensions.yaml
2728
Original file line number Diff line number Diff line change @@ -38,10 +38,11 @@ def dict_merge(*args, add_keys=True):
3838if __name__ == "__main__" :
3939 ret = {}
4040
41- for f in glob ("*/*" ):
42- dimension = f .split ("/" )[0 ]
41+ for f in glob ("data-new/ */*" ):
42+ dimension = f .split ("/" )[1 ]
4343 if dimension not in ret :
4444 ret [dimension ] = {}
45+ print ("Found " + dimension )
4546 ret [dimension ] = dict_merge (ret [dimension ], yaml_load (Path (f ).read_text ()))
4647
4748 Path ("data/dimensions.yaml" ).write_text (yaml_dump (ret ))
You can’t perform that action at this time.
0 commit comments