From 98ced3bb80ae21a716281e2768670a3676c8bc7b Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Tue, 3 Oct 2023 15:07:58 +0100 Subject: [PATCH 01/10] initial support attempt for 384 well plates --- .pre-commit-config.yaml | 2 +- src/qslib/data.py | 4 +-- src/qslib/plate_setup.py | 73 ++++++++++++++++++++++++++++++++-------- 3 files changed, 62 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f1f5370..1546855 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: rev: 23.1.0 hooks: - id: black - language_version: python3.11 + language_version: python3.12 args: ["--target-version", "py311"] - repo: https://github.com/pycqa/isort rev: 5.12.0 diff --git a/src/qslib/data.py b/src/qslib/data.py index 8f96a77..ff518f1 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -136,8 +136,8 @@ def __init__( assert self.plate_cols % len(self.temperatures) == 0 # todo: handle other cases - assert self.plate_rows * self.plate_cols == 96 - assert len(self.temperatures) == 6 + assert self.plate_rows * self.plate_cols in (96, 384) + assert len(self.temperatures) in (1, 3, 6) wfs = cast(ET.Element, pde.find("WellData")).text if wfs is None: diff --git a/src/qslib/plate_setup.py b/src/qslib/plate_setup.py index 4e041c0..fd0c319 100644 --- a/src/qslib/plate_setup.py +++ b/src/qslib/plate_setup.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans # # SPDX-License-Identifier: AGPL-3.0-only @@ -14,6 +14,7 @@ Iterable, Iterator, List, + Literal, Mapping, Optional, Sequence, @@ -29,11 +30,17 @@ from .qsconnection_async import QSConnectionAsync -_WELLNAMES = [x + str(y) for x in "ABCDEFGH" for y in range(1, 13)] +_ROWALPHAS = "ABCDEFGHIJKLMNOP" +_ROWALPHAS_96 = "ABCDEFGH" -_WELLNAMESET = set(_WELLNAMES) +_WELLNAMES_96 = [x + str(y) for x in _ROWALPHAS_96 for y in range(1, 13)] +_WELLNAMES_384 = [x + str(y) for x in _ROWALPHAS for y in range(1, 25)] -_WELLALPHREF = [(x, f"{y}") for x in "ABCDEFGH" for y in range(1, 13)] +_WELLNAMESET_96 = set(_WELLNAMES_96) +_WELLNAMESET_384 = set(_WELLNAMES_384) + +_WELLALPHREF_96 = [(x, f"{y}") for x in _ROWALPHAS_96 for y in range(1, 13)] +_WELLALPHREF_384 = [(x, f"{y}") for x in _ROWALPHAS for y in range(1, 25)] def _process_color_from_str_int(x: str) -> Tuple[int, int, int, int]: @@ -155,6 +162,7 @@ def __iter__(self) -> Iterator[str]: @dataclass class PlateSetup: samples_by_name: Dict[str, Sample] + plate_type: Literal[96, 384] = 96 @property def sample_wells(self): @@ -162,7 +170,13 @@ def sample_wells(self): @classmethod def from_platesetup_xml(cls, platexml: ET.Element) -> PlateSetup: # type: ignore - # assert platexml.find("PlateKind/Type").text == "TYPE_8X12" + qs_platetype = platexml.find("PlateKind/Type").text + if qs_platetype == "TYPE_8X12": + plate_type = 96 + elif qs_platetype == "TYPE_16X24": + plate_type = 384 + else: + raise ValueError sample_fvs = platexml.findall( "FeatureMap/Feature/Id[.='sample']/../../FeatureValue" @@ -173,6 +187,8 @@ def from_platesetup_xml(cls, platexml: ET.Element) -> PlateSetup: # type: ignor sample_wells: Dict[str, list[str]] = dict() + wn = _WELLNAMES_96 if plate_type == 96 else _WELLNAMES_384 + for fv in sample_fvs: if x := fv.findtext("Index"): idx = int(x) @@ -183,20 +199,24 @@ def from_platesetup_xml(cls, platexml: ET.Element) -> PlateSetup: # type: ignor if sample.name in samples_by_name.keys(): assert sample == samples_by_name[sample.name] assert sample == samples_by_uuid[sample.uuid] - sample_wells[sample.name].append(_WELLNAMES[idx]) + sample_wells[sample.name].append(wn[idx]) else: assert sample.uuid not in samples_by_uuid.keys() samples_by_name[sample.name] = sample samples_by_uuid[sample.uuid] = sample - sample_wells[sample.name] = [_WELLNAMES[idx]] + sample_wells[sample.name] = [wn[idx]] - return cls(sample_wells, samples_by_name) + return cls(sample_wells, samples_by_name, plate_type=plate_type) def __init__( self, sample_wells: Mapping[str, str | List[str]] | None = None, samples: Iterable[Sample] | Mapping[str, Sample] = tuple(), + plate_type: Literal[96, 384] = 96, ) -> None: + assert plate_type in (96, 384) + self.plate_Type = plate_type + if isinstance(samples, Mapping): self.samples_by_name = dict(samples) else: @@ -213,7 +233,10 @@ def __init__( @property def well_sample(self): - well_sample_name = pd.Series(np.full(8 * 12, None, object), index=_WELLNAMES) + well_sample_name = pd.Series( + np.full(8 * 12, None, object), + index=_WELLNAMES_96 if self.plate_Type == 96 else _WELLNAMES_384, + ) for s, ws in self.sample_wells.items(): for w in ws: well_sample_name.loc[w] = s @@ -230,7 +253,9 @@ def get_wells(self, samples_or_wells: str | Sequence[str]) -> list[str]: samples_or_wells = [samples_or_wells] for sw in samples_or_wells: - if sw.upper() in _WELLNAMESET: + if sw.upper() in ( + _WELLNAMESET_96 if self.plate_Type == 96 else _WELLNAMESET_384 + ): wells.append(sw.upper()) else: wells += self.sample_wells[sw] @@ -238,7 +263,9 @@ def get_wells(self, samples_or_wells: str | Sequence[str]) -> list[str]: return wells def get_descriptive_string(self, name: str) -> str: - if (w := name.upper()) in _WELLNAMESET: + if (w := name.upper()) in ( + _WELLNAMESET_96 if self.plate_Type == 96 else _WELLNAMESET_384 + ): return w sample = self.samples_by_name[name] return sample.description or sample.name @@ -253,7 +280,10 @@ def to_lineprotocol(self, timestamp: int, run_name: str | None = None) -> list[s rts = "" return [ f'platesetup,row={r},col={c} sample="{s}"{rts} {timestamp}' - for ((r, c), s) in zip(_WELLALPHREF, self.well_sample) + for ((r, c), s) in zip( + _WELLALPHREF_96 if self.plate_type == 96 else _WELLALPHREF_384, + self.well_sample, + ) ] @classmethod @@ -270,9 +300,11 @@ def to_table( self, headers: Sequence[Union[str, int]] = list(range(1, 13)), tablefmt: str = "orgtbl", - showindex: Sequence[str] = tuple("ABCDEFGH"), + showindex: Sequence[str] | None = None, **kwargs: Any, ) -> str: + if showindex is None: + showindex = _ROWALPHAS_96 if self.plate_Type == 96 else _ROWALPHAS return tabulate.tabulate( self.well_samples_as_array(), tablefmt=tablefmt, @@ -284,6 +316,19 @@ def to_table( def update_xml(self, root: ET.Element) -> None: samplemap = root.find("FeatureMap/Feature/Id[.='sample']/../..") e: Optional[ET.Element] + + e = ET.SubElement(root, "PlateKind") + ET.SubElement(e, "Type").text = ( + "TYPE_8X12" if self.plate_Type == 96 else "TYPE_16X24" + ) + ET.SubElement(e, "Name").text = ( + "96-Well Plate (8x12)" + if self.plate_Type == 96 + else "384-Well Plate (16x24)" + ) + ET.SubElement(e, "RowCount").text = "8" if self.plate_Type == 96 else "16" + ET.SubElement(e, "ColumnCount").text = "12" if self.plate_Type == 96 else "24" + if not samplemap: e = ET.SubElement(root, "FeatureMap") v = ET.SubElement(e, "Feature") @@ -291,7 +336,7 @@ def update_xml(self, root: ET.Element) -> None: ET.SubElement(v, "Name").text = "sample" samplemap = e ws = np.array(self.well_sample) - for welli in range(0, 96): + for welli in range(0, self.plate_Type): if ws[welli]: e = samplemap.find(f"FeatureValue/Index[.='{welli}']/../FeatureItem") if not e: From 5198f7fdfec58409272aeb2a1624f90ff7e1482f Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sat, 7 Oct 2023 02:13:18 +0100 Subject: [PATCH 02/10] 384 well fixes for data loading --- src/qslib/data.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qslib/data.py b/src/qslib/data.py index ff518f1..e0db747 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -77,6 +77,8 @@ class FilterDataReading: well_fluorescence: npt.NDArray[np.float64] temperatures: npt.NDArray[np.float64] set_temperatures: npt.NDArray[np.float64] | None + plate_rows: int = 8 + plate_cols: int = 12 def __repr__(self): return ( @@ -137,7 +139,7 @@ def __init__( # todo: handle other cases assert self.plate_rows * self.plate_cols in (96, 384) - assert len(self.temperatures) in (1, 3, 6) + assert len(self.temperatures) in (1, 2, 3, 6) wfs = cast(ET.Element, pde.find("WellData")).text if wfs is None: @@ -293,8 +295,8 @@ def df_from_readings( + [ (f"{r}{c}", v) for v in ["fl", "rt", "st"] - for r in "ABCDEFGH" - for c in range(1, 13) + for r in _UPPERS[0 : readings[0].plate_rows] + for c in range(1, readings[0].plate_cols + 1) ] + [("exposure", "exposure")] ), @@ -311,8 +313,8 @@ def df_from_readings( [(cast(str, "time"), v) for v in ["seconds", "hours", "timestamp"]] + [ (f"{r}{c}", v) - for r in "ABCDEFGH" - for c in range(1, 13) + for r in _UPPERS[0 : readings[0].plate_rows] + for c in range(1, readings[0].plate_cols + 1) for v in ["fl", "rt", "st"] ] + [("exposure", "exposure")] From 583582318bbb3114919cd798533116724f9d4142 Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Mon, 9 Oct 2023 18:13:24 +0100 Subject: [PATCH 03/10] Rough v1 multicomp, analysis support, v2 filter --- src/qslib/data.py | 146 ++++++++++++++++++++++++++++++++++++++++ src/qslib/experiment.py | 138 +++++++++++++++++++++++++++++-------- 2 files changed, 257 insertions(+), 27 deletions(-) diff --git a/src/qslib/data.py b/src/qslib/data.py index e0db747..8f5f06c 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -5,6 +5,7 @@ from __future__ import annotations import os +import re import xml.etree.ElementTree as ET from dataclasses import dataclass from glob import glob @@ -15,6 +16,8 @@ import numpy.typing as npt import pandas as pd +from .plate_setup import _WELLNAMES_96, _WELLNAMES_384 + _UPPERS = "ABCDEFGHIJKLMNOP" @@ -321,3 +324,146 @@ def df_from_readings( ), axis="columns", # type: ignore ) + + +def _filterdata_df_v2(jsdata: dict): + dfd = { + "filter_set": [], + "stage": [], + "cycle": [], + "step": [], + "point": [], + "exposure": [], + } + dft = [] + for w in _WELLNAMES_384: + dfd[w] = [] + + for x in jsdata: + cp = x["collectionPoint"] + for y in x["filterData"]: + dfd["filter_set"].append(y["filterSet"].lower().replace("_", "-")) + dfd["stage"].append(cp["stage"]) + dfd["cycle"].append(cp["cycle"]) + dfd["step"].append(cp["step"]) + dfd["point"].append(cp["point"]) + dfd["exposure"].append(y["exposure"]) + for i, w in enumerate(_WELLNAMES_384): + dfd[w].append(y["wellFluorescences"][i]) + dft.append(x["zoneTemperatures"]) + + fdd = pd.DataFrame(dfd) + fdd.set_index(["filter_set", "stage", "cycle", "step", "point"], inplace=True) + fdd.columns = pd.MultiIndex.from_tuples( + [("exposure", "exposure")] + [(x, "fl") for x in _WELLNAMES_384] + ) + + wrt = pd.DataFrame( + np.array(dft).repeat(384 / 6, axis=1), + columns=pd.MultiIndex.from_tuples([(x, "rt") for x in _WELLNAMES_384]), + index=fdd.index, + ) + + return fdd.join(wrt).sort_index(axis=1) + + +def _parse_strlist(s): + if s == "[]": + return [] + return [d for d in s[1:-1].split(", ")] + + +def _parse_multicomponent_data(root: ET.Element): + n_wells = int(root.find("WellCount").text) + if n_wells == 96: + wellnames = _WELLNAMES_96 + elif n_wells == 384: + wellnames = _WELLNAMES_384 + else: + raise ValueError( + f"Unsupported number of wells in multicomponent data: {n_wells}" + ) + + cycle_count = int(root.find("CycleCount").text) + + welldyes = { + int(dd.attrib["WellIndex"]): _parse_strlist(dd.find("DyeList").text) + for dd in root.findall("DyeData") + } + + wellcycdata = { + int(d.attrib["WellIndex"]): { + dye: np.fromstring(sd.text[1:-1], sep=",") + for dye, sd in zip( + welldyes[int(d.attrib["WellIndex"])], + d.findall("CycleData"), + ) + } + for d in root.findall("SignalData") + } + + cycdataframes = [] + for k, v in wellcycdata.items(): + df = pd.DataFrame(v) + df["cycle"] = df.index + 1 + df["well"] = wellnames[k] + cycdataframes.append(df) + mcd = pd.concat(cycdataframes).set_index(["well", "cycle"]) + + temperatures = pd.Series( + np.fromstring(root.find("SampleTemperatures").text, sep="\t"), + index=pd.MultiIndex.from_product( + [wellnames, range(1, cycle_count + 1)], names=["well", "cycle"] + ), + name="temperature", + ) + + cps = pd.DataFrame.from_records( + [ + [ + int(y) + for y in re.match( + r"\[Stg:(\d+) Cyc:(\d+) Stp:(\d+) Pt:(\d+)\]", x + ).groups() + ] + for x in _parse_strlist(root.find("CollectionPoints").text) + ], + columns=[ + "collected_stage", + "collected_cycle", + "collected_step", + "collected_point", + ], + index=pd.Index(range(1, cycle_count + 1), name="cycle"), + ) + + return mcd.join(temperatures).join(cps) + + +def _parse_analysis(contents: str): + a = [x.splitlines() for x in re.split(r"\n(?=\d)", contents)] + d = ( + pd.DataFrame.from_records( + [x[0].split("\t") for x in a[1:]], columns=a[0][1].split("\t") + ) + .replace("", np.nan) + .astype( + { + "Well": int, + "Sample Name": "string", + "Detector": "string", + "Task": "string", + "Ct": float, + "Avg Ct": float, + "Ct SD": float, + "Delta Ct": float, + "Qty": float, + "Avg Qty": float, + "Qty SD": float, + } + ) + .rename(columns={"Well": "WellIndex"}) + ) + d["Well"] = np.array(_WELLNAMES_384)[d["WellIndex"]] # fixme + d = d.astype({"Well": "string"}).set_index(["Well"]) + return d diff --git a/src/qslib/experiment.py b/src/qslib/experiment.py index cc6e8d3..7268773 100644 --- a/src/qslib/experiment.py +++ b/src/qslib/experiment.py @@ -8,6 +8,7 @@ import base64 import io +import json import logging import os import re @@ -46,7 +47,13 @@ from ._analysis_protocol_text import _ANALYSIS_PROTOCOL_TEXT from ._util import _nowuuid, _pp_seqsliceint, _set_or_create from .base import RunStatus -from .data import FilterDataReading, FilterSet, df_from_readings +from .data import ( + FilterDataReading, + FilterSet, + _filterdata_df_v2, + _parse_multicomponent_data, + df_from_readings, +) from .machine import Machine from .processors import NormRaw, Processor from .protocol import Protocol, Stage, Step @@ -339,6 +346,7 @@ class Experiment: num_zones: int """The number of temperature zones (excluding cover), or -1 if not known.""" + spec_major_version: int = 1 @property def all_filters(self) -> Collection[FilterSet]: @@ -389,6 +397,15 @@ def welldata(self) -> pd.DataFrame: else: raise ValueError("Experiment data is not available") + @property + def multicomponentdata(self) -> pd.DataFrame: + if self._multicomponentdata is not None: + return self._multicomponentdata + elif self.runstate == "INIT": + raise ValueError("Run hasn't started yet: no data available.") + else: + raise ValueError("Multicomponent data is not available") + def summary(self, format: str = "markdown", plate: str = "list") -> str: return self.info(format, plate) @@ -1196,14 +1213,13 @@ def from_file(cls, file: str | os.PathLike[str] | IO[bytes]) -> Experiment: """ exp = cls(_create_xml=False) - with zipfile.ZipFile(file) as z: - # Ensure that this actually looks like an EDS file: - try: - z.getinfo("apldbio/sds/experiment.xml") - except KeyError: - raise ValueError(f"{file} does not appear to be an EDS file.") from None + z = zipfile.ZipFile(file) - z.extractall(exp._dir_base) + manifest_info = _get_eds_info(z, checkinfo=True) + + z.extractall(exp._dir_base) + + exp.spec_major_version = int(manifest_info["Specification-Version"][0]) exp._update_from_files() @@ -1488,25 +1504,43 @@ def _update_from_platesetup_xml(self) -> None: self.plate_setup = PlateSetup.from_platesetup_xml(x) def _update_from_data(self) -> None: - fdp = os.path.join(self._dir_eds, "filterdata.xml") - if os.path.isfile(fdp): - fdx = ET.parse(fdp) - fdrs = [ - FilterDataReading(x, sds_dir=self._dir_eds) - for x in fdx.findall(".//PlateData") - ] - self._welldata = df_from_readings( - fdrs, self.activestarttime.timestamp() if self.activestarttime else None - ) - elif fdfs := glob(os.path.join(self._dir_eds, "filter", "*_filterdata.xml")): - fdrs = [ - FilterDataReading.from_file(fdf, sds_dir=self._dir_eds) for fdf in fdfs - ] - self._welldata = df_from_readings( - fdrs, self.activestarttime.timestamp() if self.activestarttime else None - ) - else: - self._welldata = None + if self.spec_major_version == 1: + fdp = os.path.join(self._dir_eds, "filterdata.xml") + if os.path.isfile(fdp): + fdx = ET.parse(fdp) + fdrs = [ + FilterDataReading(x, sds_dir=self._dir_eds) + for x in fdx.findall(".//PlateData") + ] + self._welldata = df_from_readings( + fdrs, + self.activestarttime.timestamp() if self.activestarttime else None, + ) + elif fdfs := glob( + os.path.join(self._dir_eds, "filter", "*_filterdata.xml") + ): + fdrs = [ + FilterDataReading.from_file(fdf, sds_dir=self._dir_eds) + for fdf in fdfs + ] + self._welldata = df_from_readings( + fdrs, + self.activestarttime.timestamp() if self.activestarttime else None, + ) + else: + self._welldata = None + + fdp = os.path.join(self._dir_eds, "multicomponentdata.xml") + if os.path.isfile(fdp): + fdx = ET.parse(fdp) + self._multicomponentdata = _parse_multicomponent_data(fdx) + else: + self._multicomponentdata = None + else: # spec version 2 + fdp = os.path.join(self._dir_base, "run/filter_data.json") + if os.path.isfile(fdp): + with open(fdp, "r") as f: + self._welldata = _filterdata_df_v2(json.load(f)) def data_for_sample(self, sample: str) -> pd.DataFrame: """Convenience function to return data for a specific sample. @@ -2508,3 +2542,53 @@ def _gen_axtitle( val += ": " + ", ".join(elems) return val + + +def _get_eds_info(f: zipfile.ZipFile | os.PathLike[str], checkinfo=True): + try: + if isinstance(f, zipfile.ZipFile): + m = f.open("apldbio/sds/Manifest.mf") + else: + m = (Path(f) / "apldbio/sds/Manifest.mf").open("rb") + except KeyError: + try: + if isinstance(f, zipfile.ZipFile): + m = f.open("Manifest.mf") + else: + m = (Path(f) / "Manifest.mf").open("rb") + except KeyError: + raise ValueError("No EDS manifest file found. Is this a valid EDS?") + + # Manifest files for EDS archives should just be splittable by : into key/value pairs + manifest_properties = dict( + line.decode("utf-8").rstrip().split(": ", 1) + for line in m.readlines() + if len(line) > 2 + ) + m.close() + + if not checkinfo: + return manifest_properties + + if ( + v := manifest_properties.get("Specification-Title") + ) != "Experiment Document Specification": + raise ValueError( + f"Manifest file does not appear to be for an EDS (Specification-Title is {v})" + ) + + sv = manifest_properties["Specification-Version"] + if sv[0] not in ("1", "2"): + raise ValueError( + f"QSLib does not support EDS files of specification version {sv}" + ) + elif sv[0] == "2": + warn( + f"QSLib support for EDS specification version 2 is preliminary. This file is version {sv}" + ) + elif sv not in ("1.3.0", "1.3.1"): + warn( + f"{sv} is an EDS specification version QSLib hasn't been specifically tested with." + ) + + return manifest_properties From 3ad164d101a63b8585f0b6e1791d0d31246d5656 Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Mon, 9 Oct 2023 21:19:27 +0100 Subject: [PATCH 04/10] v2 data improvements, data naming --- CHANGELOG.md | 7 ++ README.md | 14 ++- src/qslib/data.py | 169 +++++++++++++++++++++++++-------- src/qslib/experiment.py | 200 +++++++++++++++++++++++++++++++--------- 4 files changed, 300 insertions(+), 90 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1fb345..0253da7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ SPDX-License-Identifier: AGPL-3.0-only # Changelog +# Version 0.11.0 + +- Initial support for 384-well blocks, at least in data/file reading. +- Initial support for v2.0 EDS specification machines (eg, QS6Pro), at least in data/file reading. +- Parsing of multicomponent data for v1 and v2 machines, and partial analysis data for v1 machines. +- Available data is shown in experiment information. + # Version 0.10.1 - SSL/non-SSL autoconnection speed improvements diff --git a/README.md b/README.md index 441f55f..e6d49d1 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,18 @@ Documentation: [Stable](https://qslib.readthedocs.io/en/stable/), [Latest](https # qslib QSLib is a package for interacting with Applied Biosystems' QuantStudio -qPCR machines, intended for non-qPCR uses, such as DNA computing and +qPCR machines, primarily intended for non-qPCR uses, such as DNA computing and molecular programming systems. It allows the creation, processing, and handling of experiments and experiment data, and interaction with -machines through their network connection and SCPI interface. It currently -functions only with QuantStudio 5 machines using a 96-well block, but -could be made to support others as well. +machines through their network connection and SCPI interface. + +The package was originally written for 96-well-block QuantStudio 5 machines. +However, it has some support for other machines, particularly for reading +EDS files: it supports v1.3 and (partially) v2.0 specification EDS files, +and should be able to read at least some data from files generated by +Viia7, QuantStudio 3, QuantStudio 5, QuantStudio 6 Flex, and QuantStudio 6 Pro +machines, with 96-well and 384-well blocks. If you have problems reading EDS files, +or have found that it works with other machines, please let me know. Amongst other features that it has: diff --git a/src/qslib/data.py b/src/qslib/data.py index 8f5f06c..430b8cf 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -10,6 +10,7 @@ from dataclasses import dataclass from glob import glob from os import PathLike +from pathlib import Path from typing import List, Literal, Optional, Sequence, Union, cast import numpy as np @@ -326,7 +327,12 @@ def df_from_readings( ) -def _filterdata_df_v2(jsdata: dict): +def _filterdata_df_v2( + jsdata: dict, + plate_type: int, + quant_files_path: Path | None = None, + start_time: float | None = None, +): dfd = { "filter_set": [], "stage": [], @@ -336,7 +342,10 @@ def _filterdata_df_v2(jsdata: dict): "exposure": [], } dft = [] - for w in _WELLNAMES_384: + + wellnames = _WELLNAMES_96 if plate_type == 96 else _WELLNAMES_384 + + for w in wellnames: dfd[w] = [] for x in jsdata: @@ -348,24 +357,48 @@ def _filterdata_df_v2(jsdata: dict): dfd["step"].append(cp["step"]) dfd["point"].append(cp["point"]) dfd["exposure"].append(y["exposure"]) - for i, w in enumerate(_WELLNAMES_384): - dfd[w].append(y["wellFluorescences"][i]) + for w, v in zip(wellnames, y["wellFluorescences"], strict=True): + dfd[w].append(v) dft.append(x["zoneTemperatures"]) fdd = pd.DataFrame(dfd) fdd.set_index(["filter_set", "stage", "cycle", "step", "point"], inplace=True) fdd.columns = pd.MultiIndex.from_tuples( - [("exposure", "exposure")] + [(x, "fl") for x in _WELLNAMES_384] + [("exposure", "exposure")] + [(x, "fl") for x in wellnames] ) wrt = pd.DataFrame( - np.array(dft).repeat(384 / 6, axis=1), - columns=pd.MultiIndex.from_tuples([(x, "rt") for x in _WELLNAMES_384]), + np.array(dft).repeat(int(plate_type / len(dft[0])), axis=1), + columns=pd.MultiIndex.from_tuples([(x, "rt") for x in wellnames]), index=fdd.index, ) + if quant_files_path is not None: + timestamps = [] + for filter_set, stage, cycle, step, point in fdd.index: + filename = ( + f"S{stage:02}_C{cycle:03}_T{step:02}_" + f"P{point:04}_{FilterSet.fromstring(filter_set).upperform}" + "_E1.quant" # fixme: make consistent + ) + qstring = (quant_files_path / filename).open().read() + qss = qstring.split("\n\n")[3].split("\n") + assert len(qss) == 3 + assert qss[0] == "[conditions]" + qd = {k: v for k, v in zip(qss[1].split("\t"), qss[2].split("\t"))} + timestamp = float(qd["Time"]) + timestamps.append(timestamp) + fdd["time", "timestamp"] = timestamps + if start_time is not None: + fdd[("time", "seconds")] = fdd[("time", "timestamp")] - start_time + fdd[("time", "hours")] = fdd[("time", "seconds")] / 3600.0 + return fdd.join(wrt).sort_index(axis=1) + @property + def filename_reading_string(self) -> str: + return () + def _parse_strlist(s): if s == "[]": @@ -373,7 +406,7 @@ def _parse_strlist(s): return [d for d in s[1:-1].split(", ")] -def _parse_multicomponent_data(root: ET.Element): +def _parse_multicomponent_data_v1(root: ET.Element): n_wells = int(root.find("WellCount").text) if n_wells == 96: wellnames = _WELLNAMES_96 @@ -405,15 +438,15 @@ def _parse_multicomponent_data(root: ET.Element): cycdataframes = [] for k, v in wellcycdata.items(): df = pd.DataFrame(v) - df["cycle"] = df.index + 1 + df["collection_cycle"] = df.index + 1 df["well"] = wellnames[k] cycdataframes.append(df) - mcd = pd.concat(cycdataframes).set_index(["well", "cycle"]) + mcd = pd.concat(cycdataframes).set_index(["well", "collection_cycle"]) temperatures = pd.Series( np.fromstring(root.find("SampleTemperatures").text, sep="\t"), index=pd.MultiIndex.from_product( - [wellnames, range(1, cycle_count + 1)], names=["well", "cycle"] + [wellnames, range(1, cycle_count + 1)], names=["well", "collection_cycle"] ), name="temperature", ) @@ -429,41 +462,95 @@ def _parse_multicomponent_data(root: ET.Element): for x in _parse_strlist(root.find("CollectionPoints").text) ], columns=[ - "collected_stage", - "collected_cycle", - "collected_step", - "collected_point", + "stage", + "cycle", + "step", + "point", ], - index=pd.Index(range(1, cycle_count + 1), name="cycle"), + index=pd.Index(range(1, cycle_count + 1), name="collection_cycle"), ) return mcd.join(temperatures).join(cps) -def _parse_analysis(contents: str): - a = [x.splitlines() for x in re.split(r"\n(?=\d)", contents)] - d = ( - pd.DataFrame.from_records( - [x[0].split("\t") for x in a[1:]], columns=a[0][1].split("\t") - ) - .replace("", np.nan) - .astype( - { - "Well": int, - "Sample Name": "string", - "Detector": "string", - "Task": "string", - "Ct": float, - "Avg Ct": float, - "Ct SD": float, - "Delta Ct": float, - "Qty": float, - "Avg Qty": float, - "Qty SD": float, - } +def _parse_multicomponent_data_v2(jd: dict, plate_type: int): + if plate_type == 96: + wellnames = _WELLNAMES_96 + elif plate_type == 384: + wellnames = _WELLNAMES_384 + else: + raise ValueError( + f"Unsupported number of wells in multicomponent data: {plate_type}" ) - .rename(columns={"Well": "WellIndex"}) + + cycle_count = len(jd["collectionPoints"]) + + wellcycdata = { + int(d["wellIndex"]): { + dd["dyeName"]: np.array(dd["fluorescences"]) for dd in d["dyeData"] + } + | {"temperature": d["temperatures"]} + for d in jd["wellData"] + } + + # FIXME: bubble data + + cycdataframes = [] + for k, v in wellcycdata.items(): + df = pd.DataFrame(v) + df["collection_cycle"] = df.index + 1 + df["well"] = wellnames[k] + cycdataframes.append(df) + mcd = pd.concat(cycdataframes).set_index(["well", "collection_cycle"]) + + cps = pd.DataFrame.from_records( + jd["collectionPoints"], + index=pd.Index(range(1, cycle_count + 1), name="collection_cycle"), ) - d["Well"] = np.array(_WELLNAMES_384)[d["WellIndex"]] # fixme - d = d.astype({"Well": "string"}).set_index(["Well"]) - return d + + return mcd.join(cps) + + +def _parse_analysis_result(contents: str, plate_type: int): + wellnames = _WELLNAMES_96 if plate_type == 96 else _WELLNAMES_384 + + a = [x.splitlines() for x in re.split(r"\n(?=\d)", contents)] + + colnames = a[0][1].split("\t") + ard_d = {y: [] for y in colnames} + + ard_d |= { + "Std Curve Results": [], + "Std Curve Results X Values": [], + "Std Curve Results Y Values": [], + "Rn values": [], + "Delta Rn values": [], + } + # FIXME: will fail if there are unexpected columns + + for x in a[1:]: + for k, v in zip(colnames, x[0].split("\t")): + if v == "": + v = np.nan + # FIXME: + else: + try: + v = int(v) + except ValueError: + try: + v = float(v) + except ValueError: + pass + ard_d[k].append(v) + for y in x[1:]: + z = y.split("\t") + k = z[0] + v = z[1:] + ard_d[k].append(v) + + d = pd.DataFrame(ard_d) + d.rename({"Well": "WellIndex"}, axis=1, inplace=True) + d["Well"] = np.array(wellnames)[d["WellIndex"]] + d.set_index(["Well"], inplace=True) + + return (d, None) # fixme: parse ampl data diff --git a/src/qslib/experiment.py b/src/qslib/experiment.py index 7268773..c8a0dc8 100644 --- a/src/qslib/experiment.py +++ b/src/qslib/experiment.py @@ -39,7 +39,6 @@ import numpy as np import pandas as pd import toml as toml -from pandas.errors import DataError from qslib.plate_setup import PlateSetup from qslib.scpi_commands import AccessLevel, SCPICommand @@ -51,14 +50,15 @@ FilterDataReading, FilterSet, _filterdata_df_v2, - _parse_multicomponent_data, + _parse_analysis_result, + _parse_multicomponent_data_v1, + _parse_multicomponent_data_v2, df_from_readings, ) from .machine import Machine from .processors import NormRaw, Processor from .protocol import Protocol, Stage, Step from .qs_is_protocol import QS_IOError -from .rawquant_compat import _fdc_to_rawdata from .version import __version__ if TYPE_CHECKING: # pragma: no cover @@ -317,6 +317,9 @@ class Experiment: A string describing the software and version used to write the file. """ _welldata: pd.DataFrame | None = None + _multicomponent_data: pd.DataFrame | None = None + _analysis_result: pd.DataFrame | None = None + _amplification_data: pd.DataFrame | None = None temperatures: pd.DataFrame | None = None """ @@ -355,7 +358,7 @@ def all_filters(self) -> Collection[FilterSet]: If the experiment has data, this is based on the existing data. Otherwise, it is based on the experiment protocol. """ - if self._welldata is not None: + if self._filter_data is not None: return [ FilterSet.fromstring(f) for f in self.welldata.index.get_level_values(0).unique() @@ -390,22 +393,40 @@ def welldata(self) -> pd.DataFrame: Exposure time from filterdata.xml. Misleading, because it only refers to the longest exposure of multiple exposures. """ - if self._welldata is not None: - return self._welldata + if self._filter_data is not None: + return self._filter_data elif self.runstate == "INIT": raise ValueError("Run hasn't started yet: no data available.") else: raise ValueError("Experiment data is not available") @property - def multicomponentdata(self) -> pd.DataFrame: - if self._multicomponentdata is not None: - return self._multicomponentdata + def multicomponent_data(self) -> pd.DataFrame: + if self._multicomponent_data is not None: + return self._multicomponent_data elif self.runstate == "INIT": raise ValueError("Run hasn't started yet: no data available.") else: raise ValueError("Multicomponent data is not available") + @property + def analysis_result(self) -> pd.DataFrame: + if self._analysis_result is not None: + return self._analysis_result + elif self.runstate == "INIT": + raise ValueError("Run hasn't started yet: no data available.") + else: + raise ValueError("Analysis result is not available") + + @property + def amplification_data(self) -> pd.DataFrame: + if self._amplification_data is not None: + return self._amplification_data + elif self.runstate == "INIT": + raise ValueError("Run hasn't started yet: no data available.") + else: + raise ValueError("Amplification data is not available") + def summary(self, format: str = "markdown", plate: str = "list") -> str: return self.info(format, plate) @@ -439,10 +460,26 @@ def info(self, format: str = "markdown", plate: str = "list") -> str: s += f"- Run Started: {self.runstarttime}\n" if self.runendtime: s += f"- Run Ended: {self.runendtime}\n" + if self.runstate != "INIT": + s += "- Available data types: " + ", ".join(self.available_data()) + "\n" s += f"- Written by: {self.writesoftware}\n" s += f"- Read by: QSLib {__version__}\n" return s + def available_data(self) -> list[str]: + d = [] + if self._filter_data is not None: + d.append("filter_data") + if self._multicomponent_data is not None: + d.append("multicomponent_data") + if self._amplification_data is not None: + d.append("amplification_data") + if self._analysis_result is not None: + d.append("analysis_result") + if self.temperatures is not None: + d.append("temperatures") + return d + def info_html(self) -> str: """Create a self-contained HTML summary (returned as a string, but very large) of the experiment.""" summary = self.info(plate="table") @@ -512,19 +549,12 @@ def runtitle_safe(self) -> str: return _safe_exp_name(self.name) @property - def rawdata(self) -> pd.DataFrame: - warn("rawdata is deprecated; use welldata instead") - if (self.activestarttime is None) or (self.welldata is None): - raise DataError - return _fdc_to_rawdata( - self.welldata, - self.activestarttime.timestamp(), - ) + def raw_data(self) -> pd.DataFrame: + return self.welldata @property - def filterdata(self) -> pd.DataFrame: - warn("filterdata is deprecated; use welldata instead") - return self.rawdata + def filter_data(self) -> pd.DataFrame: + return self.welldata def _ensure_machine( self, @@ -1049,6 +1079,13 @@ def sample_wells(self, new_sample_wells: dict[str, list[str]]) -> None: raise NotImplementedError # self.plate_setup.sample_wells = new_sample_wells + @property + def root_dir(self): + if self.spec_major_version == 1: + return self._dir_eds + else: + return self._dir_base + def __init__( self, name: str | None = None, @@ -1177,15 +1214,29 @@ def _update_files(self) -> None: self._update_platesetup_xml() def _update_from_files(self) -> None: - p = Path(self._dir_eds) - if (p / "experiment.xml").is_file(): - self._update_from_experiment_xml() - if (p / "tcprotocol.xml").is_file(): - self._update_from_tcprotocol_xml() - if (p / "plate_setup.xml").is_file(): - self._update_from_platesetup_xml() - if (p / "messages.log").is_file(): - self._update_from_log() + if self.spec_major_version == 1: + p = Path(self._dir_eds) + if (p / "experiment.xml").is_file(): + self._update_from_experiment_xml() + if (p / "tcprotocol.xml").is_file(): + self._update_from_tcprotocol_xml() + if (p / "plate_setup.xml").is_file(): + self._update_from_platesetup_xml() + if (p / "messages.log").is_file(): + self._update_from_log() + elif self.spec_major_version == 2: + p = Path(self._dir_base) + manifest = _get_manifest_info(self._dir_base, checkinfo=False) + self.spec_version = manifest["Specification-Version"] + self.writesoftware = ( + manifest["Implementation-Title"] + + " " + + manifest["Implementation-Version"] + ) + self._update_from_expdata_v2() + if (p / "run" / "messages.log").is_file(): + self._update_from_log() + self._update_from_data() if self._protocol_from_xml: @@ -1215,7 +1266,7 @@ def from_file(cls, file: str | os.PathLike[str] | IO[bytes]) -> Experiment: z = zipfile.ZipFile(file) - manifest_info = _get_eds_info(z, checkinfo=True) + manifest_info = _get_manifest_info(z, checkinfo=True) z.extractall(exp._dir_base) @@ -1437,6 +1488,15 @@ def _update_from_experiment_xml(self) -> None: float(_find_or_raise(exml, "CreatedTime").text) / 1000.0 # type: ignore ) self.runstate = exml.findtext("RunState") or "UNKNOWN" # type: ignore + + self._plate_type_id = exml.findtext("PlateTypeID") or None + if self._plate_type_id == "TYPE_8X12": + self.plate_type = 96 + elif self._plate_type_id == "TYPE_16X24": + self.plate_type = 384 + else: + self.plate_type = None + self.writesoftware = ( exml.findtext( "ExperimentProperty[@type='RunInfo']/PropertyValue[@key='softwareVersion']/String" @@ -1448,6 +1508,25 @@ def _update_from_experiment_xml(self) -> None: if x := exml.findtext("RunEndTime"): self.runendtime = datetime.fromtimestamp(float(x) / 1000.0) + def _update_from_expdata_v2(self) -> None: + summary = json.load(open(os.path.join(self._dir_base, "summary.json"))) + # fixme: this should go elsewhere, we have it here now because we need it for filterdata + + self.name = summary.get("name", "unknown") + + self.runstate = summary.get("runStatus", "UNKNOWN") + self.createdtime = datetime.fromtimestamp( + summary.get("createdTime", 0) / 1000.0 + ) + + self._plate_type_id = summary["blockType"] + if self._plate_type_id == "BLOCK_384W": + self.plate_type = 384 + elif self._plate_type_id == "BLOCK_96W": + self.plate_type = 96 + else: + raise ValueError(f"Unknown block type {self._plate_type_id}") + def _update_tcprotocol_xml(self) -> None: if self.protocol: # exml = ET.parse(os.path.join(self._dir_eds, "tcprotocol.xml")) @@ -1512,7 +1591,7 @@ def _update_from_data(self) -> None: FilterDataReading(x, sds_dir=self._dir_eds) for x in fdx.findall(".//PlateData") ] - self._welldata = df_from_readings( + self._filter_data = df_from_readings( fdrs, self.activestarttime.timestamp() if self.activestarttime else None, ) @@ -1523,24 +1602,51 @@ def _update_from_data(self) -> None: FilterDataReading.from_file(fdf, sds_dir=self._dir_eds) for fdf in fdfs ] - self._welldata = df_from_readings( + self._filter_data = df_from_readings( fdrs, self.activestarttime.timestamp() if self.activestarttime else None, ) else: - self._welldata = None + self._filter_data = None - fdp = os.path.join(self._dir_eds, "multicomponentdata.xml") - if os.path.isfile(fdp): - fdx = ET.parse(fdp) - self._multicomponentdata = _parse_multicomponent_data(fdx) + mdp = os.path.join(self._dir_eds, "multicomponentdata.xml") + if os.path.isfile(mdp): + fdx = ET.parse(mdp) + self._multicomponent_data = _parse_multicomponent_data_v1(fdx) else: - self._multicomponentdata = None + self._multicomponent_data = None + + adp = os.path.join(self._dir_eds, "analysis_result.txt") + if os.path.isfile(adp): + with open(adp, "r") as f: + ( + self._analysis_result, + self._amplification_data, + ) = _parse_analysis_result( + f.read(), plate_type=self.plate_type + ) # FIXME: plate type + else: # spec version 2 fdp = os.path.join(self._dir_base, "run/filter_data.json") if os.path.isfile(fdp): with open(fdp, "r") as f: - self._welldata = _filterdata_df_v2(json.load(f)) + self._filter_data = _filterdata_df_v2( + json.load(f), + self.plate_type, + quant_files_path=(Path(self.root_dir) / "run/quant"), + start_time=self.activestarttime.timestamp() + if self.activestarttime + else None, + ) + mdp = os.path.join(self._dir_base, "primary/multicomponent_data.json") + if os.path.isfile(mdp): + with open(mdp, "r") as f: + self._multicomponent_data = _parse_multicomponent_data_v2( + json.load(f), self.plate_type + ) + ap = Path(self.root_dir) / "primary" / "analysis_result.json" + if ap.is_file(): + self._analysis_dict = json.load(ap.open()) def data_for_sample(self, sample: str) -> pd.DataFrame: """Convenience function to return data for a specific sample. @@ -1565,10 +1671,14 @@ def data_for_sample(self, sample: str) -> pd.DataFrame: return x def _update_from_log(self) -> None: - if not os.path.isfile(os.path.join(self._dir_eds, "messages.log")): + if self.spec_major_version == 1: + logpath = os.path.join(self._dir_eds, "messages.log") + else: + logpath = os.path.join(self._dir_base, "run/messages.log") + if not os.path.isfile(logpath): return try: - msglog = open(os.path.join(self._dir_eds, "messages.log"), "r").read() + msglog = open(logpath, "r").read() except UnicodeDecodeError as error: log.debug( "Decoding log failed. If is present in log this may be the cause:" @@ -1578,7 +1688,7 @@ def _update_from_log(self) -> None: "{!r}".format(error.object[error.start - 500 : error.end + 500]) ) msglog = open( - os.path.join(self._dir_eds, "messages.log"), + logpath, "r", errors="backslashreplace", ).read() @@ -2544,19 +2654,19 @@ def _gen_axtitle( return val -def _get_eds_info(f: zipfile.ZipFile | os.PathLike[str], checkinfo=True): +def _get_manifest_info(f: zipfile.ZipFile | os.PathLike[str], checkinfo=True): try: if isinstance(f, zipfile.ZipFile): m = f.open("apldbio/sds/Manifest.mf") else: m = (Path(f) / "apldbio/sds/Manifest.mf").open("rb") - except KeyError: + except (KeyError, FileNotFoundError): try: if isinstance(f, zipfile.ZipFile): m = f.open("Manifest.mf") else: m = (Path(f) / "Manifest.mf").open("rb") - except KeyError: + except (KeyError, FileNotFoundError): raise ValueError("No EDS manifest file found. Is this a valid EDS?") # Manifest files for EDS archives should just be splittable by : into key/value pairs From c7e00bbc470527f0568bb5435b19d932651d536d Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sat, 4 Nov 2023 15:18:25 +0000 Subject: [PATCH 05/10] change license to EUPL-1.2 --- .coveragerc | 5 +- .github/workflows/codeql-analysis.yml | 70 ----- .github/workflows/python-publish.yml | 12 +- .github/workflows/python-tests.yml | 7 +- .gitignore | 4 +- .pre-commit-config.yaml | 5 +- .readthedocs.yml | 2 + AUTHORS.md | 4 +- CHANGELOG.md | 5 +- LICENSE.txt | 425 ++++++++++++-------------- LICENSES/AGPL-3.0-only.txt | 235 -------------- LICENSES/EUPL-1.2.txt | 190 ++++++++++++ LICENSES/GPL-3.0-only.txt | 232 -------------- README.md | 4 +- docs/CLA-individual.md | 2 +- docs/Makefile | 5 +- docs/_static/custom.css | 4 +- docs/commandline.rst | 4 +- docs/conf.py | 5 +- docs/experiments.rst | 4 +- docs/index.rst | 4 +- docs/machines.rst | 4 +- docs/monitor.rst | 4 +- docs/requirements.txt | 5 +- docs/setup.rst | 4 +- docs/tutorial.rst | 4 +- examples/qslib-example.ipynb.license | 4 +- pyproject.toml | 8 +- src/qslib/__init__.py | 4 +- src/qslib/_analysis_protocol_text.py | 4 +- src/qslib/_util.py | 4 +- src/qslib/base.py | 4 +- src/qslib/cli.py | 4 +- src/qslib/common.py | 4 +- src/qslib/data.py | 4 +- src/qslib/experiment.py | 4 +- src/qslib/machine.py | 4 +- src/qslib/monitor.py | 4 +- src/qslib/monitor_cli.py | 4 +- src/qslib/plate_setup.py | 5 +- src/qslib/processors.py | 4 +- src/qslib/protocol.py | 4 +- src/qslib/qs_is_protocol.py | 4 +- src/qslib/qsconnection_async.py | 4 +- src/qslib/rawquant_compat.py | 4 +- src/qslib/scpi_commands.py | 4 +- src/qslib/version.py | 4 +- tests/conftest.py | 4 +- tests/test.eds.license | 4 +- tests/test_accesslevel.py | 4 +- tests/test_basic.py | 4 +- tests/test_cli.py | 4 +- tests/test_experiment.py | 4 +- tests/test_experiment_file.py | 4 +- tests/test_experiment_run.py | 4 +- tests/test_fakeserver.py | 4 +- tests/test_is_protocol.py | 3 + tests/test_protocol.py | 4 +- tests/test_real.py | 4 +- tests/test_scpicommand.py | 4 +- tests/test_util_fns.py | 4 +- tox.ini | 7 +- 62 files changed, 496 insertions(+), 904 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 LICENSES/AGPL-3.0-only.txt create mode 100644 LICENSES/EUPL-1.2.txt delete mode 100644 LICENSES/GPL-3.0-only.txt diff --git a/.coveragerc b/.coveragerc index 8e6d078..68f8fdd 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,8 +1,7 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 -# .coveragerc to control coverage.py [run] branch = True source = qslib diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 549a69e..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '15 1 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index d9d4191..f42435d 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,14 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. +# SPDX-License-Identifier: EUPL-1.2 name: Upload Python Package diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 5309d05..34c1662 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -1,9 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions +# SPDX-License-Identifier: EUPL-1.2 name: Python tests diff --git a/.gitignore b/.gitignore index 61fee6f..fb1123d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 src/qslib/_version.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1546855..fb30c67 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - +# SPDX-License-Identifier: EUPL-1.2 # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: diff --git a/.readthedocs.yml b/.readthedocs.yml index 957a758..397c717 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 version: 2 sphinx: configuration: docs/conf.py diff --git a/AUTHORS.md b/AUTHORS.md index be01011..195b654 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,7 +1,7 @@ # Contributors diff --git a/CHANGELOG.md b/CHANGELOG.md index 0253da7..fb5e2e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog @@ -12,6 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only - Initial support for v2.0 EDS specification machines (eg, QS6Pro), at least in data/file reading. - Parsing of multicomponent data for v1 and v2 machines, and partial analysis data for v1 machines. - Available data is shown in experiment information. +- Change license to EUPL-1.2. # Version 0.10.1 diff --git a/LICENSE.txt b/LICENSE.txt index 0c97efd..6d8cea4 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,235 +1,190 @@ -GNU AFFERO GENERAL PUBLIC LICENSE -Version 3, 19 November 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - - Preamble - -The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. - -A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. - -The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. - -An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. - -The precise terms and conditions for copying, distribution and modification follow. - - TERMS AND CONDITIONS - -0. Definitions. - -"This License" refers to version 3 of the GNU Affero General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the Program. - -To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those -subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". - - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. - -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Remote Network Interaction; Use with the GNU General Public License. - -Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. - -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. - -14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - -If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . +EUROPEAN UNION PUBLIC LICENCE v. 1.2 +EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined below) which is provided under the +terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). +The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following +notice immediately following the copyright notice for the Work: + Licensed under the EUPL +or has expressed by any other means his willingness to license under the EUPL. + +1.Definitions +In this Licence, the following terms have the following meaning: +— ‘The Licence’:this Licence. +— ‘The Original Work’:the work or software distributed or communicated by the Licensor under this Licence, available +as Source Code and also as Executable Code as the case may be. +— ‘Derivative Works’:the works or software that could be created by the Licensee, based upon the Original Work or +modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work +required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in +the country mentioned in Article 15. +— ‘The Work’:the Original Work or its Derivative Works. +— ‘The Source Code’:the human-readable form of the Work which is the most convenient for people to study and +modify. +— ‘The Executable Code’:any code which has generally been compiled and which is meant to be interpreted by +a computer as a program. +— ‘The Licensor’:the natural or legal person that distributes or communicates the Work under the Licence. +— ‘Contributor(s)’:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to +the creation of a Derivative Work. +— ‘The Licensee’ or ‘You’:any natural or legal person who makes any usage of the Work under the terms of the +Licence. +— ‘Distribution’ or ‘Communication’:any act of selling, giving, lending, renting, distributing, communicating, +transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential +functionalities at the disposal of any other natural or legal person. + +2.Scope of the rights granted by the Licence +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for +the duration of copyright vested in the Original Work: +— use the Work in any circumstance and for all usage, +— reproduce the Work, +— modify the Work, and make Derivative Works based upon the Work, +— communicate to the public, including the right to make available or display the Work or copies thereof to the public +and perform publicly, as the case may be, the Work, +— distribute the Work or copies thereof, +— lend and rent the Work or copies thereof, +— sublicense rights in the Work or copies thereof. +Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the +applicable law permits so. +In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed +by law in order to make effective the licence of the economic rights here above listed. +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the +extent necessary to make use of the rights granted on the Work under this Licence. + +3.Communication of the Source Code +The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as +Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with +each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to +the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to +distribute or communicate the Work. + +4.Limitations on copyright +Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the +exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5.Obligations of the Licensee +The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those +obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to +the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the +Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work +to carry prominent notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this +Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless +the Original Work is expressly distributed only under this version of the Licence — for example by communicating +‘EUPL v. 1.2 only’. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the +Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both +the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done +under the terms of this Compatible Licence. For the sake of this clause, ‘Compatible Licence’ refers to the licences listed +in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, the Licensee will provide +a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available +for as long as the Licensee continues to distribute or communicate the Work. +Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names +of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6.Chain of Authorship +The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions +to the Work, under the terms of this Licence. + +7.Disclaimer of Warranty +The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work +and may therefore contain defects or ‘bugs’ inherent to this type of development. +For the above reason, the Work is provided under the Licence on an ‘as is’ basis and without warranties of any kind +concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or +errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this +Licence. +This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work. + +8.Disclaimer of Liability +Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be +liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the +Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss +of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However, +the Licensor will be liable under statutory product liability laws as far such laws apply to the Work. + +9.Additional agreements +While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services +consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10.Acceptance of the Licence +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ placed under the bottom of a window +displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms +and conditions. +Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You +by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution +or Communication by You of the Work or copies thereof. + +11.Information to the public +In case of any Distribution or Communication of the Work by means of electronic communication by You (for example, +by offering to download the Work from a remote location) the distribution channel or media (for example, a website) +must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence +and the way it may be accessible, concluded, stored and reproduced by the Licensee. + +12.Termination of the Licence +The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms +of the Licence. +Such a termination will not terminate the licences of any person who has received the Work from the Licensee under +the Licence, provided such persons remain in full compliance with the Licence. + +13.Miscellaneous +Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the +Work. +If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or +enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid +and enforceable. +The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of +the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence. +New versions of the Licence will be published with a unique version number. +All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take +advantage of the linguistic version of their choice. + +14.Jurisdiction +Without prejudice to specific agreement between parties, +— any litigation resulting from the interpretation of this License, arising between the European Union institutions, +bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice +of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union, +— any litigation arising between other parties and resulting from the interpretation of this License, will be subject to +the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business. + +15.Applicable Law +Without prejudice to specific agreement between parties, +— this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat, +resides or has his registered office, +— this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside +a European Union Member State. + + + Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: +— GNU General Public License (GPL) v. 2, v. 3 +— GNU Affero General Public License (AGPL) v. 3 +— Open Software License (OSL) v. 2.1, v. 3.0 +— Eclipse Public License (EPL) v. 1.0 +— CeCILL v. 2.0, v. 2.1 +— Mozilla Public Licence (MPL) v. 2 +— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software +— European Union Public Licence (EUPL) v. 1.1, v. 1.2 +— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above licences without producing +a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the +covered Source Code from exclusive appropriation. +All other changes or additions to this Appendix require the production of a new EUPL version. diff --git a/LICENSES/AGPL-3.0-only.txt b/LICENSES/AGPL-3.0-only.txt deleted file mode 100644 index 0c97efd..0000000 --- a/LICENSES/AGPL-3.0-only.txt +++ /dev/null @@ -1,235 +0,0 @@ -GNU AFFERO GENERAL PUBLIC LICENSE -Version 3, 19 November 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - - Preamble - -The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. - -A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. - -The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. - -An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. - -The precise terms and conditions for copying, distribution and modification follow. - - TERMS AND CONDITIONS - -0. Definitions. - -"This License" refers to version 3 of the GNU Affero General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the Program. - -To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those -subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". - - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. - -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Remote Network Interaction; Use with the GNU General Public License. - -Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. - -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. - -14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - -If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . diff --git a/LICENSES/EUPL-1.2.txt b/LICENSES/EUPL-1.2.txt new file mode 100644 index 0000000..6d8cea4 --- /dev/null +++ b/LICENSES/EUPL-1.2.txt @@ -0,0 +1,190 @@ +EUROPEAN UNION PUBLIC LICENCE v. 1.2 +EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined below) which is provided under the +terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). +The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following +notice immediately following the copyright notice for the Work: + Licensed under the EUPL +or has expressed by any other means his willingness to license under the EUPL. + +1.Definitions +In this Licence, the following terms have the following meaning: +— ‘The Licence’:this Licence. +— ‘The Original Work’:the work or software distributed or communicated by the Licensor under this Licence, available +as Source Code and also as Executable Code as the case may be. +— ‘Derivative Works’:the works or software that could be created by the Licensee, based upon the Original Work or +modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work +required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in +the country mentioned in Article 15. +— ‘The Work’:the Original Work or its Derivative Works. +— ‘The Source Code’:the human-readable form of the Work which is the most convenient for people to study and +modify. +— ‘The Executable Code’:any code which has generally been compiled and which is meant to be interpreted by +a computer as a program. +— ‘The Licensor’:the natural or legal person that distributes or communicates the Work under the Licence. +— ‘Contributor(s)’:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to +the creation of a Derivative Work. +— ‘The Licensee’ or ‘You’:any natural or legal person who makes any usage of the Work under the terms of the +Licence. +— ‘Distribution’ or ‘Communication’:any act of selling, giving, lending, renting, distributing, communicating, +transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential +functionalities at the disposal of any other natural or legal person. + +2.Scope of the rights granted by the Licence +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for +the duration of copyright vested in the Original Work: +— use the Work in any circumstance and for all usage, +— reproduce the Work, +— modify the Work, and make Derivative Works based upon the Work, +— communicate to the public, including the right to make available or display the Work or copies thereof to the public +and perform publicly, as the case may be, the Work, +— distribute the Work or copies thereof, +— lend and rent the Work or copies thereof, +— sublicense rights in the Work or copies thereof. +Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the +applicable law permits so. +In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed +by law in order to make effective the licence of the economic rights here above listed. +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the +extent necessary to make use of the rights granted on the Work under this Licence. + +3.Communication of the Source Code +The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as +Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with +each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to +the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to +distribute or communicate the Work. + +4.Limitations on copyright +Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the +exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5.Obligations of the Licensee +The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those +obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to +the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the +Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work +to carry prominent notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this +Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless +the Original Work is expressly distributed only under this version of the Licence — for example by communicating +‘EUPL v. 1.2 only’. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the +Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both +the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done +under the terms of this Compatible Licence. For the sake of this clause, ‘Compatible Licence’ refers to the licences listed +in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, the Licensee will provide +a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available +for as long as the Licensee continues to distribute or communicate the Work. +Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names +of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6.Chain of Authorship +The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions +to the Work, under the terms of this Licence. + +7.Disclaimer of Warranty +The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work +and may therefore contain defects or ‘bugs’ inherent to this type of development. +For the above reason, the Work is provided under the Licence on an ‘as is’ basis and without warranties of any kind +concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or +errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this +Licence. +This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work. + +8.Disclaimer of Liability +Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be +liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the +Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss +of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However, +the Licensor will be liable under statutory product liability laws as far such laws apply to the Work. + +9.Additional agreements +While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services +consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10.Acceptance of the Licence +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ placed under the bottom of a window +displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms +and conditions. +Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You +by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution +or Communication by You of the Work or copies thereof. + +11.Information to the public +In case of any Distribution or Communication of the Work by means of electronic communication by You (for example, +by offering to download the Work from a remote location) the distribution channel or media (for example, a website) +must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence +and the way it may be accessible, concluded, stored and reproduced by the Licensee. + +12.Termination of the Licence +The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms +of the Licence. +Such a termination will not terminate the licences of any person who has received the Work from the Licensee under +the Licence, provided such persons remain in full compliance with the Licence. + +13.Miscellaneous +Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the +Work. +If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or +enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid +and enforceable. +The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of +the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence. +New versions of the Licence will be published with a unique version number. +All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take +advantage of the linguistic version of their choice. + +14.Jurisdiction +Without prejudice to specific agreement between parties, +— any litigation resulting from the interpretation of this License, arising between the European Union institutions, +bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice +of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union, +— any litigation arising between other parties and resulting from the interpretation of this License, will be subject to +the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business. + +15.Applicable Law +Without prejudice to specific agreement between parties, +— this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat, +resides or has his registered office, +— this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside +a European Union Member State. + + + Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: +— GNU General Public License (GPL) v. 2, v. 3 +— GNU Affero General Public License (AGPL) v. 3 +— Open Software License (OSL) v. 2.1, v. 3.0 +— Eclipse Public License (EPL) v. 1.0 +— CeCILL v. 2.0, v. 2.1 +— Mozilla Public Licence (MPL) v. 2 +— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software +— European Union Public Licence (EUPL) v. 1.1, v. 1.2 +— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above licences without producing +a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the +covered Source Code from exclusive appropriation. +All other changes or additions to this Appendix require the production of a new EUPL version. diff --git a/LICENSES/GPL-3.0-only.txt b/LICENSES/GPL-3.0-only.txt deleted file mode 100644 index d41c0bd..0000000 --- a/LICENSES/GPL-3.0-only.txt +++ /dev/null @@ -1,232 +0,0 @@ -GNU GENERAL PUBLIC LICENSE -Version 3, 29 June 2007 - -Copyright © 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -Preamble - -The GNU General Public License is a free, copyleft license for software and other kinds of works. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. - -The precise terms and conditions for copying, distribution and modification follow. - -TERMS AND CONDITIONS - -0. Definitions. - -“This License” refers to version 3 of the GNU General Public License. - -“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. - -To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. - -A “covered work” means either the unmodified Program or a work based on the Program. - -To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. - -A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. - - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. -A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. - -A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Use with the GNU Affero General Public License. -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. - -14. Revised Versions of this License. -The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - -If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/README.md b/README.md index e6d49d1..754d1e4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Documentation Status](https://readthedocs.org/projects/qslib/badge/?version=latest)](https://qslib.readthedocs.io/en/latest/?badge=latest) diff --git a/docs/CLA-individual.md b/docs/CLA-individual.md index 31fb56c..92f7147 100644 --- a/docs/CLA-individual.md +++ b/docs/CLA-individual.md @@ -16,7 +16,7 @@ The purpose of this contributor agreement ("Agreement") is to clarify and docume ### How to use this Contributor Agreement -If You are an employee and have created the Contribution as part of your employment, You need to have Your employer approve this Agreement or sign the Entity version of this document. If You do not own the Copyright in the entire work of authorship, any other author of the Contribution should also sign this – in any event, please contact Us at cevans@costinet.org +If You are an employee and have created the Contribution as part of your employment, You need to have Your employer approve this Agreement or sign the Entity version of this document. If You do not own the Copyright in the entire work of authorship, any other author of the Contribution should also sign this – in any event, please contact Us at qslib@mb.costi.net. ### 1\. Definitions diff --git a/docs/Makefile b/docs/Makefile index a198f29..eba4144 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,7 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - +# SPDX-License-Identifier: EUPL-1.2 # Makefile for Sphinx documentation # diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 5aea372..518fef0 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,7 +1,7 @@ /* - * SPDX-FileCopyrightText: 2021-2022 Constantine Evans + * SPDX-FileCopyrightText: 2021-2023 Constantine Evans * - * SPDX-License-Identifier: AGPL-3.0-only + * SPDX-License-Identifier: EUPL-1.2 */ div.body { diff --git a/docs/commandline.rst b/docs/commandline.rst index a7bbbb3..d43c186 100644 --- a/docs/commandline.rst +++ b/docs/commandline.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 .. _commandline: diff --git a/docs/conf.py b/docs/conf.py index e797a4d..7c8bd1b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,7 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - +# SPDX-License-Identifier: EUPL-1.2 # This file is execfile()d with the current directory set to its containing dir. # diff --git a/docs/experiments.rst b/docs/experiments.rst index 5c6b270..8ed1c92 100644 --- a/docs/experiments.rst +++ b/docs/experiments.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 .. currentmodule:: qslib diff --git a/docs/index.rst b/docs/index.rst index 3dcb271..58aaee5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 qslib |version| =============== diff --git a/docs/machines.rst b/docs/machines.rst index de382e0..3bd5c4d 100644 --- a/docs/machines.rst +++ b/docs/machines.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 .. _machines: diff --git a/docs/monitor.rst b/docs/monitor.rst index a4d48e9..01b8d75 100644 --- a/docs/monitor.rst +++ b/docs/monitor.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 .. _monitor: diff --git a/docs/requirements.txt b/docs/requirements.txt index 9aed1fc..4703ccb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - +# SPDX-License-Identifier: EUPL-1.2 # Requirements file for ReadTheDocs, check .readthedocs.yml. # To build the module reference correctly, make sure every external package # under `install_requires` in `setup.cfg` is also listed here! diff --git a/docs/setup.rst b/docs/setup.rst index 996dcd6..f96454e 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 Setup ===== diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 9e9ac51..2c73893 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -1,6 +1,6 @@ -.. SPDX-FileCopyrightText: 2021-2022 Constantine Evans +.. SPDX-FileCopyrightText: 2021-2023 Constantine Evans .. -.. SPDX-License-Identifier: AGPL-3.0-only +.. SPDX-License-Identifier: EUPL-1.2 Tutorial ======== diff --git a/examples/qslib-example.ipynb.license b/examples/qslib-example.ipynb.license index c480046..e972db8 100644 --- a/examples/qslib-example.ipynb.license +++ b/examples/qslib-example.ipynb.license @@ -1,3 +1,3 @@ -SPDX-FileCopyrightText: 2021-2022 Constantine Evans +SPDX-FileCopyrightText: 2021-2023 Constantine Evans -SPDX-License-Identifier: AGPL-3.0-only +SPDX-License-Identifier: EUPL-1.2 diff --git a/pyproject.toml b/pyproject.toml index d235830..fe529c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only - -#[build-system] -#requires = ["pdm-pep517"] -#build-backend = "pdm.pep517.api" +# SPDX-License-Identifier: EUPL-1.2 [build-system] requires = ["setuptools>=68", "setuptools_scm[toml]>=5", "wheel"] diff --git a/src/qslib/__init__.py b/src/qslib/__init__.py index 9b4e491..1e241c5 100644 --- a/src/qslib/__init__.py +++ b/src/qslib/__init__.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from . import protocol from .experiment import Experiment diff --git a/src/qslib/_analysis_protocol_text.py b/src/qslib/_analysis_protocol_text.py index e1624b5..cb7a3a8 100644 --- a/src/qslib/_analysis_protocol_text.py +++ b/src/qslib/_analysis_protocol_text.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 _ANALYSIS_PROTOCOL_TEXT = """ unnamed diff --git a/src/qslib/_util.py b/src/qslib/_util.py index c61fd08..b9d9ddc 100644 --- a/src/qslib/_util.py +++ b/src/qslib/_util.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 """(Non-machine/protocol) utility functions for other modules.""" diff --git a/src/qslib/base.py b/src/qslib/base.py index c9e9106..02fe65c 100644 --- a/src/qslib/base.py +++ b/src/qslib/base.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/cli.py b/src/qslib/cli.py index d246a3f..6b1873c 100644 --- a/src/qslib/cli.py +++ b/src/qslib/cli.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/common.py b/src/qslib/common.py index 946c1bd..96cebd3 100644 --- a/src/qslib/common.py +++ b/src/qslib/common.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from . import * # noqa: F401, F403 diff --git a/src/qslib/data.py b/src/qslib/data.py index 430b8cf..42cad91 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/experiment.py b/src/qslib/experiment.py index c8a0dc8..d6a3fa3 100644 --- a/src/qslib/experiment.py +++ b/src/qslib/experiment.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 """Experiment class and related. """ diff --git a/src/qslib/machine.py b/src/qslib/machine.py index 59d63d3..8d1c3b2 100644 --- a/src/qslib/machine.py +++ b/src/qslib/machine.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/monitor.py b/src/qslib/monitor.py index 1111e5c..981413e 100644 --- a/src/qslib/monitor.py +++ b/src/qslib/monitor.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/monitor_cli.py b/src/qslib/monitor_cli.py index 29385fe..6239265 100644 --- a/src/qslib/monitor_cli.py +++ b/src/qslib/monitor_cli.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 import argparse import asyncio diff --git a/src/qslib/plate_setup.py b/src/qslib/plate_setup.py index fd0c319..a4d6b0b 100644 --- a/src/qslib/plate_setup.py +++ b/src/qslib/plate_setup.py @@ -1,6 +1,7 @@ -# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 """Code for handling plate setup.""" from __future__ import annotations diff --git a/src/qslib/processors.py b/src/qslib/processors.py index f06c569..d792ccf 100644 --- a/src/qslib/processors.py +++ b/src/qslib/processors.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/protocol.py b/src/qslib/protocol.py index 60fac2d..a7ed604 100644 --- a/src/qslib/protocol.py +++ b/src/qslib/protocol.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/qs_is_protocol.py b/src/qslib/qs_is_protocol.py index e7539b6..a45799c 100644 --- a/src/qslib/qs_is_protocol.py +++ b/src/qslib/qs_is_protocol.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/qsconnection_async.py b/src/qslib/qsconnection_async.py index 62c6b13..5cbb07f 100644 --- a/src/qslib/qsconnection_async.py +++ b/src/qslib/qsconnection_async.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from __future__ import annotations diff --git a/src/qslib/rawquant_compat.py b/src/qslib/rawquant_compat.py index 4bc413f..5fe1b0f 100644 --- a/src/qslib/rawquant_compat.py +++ b/src/qslib/rawquant_compat.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 import pandas as pd diff --git a/src/qslib/scpi_commands.py b/src/qslib/scpi_commands.py index d338f65..ce146a1 100644 --- a/src/qslib/scpi_commands.py +++ b/src/qslib/scpi_commands.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 """SCPI Command class and parsing""" diff --git a/src/qslib/version.py b/src/qslib/version.py index 190e655..2aaaa89 100644 --- a/src/qslib/version.py +++ b/src/qslib/version.py @@ -1,6 +1,6 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans +# SPDX-FileCopyrightText: 2021 - 2023 Constantine Evans # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: EUPL-1.2 from importlib.metadata import PackageNotFoundError, version diff --git a/tests/conftest.py b/tests/conftest.py index c22625b..fb23a87 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 """ Dummy conftest.py for qslib. diff --git a/tests/test.eds.license b/tests/test.eds.license index c480046..51c204f 100644 --- a/tests/test.eds.license +++ b/tests/test.eds.license @@ -1,3 +1,3 @@ -SPDX-FileCopyrightText: 2021-2022 Constantine Evans +SPDX-FileCopyrightText: 2021-2022 Constantine Evans -SPDX-License-Identifier: AGPL-3.0-only +SPDX-License-Identifier: EUPL-1.2 diff --git a/tests/test_accesslevel.py b/tests/test_accesslevel.py index d800552..150d01c 100644 --- a/tests/test_accesslevel.py +++ b/tests/test_accesslevel.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import pytest diff --git a/tests/test_basic.py b/tests/test_basic.py index e4fffe8..08c9740 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import pytest diff --git a/tests/test_cli.py b/tests/test_cli.py index e680146..0fc9e50 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import sys diff --git a/tests/test_experiment.py b/tests/test_experiment.py index c1cf9cb..0fac6a3 100644 --- a/tests/test_experiment.py +++ b/tests/test_experiment.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import pytest diff --git a/tests/test_experiment_file.py b/tests/test_experiment_file.py index 8479e9b..20be6dd 100644 --- a/tests/test_experiment_file.py +++ b/tests/test_experiment_file.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import numpy as np diff --git a/tests/test_experiment_run.py b/tests/test_experiment_run.py index 547e3f5..7243b2d 100644 --- a/tests/test_experiment_run.py +++ b/tests/test_experiment_run.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 # def test_drawer(monkeypatch): diff --git a/tests/test_fakeserver.py b/tests/test_fakeserver.py index 84fb2c3..c0d50b5 100644 --- a/tests/test_fakeserver.py +++ b/tests/test_fakeserver.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import asyncio import re diff --git a/tests/test_is_protocol.py b/tests/test_is_protocol.py index 676c584..b84cbeb 100644 --- a/tests/test_is_protocol.py +++ b/tests/test_is_protocol.py @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 + import asyncio import logging diff --git a/tests/test_protocol.py b/tests/test_protocol.py index 14218d8..6293a0c 100644 --- a/tests/test_protocol.py +++ b/tests/test_protocol.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import pathlib diff --git a/tests/test_real.py b/tests/test_real.py index e6325dc..d39e5fd 100644 --- a/tests/test_real.py +++ b/tests/test_real.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import asyncio import uuid diff --git a/tests/test_scpicommand.py b/tests/test_scpicommand.py index 01d2011..e505280 100644 --- a/tests/test_scpicommand.py +++ b/tests/test_scpicommand.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 import pytest diff --git a/tests/test_util_fns.py b/tests/test_util_fns.py index 6eb9618..955c94f 100644 --- a/tests/test_util_fns.py +++ b/tests/test_util_fns.py @@ -1,5 +1,5 @@ -# SPDX-FileCopyrightText: 2021-2022 Constantine Evans -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2021-2023 Constantine Evans +# SPDX-License-Identifier: EUPL-1.2 from dataclasses import astuple diff --git a/tox.ini b/tox.ini index 5d94311..a83b1f3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,7 @@ -; SPDX-FileCopyrightText: 2021-2022 Constantine Evans +; SPDX-FileCopyrightText: 2021-2023 Constantine Evans ; -; SPDX-License-Identifier: AGPL-3.0-only +; SPDX-License-Identifier: EUPL-1.2 -# Tox configuration file -# Read more under https://tox.readthedocs.org/ -# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS! [tox] isolated_build = True From 605c2ef5eeb4cbbad3937f67d95e5637c88a9f90 Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sat, 4 Nov 2023 21:37:19 +0000 Subject: [PATCH 06/10] pyproject license updates --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fe529c4..86ed6d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,14 +22,14 @@ profile = "black" name = "qslib" requires-python = ">=3.9" description = "Library for communicating with and using the QuantStudio qPCR machine, intended for non-qPCR uses." -license = { file = "LICENSE.txt" } +license = { text = "EUPL-1.2" } readme = "README.md" authors = [{ name = "Constantine Evans", email = "const@costi.net" }] classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)", "Natural Language :: English", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Chemistry", @@ -38,6 +38,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Framework :: Matplotlib", "Framework :: Jupyter", ] From 7e632193bf04b2be004f1e4b5ed5962d844c2419 Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sat, 4 Nov 2023 21:40:07 +0000 Subject: [PATCH 07/10] fix #32, mpl prop_cycler access deprecation --- src/qslib/experiment.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/qslib/experiment.py b/src/qslib/experiment.py index d6a3fa3..bc07ee7 100644 --- a/src/qslib/experiment.py +++ b/src/qslib/experiment.py @@ -39,6 +39,7 @@ import numpy as np import pandas as pd import toml as toml +from matplotlib.lines import Line2D from qslib.plate_setup import PlateSetup from qslib.scpi_commands import AccessLevel, SCPICommand @@ -2054,16 +2055,14 @@ def plot_anneal_melt( if len(between_stages) > 0: betweendat: pd.DataFrame = filterdat.loc[between_stages, :] # type: ignore - anneallines = [] - meltlines = [] - betweenlines = [] + anneallines: list[list[Line2D]] = [] + meltlines: list[list[Line2D]] = [] + betweenlines: list[list[Line2D]] = [] for sample in samples: wells = self.plate_setup.get_wells(sample) for well in wells: - color = next(ax._get_lines.prop_cycler)["color"] - label = _gen_label( self.plate_setup.get_descriptive_string(sample), well, @@ -2077,13 +2076,14 @@ def plot_anneal_melt( ax.plot( annealdat.loc[:, (well, "st")], annealdat.loc[:, (well, "fl")], - color=color, label=label, marker=marker, **(line_kw if line_kw is not None else {}), ) ) + color = anneallines[-1][-1].get_color() + meltlines.append( ax.plot( meltdat.loc[:, (well, "st")], @@ -2325,8 +2325,6 @@ def plot_over_time( wells = self.plate_setup.get_wells(sample) for well in wells: - color = next(ax[0]._get_lines.prop_cycler)["color"] - label = _gen_label( self.plate_setup.get_descriptive_string(sample), well, @@ -2340,7 +2338,6 @@ def plot_over_time( ax[0].plot( filterdat.loc[stages, ("time", "hours")], filterdat.loc[stages, (well, "fl")], - color=color, label=label, marker=marker, **(line_kw if line_kw is not None else {}), @@ -2654,7 +2651,7 @@ def _gen_axtitle( return val -def _get_manifest_info(f: zipfile.ZipFile | os.PathLike[str], checkinfo=True): +def _get_manifest_info(f: zipfile.ZipFile | os.PathLike[str] | str, checkinfo=True): try: if isinstance(f, zipfile.ZipFile): m = f.open("apldbio/sds/Manifest.mf") From f6dcb77378e7f288a6483dec84ba9538cb39cd4a Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sat, 4 Nov 2023 23:29:53 +0000 Subject: [PATCH 08/10] mypy fixes --- src/qslib/data.py | 54 ++++++++++++++++++++++++++++------------ src/qslib/experiment.py | 27 ++++++++++++-------- src/qslib/plate_setup.py | 7 ++++-- src/qslib/protocol.py | 12 ++++----- 4 files changed, 65 insertions(+), 35 deletions(-) diff --git a/src/qslib/data.py b/src/qslib/data.py index 42cad91..13206a0 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -11,7 +11,7 @@ from glob import glob from os import PathLike from pathlib import Path -from typing import List, Literal, Optional, Sequence, Union, cast +from typing import Any, List, Literal, Optional, Sequence, TypeVar, Union, cast import numpy as np import numpy.typing as npt @@ -22,6 +22,28 @@ _UPPERS = "ABCDEFGHIJKLMNOP" +def _find_text_or_raise(e: ET.ElementTree | ET.Element, path: str) -> str: + "Find the text of the element at path and return it, or raise an error." + x = e.find(path) + if x is None: + raise ValueError(f"{path} not found in {x}.") + else: + t = x.text + if t is None: + raise ValueError(f"{path} has no text.") + else: + return t + + +def _get_text_or_raise(e: ET.Element) -> str: + "Get the text of the element or raise an error." + t = e.text + if t is None: + raise ValueError(f"{e} has no text.") + else: + return t + + @dataclass(frozen=True, order=True, eq=True) class FilterSet: """Representation of a filter set, potentially including the "quant" @@ -333,7 +355,7 @@ def _filterdata_df_v2( quant_files_path: Path | None = None, start_time: float | None = None, ): - dfd = { + dfd: dict[str, list[Any]] = { "filter_set": [], "stage": [], "cycle": [], @@ -395,10 +417,6 @@ def _filterdata_df_v2( return fdd.join(wrt).sort_index(axis=1) - @property - def filename_reading_string(self) -> str: - return () - def _parse_strlist(s): if s == "[]": @@ -406,8 +424,11 @@ def _parse_strlist(s): return [d for d in s[1:-1].split(", ")] -def _parse_multicomponent_data_v1(root: ET.Element): - n_wells = int(root.find("WellCount").text) +T = TypeVar("T") + + +def _parse_multicomponent_data_v1(root: ET.ElementTree): + n_wells = int(_find_text_or_raise(root, "WellCount")) if n_wells == 96: wellnames = _WELLNAMES_96 elif n_wells == 384: @@ -417,16 +438,16 @@ def _parse_multicomponent_data_v1(root: ET.Element): f"Unsupported number of wells in multicomponent data: {n_wells}" ) - cycle_count = int(root.find("CycleCount").text) + cycle_count = int(_find_text_or_raise(root, "CycleCount")) welldyes = { - int(dd.attrib["WellIndex"]): _parse_strlist(dd.find("DyeList").text) + int(dd.attrib["WellIndex"]): _parse_strlist(dd.find("DyeList")) for dd in root.findall("DyeData") } wellcycdata = { int(d.attrib["WellIndex"]): { - dye: np.fromstring(sd.text[1:-1], sep=",") + dye: np.fromstring(_get_text_or_raise(sd)[1:-1], sep=",") for dye, sd in zip( welldyes[int(d.attrib["WellIndex"])], d.findall("CycleData"), @@ -444,7 +465,7 @@ def _parse_multicomponent_data_v1(root: ET.Element): mcd = pd.concat(cycdataframes).set_index(["well", "collection_cycle"]) temperatures = pd.Series( - np.fromstring(root.find("SampleTemperatures").text, sep="\t"), + np.fromstring(_find_text_or_raise(root, "SampleTemperatures"), sep="\t"), index=pd.MultiIndex.from_product( [wellnames, range(1, cycle_count + 1)], names=["well", "collection_cycle"] ), @@ -455,11 +476,12 @@ def _parse_multicomponent_data_v1(root: ET.Element): [ [ int(y) - for y in re.match( - r"\[Stg:(\d+) Cyc:(\d+) Stp:(\d+) Pt:(\d+)\]", x + for y in cast( + re.Match[str], + re.match(r"\[Stg:(\d+) Cyc:(\d+) Stp:(\d+) Pt:(\d+)\]", x), ).groups() ] - for x in _parse_strlist(root.find("CollectionPoints").text) + for x in _parse_strlist(_find_text_or_raise(root, "CollectionPoints")) ], columns=[ "stage", @@ -517,7 +539,7 @@ def _parse_analysis_result(contents: str, plate_type: int): a = [x.splitlines() for x in re.split(r"\n(?=\d)", contents)] colnames = a[0][1].split("\t") - ard_d = {y: [] for y in colnames} + ard_d: dict[str, list[Any]] = {y: [] for y in colnames} ard_d |= { "Std Curve Results": [], diff --git a/src/qslib/experiment.py b/src/qslib/experiment.py index bc07ee7..21dca4d 100644 --- a/src/qslib/experiment.py +++ b/src/qslib/experiment.py @@ -39,9 +39,8 @@ import numpy as np import pandas as pd import toml as toml -from matplotlib.lines import Line2D -from qslib.plate_setup import PlateSetup +from qslib.plate_setup import PlateSetup, _SampleWellsView from qslib.scpi_commands import AccessLevel, SCPICommand from ._analysis_protocol_text import _ANALYSIS_PROTOCOL_TEXT @@ -64,6 +63,8 @@ if TYPE_CHECKING: # pragma: no cover import matplotlib.pyplot as plt + from matplotlib.axes import Axes + from matplotlib.lines import Line2D # Let's just assume all of these are problematic, for now. INVALID_NAME_RE = re.compile(r"[\[\]{}!/:;@&=+$,?#|\\]") @@ -1071,7 +1072,7 @@ def save_file( # return self.save_file(path, overwrite, update_files=False) @property - def sample_wells(self) -> dict[str, list[str]]: + def sample_wells(self) -> _SampleWellsView: """A dictionary of sample names to sample wells (convenience read/write access to the :class:`PlateSetup` .""" return self.plate_setup.sample_wells @@ -1492,7 +1493,7 @@ def _update_from_experiment_xml(self) -> None: self._plate_type_id = exml.findtext("PlateTypeID") or None if self._plate_type_id == "TYPE_8X12": - self.plate_type = 96 + self.plate_type: Literal[96, 384, None] = 96 elif self._plate_type_id == "TYPE_16X24": self.plate_type = 384 else: @@ -1618,6 +1619,8 @@ def _update_from_data(self) -> None: self._multicomponent_data = None adp = os.path.join(self._dir_eds, "analysis_result.txt") + if self.plate_type is None: + raise ValueError("Plate type must be set before loading analysis.") if os.path.isfile(adp): with open(adp, "r") as f: ( @@ -1629,6 +1632,8 @@ def _update_from_data(self) -> None: else: # spec version 2 fdp = os.path.join(self._dir_base, "run/filter_data.json") + if self.plate_type is None: + raise ValueError("Plate type must be set before loading analysis.") if os.path.isfile(fdp): with open(fdp, "r") as f: self._filter_data = _filterdata_df_v2( @@ -2055,9 +2060,9 @@ def plot_anneal_melt( if len(between_stages) > 0: betweendat: pd.DataFrame = filterdat.loc[between_stages, :] # type: ignore - anneallines: list[list[Line2D]] = [] - meltlines: list[list[Line2D]] = [] - betweenlines: list[list[Line2D]] = [] + anneallines: "list[list[Line2D]]" = [] + meltlines: "list[list[Line2D]]" = [] + betweenlines: "list[list[Line2D]]" = [] for sample in samples: wells = self.plate_setup.get_wells(sample) @@ -2160,7 +2165,7 @@ def plot_over_time( stages: slice | int | Sequence[int] = slice(None), process: Sequence[Processor] | Processor | None = None, normalization: Processor | None = None, - ax: "plt.Axes" | "Sequence[plt.Axes]" | None = None, + ax: "Axes" | "Sequence[Axes]" | None = None, legend: bool | Literal["inset", "right"] = True, temperatures: Literal[False, "axes", "inset", "twin"] = "axes", marker: str | None = None, @@ -2174,7 +2179,7 @@ def plot_over_time( annotate_events: bool = True, figure_kw: Mapping[str, Any] | None = None, line_kw: Mapping[str, Any] | None = None, - ) -> "Sequence[plt.Axes]": + ) -> "Sequence[Axes]": """ Plots fluorescence over time, optionally with temperatures over time. @@ -2298,12 +2303,12 @@ def plot_over_time( ) else: fig, ax = plt.subplots(1, 1, **({} if figure_kw is None else figure_kw)) - ax = [ax] + ax = [cast("Axes", ax)] elif (not isinstance(ax, (Sequence, np.ndarray))) or isinstance(ax, plt.Axes): ax = [ax] - ax = cast(Sequence[plt.Axes], ax) + ax = cast(Sequence[Axes], ax) data = self.welldata diff --git a/src/qslib/plate_setup.py b/src/qslib/plate_setup.py index a4d6b0b..d9e3e88 100644 --- a/src/qslib/plate_setup.py +++ b/src/qslib/plate_setup.py @@ -171,9 +171,12 @@ def sample_wells(self): @classmethod def from_platesetup_xml(cls, platexml: ET.Element) -> PlateSetup: # type: ignore - qs_platetype = platexml.find("PlateKind/Type").text + pt = platexml.find("PlateKind/Type") + if pt is None: + raise ValueError + qs_platetype = pt.text if qs_platetype == "TYPE_8X12": - plate_type = 96 + plate_type = 96 # type: Literal[96, 384] elif qs_platetype == "TYPE_16X24": plate_type = 384 else: diff --git a/src/qslib/protocol.py b/src/qslib/protocol.py index a7ed604..0c076cc 100644 --- a/src/qslib/protocol.py +++ b/src/qslib/protocol.py @@ -161,7 +161,7 @@ def _wrapunitmaybelist_degC( return uv -def _durformat(time: pint.Quantity[int]) -> str: +def _durformat(time: pint.Quantity) -> str: # intquantitiy """Convert time in seconds to a nice string""" time_s: int = time.to(UR.seconds).magnitude s = "" @@ -217,10 +217,10 @@ def from_scpicommand(cls: Type[T], sc: SCPICommand) -> T: # pragma: no cover class Ramp(ProtoCommand): """Ramps temperature to a new setting.""" - temperature: pint.Quantity[np.ndarray] = attr.field( + temperature: pint.Quantity = attr.field( # [np.ndarray] converter=_wrapunitmaybelist_degC, on_setattr=attr.setters.convert ) - increment: pint.Quantity[float] = attr.field( + increment: pint.Quantity = attr.field( # [float] converter=_wrap_delta_degC_or_zero, on_setattr=attr.setters.convert, default=_ZEROTEMPDELTA, @@ -228,7 +228,7 @@ class Ramp(ProtoCommand): incrementcycle: int = 1 incrementstep: int = 1 rate: float = 100.0 # This is a percent - cover: pint.Quantity[float] | None = attr.field( + cover: pint.Quantity | None = attr.field( # [float] converter=_wrap_degC_or_none, on_setattr=attr.setters.convert, default=None, @@ -330,8 +330,8 @@ def from_scpicommand(cls, sc: SCPICommand) -> HACFILT: class HoldAndCollect(ProtoCommand): """A protocol hold (for a time) and collect (set by HACFILT) command.""" - time: pint.Quantity[int] - increment: pint.Quantity[int] = Q_(0, "seconds") + time: pint.Quantity # [int] + increment: pint.Quantity = Q_(0, "seconds") # [int] incrementcycle: int = 1 incrementstep: int = 1 tiff: bool = False From ea7ab01dd18451783c4551e72d42c3bce10898e9 Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sat, 4 Nov 2023 23:58:06 +0000 Subject: [PATCH 09/10] test fixes --- src/qslib/data.py | 20 ++++++++++++-------- src/qslib/experiment.py | 6 +++--- tests/test_experiment_file.py | 5 +++-- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/qslib/data.py b/src/qslib/data.py index 13206a0..c5db879 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -441,7 +441,7 @@ def _parse_multicomponent_data_v1(root: ET.ElementTree): cycle_count = int(_find_text_or_raise(root, "CycleCount")) welldyes = { - int(dd.attrib["WellIndex"]): _parse_strlist(dd.find("DyeList")) + int(dd.attrib["WellIndex"]): _parse_strlist(dd.find("DyeList").text) # fixme for dd in root.findall("DyeData") } @@ -541,13 +541,13 @@ def _parse_analysis_result(contents: str, plate_type: int): colnames = a[0][1].split("\t") ard_d: dict[str, list[Any]] = {y: [] for y in colnames} - ard_d |= { - "Std Curve Results": [], - "Std Curve Results X Values": [], - "Std Curve Results Y Values": [], - "Rn values": [], - "Delta Rn values": [], - } + # ard_d |= { + # "Std Curve Results": [], + # "Std Curve Results X Values": [], + # "Std Curve Results Y Values": [], + # "Rn values": [], + # "Delta Rn values": [], + # } # FIXME: will fail if there are unexpected columns for x in a[1:]: @@ -563,11 +563,15 @@ def _parse_analysis_result(contents: str, plate_type: int): v = float(v) except ValueError: pass + if k not in ard_d: + ard_d[k] = [] ard_d[k].append(v) for y in x[1:]: z = y.split("\t") k = z[0] v = z[1:] + if k not in ard_d: + ard_d[k] = [] ard_d[k].append(v) d = pd.DataFrame(ard_d) diff --git a/src/qslib/experiment.py b/src/qslib/experiment.py index 21dca4d..02667e4 100644 --- a/src/qslib/experiment.py +++ b/src/qslib/experiment.py @@ -318,7 +318,7 @@ class Experiment: """ A string describing the software and version used to write the file. """ - _welldata: pd.DataFrame | None = None + _filter_data: pd.DataFrame | None = None _multicomponent_data: pd.DataFrame | None = None _analysis_result: pd.DataFrame | None = None _amplification_data: pd.DataFrame | None = None @@ -2308,7 +2308,7 @@ def plot_over_time( elif (not isinstance(ax, (Sequence, np.ndarray))) or isinstance(ax, plt.Axes): ax = [ax] - ax = cast(Sequence[Axes], ax) + ax = cast("Sequence[Axes]", ax) data = self.welldata @@ -2698,7 +2698,7 @@ def _get_manifest_info(f: zipfile.ZipFile | os.PathLike[str] | str, checkinfo=Tr warn( f"QSLib support for EDS specification version 2 is preliminary. This file is version {sv}" ) - elif sv not in ("1.3.0", "1.3.1"): + elif sv not in ("1.3.0", "1.3.1", "1.3.2"): warn( f"{sv} is an EDS specification version QSLib hasn't been specifically tested with." ) diff --git a/tests/test_experiment_file.py b/tests/test_experiment_file.py index 20be6dd..b9b9bbd 100644 --- a/tests/test_experiment_file.py +++ b/tests/test_experiment_file.py @@ -120,5 +120,6 @@ def test_plots(exp: Experiment) -> None: exp.plot_protocol() -def test_rawquant(exp: Experiment) -> None: - exp.rawdata.loc[:, :] +# rawquant has been removed +# def test_rawquant(exp: Experiment) -> None: +# exp.rawdata.loc[:, :] From 9b7c0509b4e37d92f26fa6ea422fc632c7d4a3d4 Mon Sep 17 00:00:00 2001 From: Constantine Evans Date: Sun, 5 Nov 2023 00:00:44 +0000 Subject: [PATCH 10/10] mypy fixes again --- src/qslib/data.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qslib/data.py b/src/qslib/data.py index c5db879..ae73f71 100644 --- a/src/qslib/data.py +++ b/src/qslib/data.py @@ -441,7 +441,9 @@ def _parse_multicomponent_data_v1(root: ET.ElementTree): cycle_count = int(_find_text_or_raise(root, "CycleCount")) welldyes = { - int(dd.attrib["WellIndex"]): _parse_strlist(dd.find("DyeList").text) # fixme + int(dd.attrib["WellIndex"]): _parse_strlist( + _find_text_or_raise(dd, "DyeList") + ) # fixme for dd in root.findall("DyeData") }