New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

daq-config-server

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daq-config-server

A service to read files on dls_sw from a blueapi container

pipPyPI
Version
1.3.1
Maintainers
1

Frontend CI Backend CI Coverage PyPI License

DAQ Config Server

A service to read files on Diamond's filesystem from a BlueAPI container. Currently this service is only able to read files on /dls_sw/. Writing to configuration files will come in a future release.

Sourcehttps://github.com/DiamondLightSource/daq-config-server
Dockerdocker run ghcr.io/DiamondLightSource/daq-config-server:latest
Releaseshttps://github.com/DiamondLightSource/daq-config-server/releases
Documentationhttps://DiamondLightSource.github.io/daq-config-server

Here is a minimal example to read a file from the centrally hosted service after installing this package

from daq_config_server import ConfigClient

config_client = ConfigClient("https://daq-config.diamond.ac.uk")

file_contents = config_client.get_file_contents({ABSOLUTE_PATH_TO_CONFIG_FILE}, desired_return_type=str)

The output will come out as a raw string - you should format it as required in your own code. You may also request that the file contents is returned as a dict or in bytes - this will raise an http exception if the file cannot be converted to that type. To be able to read a file, you must first add it to the whitelist.

Testing

To run unit tests, type tox -e unit_tests from within the dev container

There is a convenient script in ./deployment/build_and_push.sh which can be used to easily build and run the container locally for testing, and optionally push the container to ghcr. In general we should rely on the CI to be pushing new containers - it should only be done manually for urgent debugging.

To run local system tests, start a local container by running ./deployment/build_and_push.sh -r -b. Then, in the dev container, forward port 8555. There are instructions on port forwarding within vscode here. Next, in a terminal in the devcontainer, run tox -e system_tests_local from the daq-config-server directory.

To run a test deployment on argus, log in to argus in your namespace and run:

helm install daq-config ./helmchart/ --values dev-values.yaml

followed by:

kubectl port-forward service/daq-config-server-svc 8555

after which you should be able to access the API on http://localhost:8555/docs

See https://DiamondLightSource.github.io/daq-config-server for more detailed documentation.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts