Skip to content

Commit

Permalink
Merge branch 'master' into issue#377
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravisaketi authored May 5, 2024
2 parents 3de9219 + 270a4e2 commit 14e8fad
Show file tree
Hide file tree
Showing 48 changed files with 2,163 additions and 1,572 deletions.
39 changes: 39 additions & 0 deletions .github/fiware/image-clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set -e

SOURCE="orchestracities/quantumleap"
DOCKER_TARGET="fiware/quantum-leap"
QUAY_TARGET="quay.io/fiware/quantumleap"

# DOCKER_TARGET="fiware/$(basename $(git rev-parse --show-toplevel))"
# QUAY_TARGET="quay.io/fiware/$(basename $(git rev-parse --show-toplevel))"

VERSION=$(git describe --exclude 'FIWARE*' --tags $(git rev-list --tags --max-count=1))

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
docker pull -q "$1":"$2"
docker tag "$1":"$2" "$3":"$2"
docker push -q "$3":"$2"

if ! [ -z "$4" ]; then
echo 'pushing '"$1 $2"' to latest'
docker tag "$1":"$2" "$3":latest
docker push -q "$3":latest
fi
}

for i in "$@" ; do
if [[ $i == "docker" ]]; then
clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true
fi
echo ""
done

for i in "$@" ; do
if [[ $i == "clean" ]]; then
docker rmi -f $(docker images -a -q) | true
fi
done
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM python:3.8.5-alpine3.12 as base
FROM python:3.8.17-alpine3.18 as base
FROM base as builder
RUN apk --no-cache --update-cache add gcc python3 python3-dev py-pip build-base wget
RUN apk --no-cache --update-cache add gcc python3 python3-dev py-pip build-base wget rust cargo
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install --upgrade pip
RUN pip install pipenv
RUN mkdir -p /src/ngsi-timeseries-api
COPY Pipfile /src/ngsi-timeseries-api/Pipfile
Expand Down
29 changes: 16 additions & 13 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,42 @@ name = "pypi"

[packages]
bitmath = "~=1.3"
certifi = "==2018.10.15"
"connexion[swagger-ui]" = "~=2.2"
click = "~=7.1"
certifi = "==2023.7.22"
# The latest connexion is 2.14.2 which requires Flask < 2.3.
# So the latest Flask we can install is 2.2.5. (If you install 2.3.0 you'll
# get `AttributeError: module 'flask.json' has no attribute 'JSONEncoder'`
# b/c Flask 2.3.0 removed JSONEncoder.
"connexion[swagger-ui]" = "~=2.14"
click = "~=8.1"
crate = "~=0.22"
flask = "~=1.1.0"
flask = "==2.2.5"
geojson = "~=2.4"
geomet = "~=0.2"
gunicorn = "~=20.1"
pg8000 = "==1.23.0"
pickle-mixin = "==1.0.2"
pydantic = "~=1.8"
pydantic = "~=1.10"
pymongo = "~=3.4"
python-dateutil = ">=2.7"
pyyaml = ">=4.2"
python-dateutil = "~=2.8"
pyyaml = "~=6.0"
objsize = "~=0.3"
redis = "~=3.5"
requests = ">=2.20"
redis = "~=4.6"
requests = "~=2.31"
rq = "~=1.8"
geopy = "~=2.2.0"

[dev-packages]
# run `pipenv install --dev` to get the packages below in your env
aiohttp = ">=3.7.4"
aiohttp = "~=3.8"
backoff = "~=1.1"
matplotlib = "~=3.3"
pandas = "~=1.1"
pytest-lazy-fixture = "~=0.6.3"
pytest-flask = "~=0.10"
pytest = "~=3.0"
pytest-flask = "~=1.2"
pytest = "~=5.0"
pytest-cov = "~=2.7.1"
coveralls = "~=2.0"
lovely-pytest-docker = "~=0.3.0"
pyyaml = "~=5.4"

[requires]
python_version = "3.8"
2,384 changes: 1,401 additions & 983 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![FIWARE Core Context Management](https://nexus.lab.fiware.org/static/badges/chapters/core.svg)](https://www.fiware.org/developers/catalogue/)
[![License: MIT](https://img.shields.io/github/license/orchestracities/ngsi-timeseries-api.svg)](https://opensource.org/licenses/MIT)
[![Docker Status](https://img.shields.io/docker/pulls/orchestracities/quantumleap.svg)](https://hub.docker.com/r/orchestracities/quantumleap/)
[![Docker badge](https://img.shields.io/badge/quay.io-fiware%2Fquantumleap-grey?logo=red%20hat&labelColor=EE0000)](https://quay.io/repository/fiware/quantumleap)
[![Support](https://img.shields.io/badge/support-ask-yellowgreen.svg)](https://ask.fiware.org/questions/)
<br/>
[![Documentation badge](https://img.shields.io/readthedocs/quantumleap.svg)](https://quantumleap.readthedocs.io/en/latest/)
Expand Down Expand Up @@ -47,7 +47,7 @@ platform.
You can find more FIWARE components in the
[FIWARE catalogue](https://catalogue.fiware.org).

| :books: [Documentation](https://quantumleap.rtfd.io/) | :mortar_board: [Academy](https://fiware-academy.readthedocs.io/en/latest/core/quantum-leap) | :whale: [Docker Hub](https://hub.docker.com/r/orchestracities/quantumleap/) | :dart: [Roadmap](https://github.com/orchestracities/ngsi-timeseries-api/blob/master/docs/roadmap.md) |
| :books: [Documentation](https://quantumleap.rtfd.io/) | :mortar_board: [Academy](https://fiware-academy.readthedocs.io/en/latest/core/quantum-leap) | <img style="height:1em" src="https://quay.io/static/img/quay_favicon.png"/> [quay.io](https://quay.io/repository/fiware/quantumleap) | :dart: [Roadmap](https://github.com/orchestracities/ngsi-timeseries-api/blob/master/docs/roadmap.md) |
|---|---|---|---|

## Contents
Expand Down Expand Up @@ -146,7 +146,7 @@ If you would like to add your company to this list, please mention it in
this [issue](https://github.com/orchestracities/ngsi-timeseries-api/issues/436)
or create a PR to update the list.

| <a href="https://www.ekz.ch/"><img src="https://www.ekz.ch/.resources/ekzweb/webresources/resources/ekz_logo.svg" height="75" /></a> | <a href="https://www.stadtwerke-wolfsburg.de/"><img src="https://www.stadtwerke-wolfsburg.de/fileadmin/templates/Images/logo_stadtwerke.png" height="75" /></a> | <a href="https://profirator.fi/"><img alt="Profirator" src="https://user-images.githubusercontent.com/7221736/113831287-1e0a2c00-9790-11eb-9167-2c336276d716.png" height="45" /></a> | <a href="https://addix.net/"><img src="https://user-images.githubusercontent.com/60972305/169762069-85f54ab0-381d-4837-a0fe-68628453173b.jpg" height="45" /></a> | |
| <a href="https://www.ekz.ch/"><img src="https://www.ekz.ch/.resources/ekzweb/webresources/resources/ekz_logo.svg" height="75" /></a> | <a href="https://www.stadtwerke-wolfsburg.de/"><img src="https://www.stadtwerke-wolfsburg.de/typo3conf/ext/vc_theme/Resources/Public/Graphics/SVG-Logo.svg" height="75" /></a> | <a href="https://profirator.fi/"><img alt="Profirator" src="https://user-images.githubusercontent.com/7221736/113831287-1e0a2c00-9790-11eb-9167-2c336276d716.png" height="45" /></a> | <a href="https://addix.net/"><img src="https://user-images.githubusercontent.com/60972305/169762069-85f54ab0-381d-4837-a0fe-68628453173b.jpg" height="45" /></a> | |
|---|---|---|---|---|

## Linked projects
Expand All @@ -172,4 +172,4 @@ if you need Enterprise Support for your QuantumLeap installation.

QuantumLeap is licensed under the [MIT](LICENSE) License

© 2017-2021 Martel Innovate
© 2017-2023 Martel Innovate
54 changes: 53 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
# QuantumLeap Release Notes

## 0.9.0-dev
## 1.0.1

### New features

### Bug fixes

- Fix to return OK/200 and an empty result set when no data found (#720)
- Fix to return id and type in place of entityId and entityType (#751)

### Important: Backward compatibility

This release breaks API backward compatibility. Existing `1.0.0` clients may
**not** be able to work with this new Quantum Leap version without code
changes.

In detail: version `1.0.1` changes fields of query results. Up to
version 1.0.0, Quantum Leap used the following JSON format for query results:

{
entityId: ...,
entityType: ...,
index: ...,
values: ...
}

Version 1.0.1 changed `entityId` and `entityType` to `id` and `type`
respectively for the query result as in e.g.

{
id: ...,
type: ...,
index: ...,
values: ...
}

### Continuous Integration

### Documentation

### Technical debt

## 1.0.0

### New features

Expand All @@ -24,13 +65,21 @@
- Replaced entity with getter (#652)
- Resolved TODO in Dockerfile (#680)
- Resolved TODO at src/reporter/tests/test_timescale_types.py (#667)
- Resolved TODO at src/transaltors/sql_transaltor.py (#694)
- Resolved TODO at src/translator/sql_translator.py (#686)
- Resolved TODO at src/translators/sql_translator.py#L768.py (#683)
- Resolved TODO at src/reporter/tests/utils.py (#692)
- Added error handling in src/wq/ql/notify.py (#673)
- NGSI-LD tenant header (#664, #669)
- Updated health endpoint for Timescale (#377)

### Bug fixes

- Fix issues with integration tests and backward compatibility tests
- Fix for linter failures (#670)
- Fix for issue broken docker image (#674)
- Fix for broken link in README.md (#688)
- Fix for incorrect notation in file (#725)

### Continuous Integration

Expand All @@ -47,6 +96,9 @@

### Technical debt

- Upgrade Python deps to fix security vulnerabilities, make the Docker
image build again and restore a working dev env on Apple silicon. (#737)

## 0.8.3

### New features
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
command: crate -Cauth.host_based.enabled=false
-Ccluster.name=democluster -Chttp.cors.enabled=true -Chttp.cors.allow-origin="*"
environment:
LOG4J_FORMAT_MSG_NO_LOOKUPS=true
- LOG4J_FORMAT_MSG_NO_LOOKUPS=true
ports:
# Admin UI
- "4200:4200"
Expand Down
48 changes: 48 additions & 0 deletions nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions nix/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
description = "QuantumLeap dev tools.";

inputs = {
nixpkgs.url = "github:NixOs/nixpkgs/nixos-23.05";
nixie = {
url = "github:c0c0n3/nixie";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, nixie }:
let
buildWith = nixie.lib.flakes.mkOutputSetForCoreSystems nixpkgs;
mkSysOutput = { system, sysPkgs }:
{
defaultPackage.${system} = with sysPkgs;
let
pyenv = python38.withPackages (ps: with ps;
[ pipenv pip wheel setuptools ]
);
in buildEnv {
name = "quantumleap-shell";
paths = [ pyenv ];
};
};
in
buildWith mkSysOutput;
}
Loading

0 comments on commit 14e8fad

Please sign in to comment.