Skip to content
Snippets Groups Projects
Commit b45d2c88 authored by Hannes Feldt's avatar Hannes Feldt
Browse files

Merge branch 'L2SS-1582-fix_naming' into 'main'

L2SS-1582: Construct HDF5 files after each observation

Closes L2SS-1582

See merge request !3
parents 161a5d8e 48781179
No related branches found
No related tags found
1 merge request!3L2SS-1582: Construct HDF5 files after each observation
Pipeline #69901 passed with warnings
Pipeline: Stingray

#69902

    ......@@ -12,10 +12,8 @@ pip install .
    ## Usage
    ```python
    from lofar_stingray import cool_module
    cool_module.greeter() # prints "Hello World"
    ```bash
    l2ss-stingray-record <source> <target>
    ```
    ## Contributing
    ......@@ -29,7 +27,7 @@ changes is done through `tox`.
    ```pip install tox```
    With tox the same jobs as run on the CI/CD pipeline can be ran. These
    With tox the same jobs as run on the CI/CD pipeline can be run. These
    include unit tests and linting.
    ```tox```
    ......
    ......@@ -12,6 +12,10 @@ job "statistics" {
    group "stingray-[[ $af ]]" {
    count = 1
    network {
    mode = "bridge"
    }
    [[ range $st, $port := $fields ]]
    task "stingray-[[ $af ]]-[[ $st ]]" {
    driver = "docker"
    ......
    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    """ Implements a storage class to write text data to a S3 backend in blocks """
    ......@@ -80,11 +80,11 @@ class Storage:
    async def _complete_current_block(self, block):
    logger.info("Write block %s", block.start)
    block.seek(io.SEEK_SET, 0)
    start = block.start
    timestamp = datetime.now(timezone.utc)
    self._minio_client.put_object(
    self.bucket,
    f"{self.prefix}/{start.year}/{start.month}/{start.day}/"
    f"{start.isoformat()}.json",
    f"{self.prefix}/{timestamp.year}/{timestamp.month:02d}/{timestamp.day:02d}/"
    f"{timestamp.isoformat()}.json",
    block,
    len(block.getvalue()),
    content_type="application/json",
    ......
    # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
    # Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
    # SPDX-License-Identifier: Apache-2.0
    """Testing of the writer module"""
    ......@@ -67,7 +67,7 @@ class TestStorage(TestCase):
    storage.write_line("test2")
    self.mock_minio.put_object.assert_called_with(
    "bucket",
    "prefix/2023/11/24/2023-11-24T12:12:12+00:00.json",
    "prefix/2023/11/25/2023-11-25T12:12:12+00:00.json",
    ANY,
    len(b"test\n"),
    content_type="application/json",
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment