Skip to main content

Test definitions, plotting and documentation for the CMS MTD ETL project

Project description

etlup

This project contains code for plotting for CMS MTD ETL project. To install you can do,

pip install etlup

Or if you are developing locally you can clone the repo and cd into it. Then do,

pip install -U -e ./

Plotting

from etlup.tamalero.Noisewidth import NoisewidthV0
from etlup import now_utc
nw = NoisewidthV0(
    user_created = "hayden",
    location = "CERN",
    measurement_date = now_utc(),
    module = "Module 206",
    pos_0 = [[4, 4, 3, 4, 3, 4, 2, 4, 3, 3, 3, 3, 4, 4, 3, 3,],
            [3, 4, 4, 3, 4, 4, 3, 4, 4, 4, 3, 4, 3, 3, 4, 3,],
            [3, 5, 4, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4,],
            [3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 3, 3, 4, 3, 3, 3,],
            [3, 4, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3,],
            [3, 4, 4, 3, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 4, 4,],
            [3, 4, 4, 4, 3, 3, 4, 4, 4, 5, 4, 4, 4, 4, 4, 3,],
            [3, 3, 3, 3, 2, 4, 3, 3, 4, 4, 3, 3, 4, 3, 3, 4,],
            [3, 4, 4, 4, 4, 3, 3, 4, 5, 3, 4, 3, 3, 4, 3, 3,],
            [4, 3, 3, 3, 3, 4, 4, 3, 3, 4, 4, 3, 3, 3, 4, 4,],
            [4, 4, 4, 4, 3, 4, 3, 4, 4, 4, 3, 3, 4, 3, 3, 4,],
            [3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 4, 4, 3, 3, 3,],
            [4, 3, 4, 3, 4, 3, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3,],
            [3, 4, 5, 4, 3, 4, 3, 3, 4, 4, 3, 4, 3, 4, 3, 4,],
            [3, 3, 4, 4, 3, 4, 3, 4, 4, 3, 4, 3, 4, 3, 4, 3,],
            [4, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 3, 4, 3, 3,]]
    # there are the other three positions you can also give
    # pos_1, pos_2, pos_3
)
fig = nw.plot()
fig.savefig("noisewidth.png")

Uploading to Database

In order for you to upload to the database you will need to create a .env file in the same directory as the script or pass in its path to the Session. Here is an example of a .env file:

API_TOKEN_ENV = "your token goes here"

To upload,

from etlup.tamalero.Noisewidth import NoisewidthV0
from etlup import Session

tests = [
    NoisewidthV0(...),
    ...
]

with Session(prod=True) as sesh:
    sesh.add_all(tests)

    sesh.to_file("baselines.json")
    sesh.upload()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

etlup-4.0.9.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

etlup-4.0.9-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file etlup-4.0.9.tar.gz.

File metadata

  • Download URL: etlup-4.0.9.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for etlup-4.0.9.tar.gz
Algorithm Hash digest
SHA256 92cb72ae216cbb9a447eb254736ba6852db11a2e84c303984d0b078eacba5ab9
MD5 c44f2b7113e904bcd87a67d3269d3218
BLAKE2b-256 19a565a810fabe6b338c906516d1b94dfc4cf07b2bad40ecd01ed01350f40ca7

See more details on using hashes here.

File details

Details for the file etlup-4.0.9-py3-none-any.whl.

File metadata

  • Download URL: etlup-4.0.9-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for etlup-4.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c30f9642d90cd0adc631c88401b04d3e8b4a9b6967cad14c981b016b03cade0c
MD5 a68af2616b421bf12d411419050b867c
BLAKE2b-256 7095fe25dae5cd35961cc7df68ddae7faeee2f34b620c2e953bafa97df200a41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page