Skip to content

Commit

Permalink
Merge pull request #12 from wmo-im/training
Browse files Browse the repository at this point in the history
Metadata default file name change and environment variable fix
  • Loading branch information
david-i-berry committed Mar 16, 2023
2 parents 68c4e64 + 6495415 commit 89ffb42
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ RUN cd /build \

RUN adduser wis2user
USER wis2user
WORKDIR /home/wis2user

#WORKDIR /
WORKDIR /home/wis2user
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To transform SYNOP data file into BUFR:

```console
mkdir output-data
synop2bufr transform --metadata data/metadata.csv --year 2023 --month 03 --output-dir output-data data/A_SMRO01YRBK211200_C_EDZW_20220321120500_12524785.txt
synop2bufr transform --metadata data/station_list.csv --year 2023 --month 03 --output-dir output-data data/A_SMRO01YRBK211200_C_EDZW_20220321120500_12524785.txt
```

## Usage Guide
Expand Down
2 changes: 1 addition & 1 deletion docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Command line interface (CLI)
.. code-block:: shell
synop2bufr transform \
--metadata <station-metadata.csv> \
--metadata <station-list.csv> \
--output-dir <output-directory-path> \
--year <year-of-observation> \
--month <month-of-observation> \
Expand Down
4 changes: 2 additions & 2 deletions synop2bufr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Configure logger
LOGGER = logging.getLogger()
log_level = os.environ.get("LOG_LEVEL")
log_level = os.environ.get("LOG_LEVEL", "ERROR")
logging.basicConfig(
format="%(asctime)s [%(levelname)s] %(message)s",
level=getattr(logging, log_level),
Expand Down Expand Up @@ -80,7 +80,7 @@ def cli():
@ click.pass_context
@ click.argument('synop_file', type=click.File(errors="ignore"))
@ click.option('--metadata', 'metadata', required=False,
default="metadata.csv",
default="station_list.csv",
type=click.File(errors="ignore"),
help="Name/directory of the station metadata")
@ click.option('--output-dir', 'output_dir', required=False,
Expand Down

0 comments on commit 89ffb42

Please sign in to comment.