Skip to content

Commit f21a714

Browse files
committed
Merge branch 'main' into mo-asset-search-error
2 parents caabd4a + e85797c commit f21a714

File tree

18 files changed

+6539
-4341
lines changed

18 files changed

+6539
-4341
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ref. https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2+
* @Asgmel03 @lawoEq

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: '🧪 Build & test code'
1+
name: "🧪 Build & test code"
22

33
on:
44
workflow_dispatch:
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
python-version: ['3.8', '3.9', '3.10', '3.11']
12+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1313
os: [windows-latest, ubuntu-latest, macos-latest]
1414
runs-on: ${{ matrix.os }}
1515
steps:
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/setup-python@v4
3030
with:
3131
python-version: ${{matrix.python-version}}
32-
cache: 'poetry'
32+
cache: "poetry"
3333

3434
- name: Check pyproject.toml validity
3535
run: poetry check --no-interaction

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
3+
rev: v4.5.0
44
hooks:
55
- id: check-yaml
66
- id: check-json
77
- id: trailing-whitespace
88
- id: check-merge-conflict
99
- repo: https://github.com/psf/black
10-
rev: 23.3.0
10+
rev: 24.2.0
1111
hooks:
1212
- id: black
1313
language_version: python3
1414

1515
- repo: https://github.com/PyCQA/flake8
16-
rev: '6.0.0'
16+
rev: '7.0.0'
1717
hooks:
1818
- id: flake8
19-
args: ['--ignore=E501,W503,E231,E503,E203,F401,E702']
19+
args: ['--ignore=E501,W503,E231,E503,E203,F401,E702,E704']
2020

2121
- repo: https://github.com/timothycrosley/isort
22-
rev: '5.12.0'
22+
rev: '5.13.2'
2323
hooks:
2424
- id: isort
2525
args:
@@ -31,7 +31,7 @@ repos:
3131
]
3232

3333
- repo: https://github.com/pre-commit/mirrors-mypy
34-
rev: v1.5.1
34+
rev: v1.9.0
3535
hooks:
3636
- id: mypy
3737
args: [--strict, --ignore-missing-imports]

.snyk

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
11
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
22
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
33
ignore:
4-
SNYK-PYTHON-CRYPTOGRAPHY-6050294:
5-
- '*':
6-
reason: 'No patch available, false positive'
7-
expires: 2024-04-01T00:00:00.000Z
8-
created: 2023-11-15T11:05:00.000Z
9-
10-
SNYK-PYTHON-CRYPTOGRAPHY-6126975:
11-
- '*':
12-
reason: 'No patch available, false positive'
13-
expires: 2024-04-01T00:00:00.000Z
14-
created: 2023-12-15T11:05:00.000Z
15-
164
SNYK-JS-INFLIGHT-6095116:
175
- '*':
18-
reason: 'No patch available, false positive'
19-
expires: 2024-04-01T00:00:00.000Z
6+
reason: 'No patch available'
7+
expires: 2025-04-01T00:00:00.000Z
208
created: 2023-12-04T09:05:00.000Z
21-
22-
SNYK-JS-FOLLOWREDIRECTS-6141137:
9+
SNYK-PYTHON-PANDAS-8549481:
2310
- '*':
24-
reason: 'No patch available, false positive'
25-
expires: 2024-04-01T00:00:00.000Z
26-
created: 2024-01-02T11:05:00.000Z
11+
reason: 'No patch available'
12+
expires: 2025-04-01T00:00:00.000Z
13+
created: 2025-01-02T10:30:00.000Z
2714
patch: {}
2815
version: v1.25.0

CHANGELOG.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,117 @@
22

33
This changelog is deprecated. All changes are documented under [releases](https://github.com/equinor/tagreader-python/releases).
44

5+
## [6.0.1](https://github.com/equinor/tagreader-python/compare/v6.0.0...v6.0.1) (2024-10-03)
6+
7+
8+
### 🐛 Bug Fixes
9+
10+
* include all hashlib.new inputs ([#379](https://github.com/equinor/tagreader-python/issues/379)) ([de319cf](https://github.com/equinor/tagreader-python/commit/de319cf99095897bdd5155e6da542a95f9dae392))
11+
12+
## [6.0.0](https://github.com/equinor/tagreader-python/compare/v5.5.0...v6.0.0) (2024-09-13)
13+
14+
15+
### ⚠ BREAKING CHANGES
16+
17+
* update code to work with updated pi backend ([#372](https://github.com/equinor/tagreader-python/issues/372))
18+
19+
### 🧹 Chores
20+
21+
* bump allowed msal-bearer ([#375](https://github.com/equinor/tagreader-python/issues/375)) ([bd1e332](https://github.com/equinor/tagreader-python/commit/bd1e332636e6c07bc1ade0f4482711e14e9b54f9))
22+
23+
24+
### ✨ Features
25+
26+
* update code to work with updated pi backend ([#372](https://github.com/equinor/tagreader-python/issues/372)) ([9da2963](https://github.com/equinor/tagreader-python/commit/9da296357364545f4e66a119551cc0af67587c88))
27+
28+
29+
### 🐛 Bug Fixes
30+
31+
* fix bug with wrong url for pi ([b283859](https://github.com/equinor/tagreader-python/commit/b2838599471340fd657cf38568d21feb67ed2673))
32+
33+
## [5.5.0](https://github.com/equinor/tagreader-python/compare/v5.4.0...v5.5.0) (2024-08-19)
34+
35+
36+
### 📦 Build system
37+
38+
* **deps:** Update dependencies and snyk ignore ([0db35a4](https://github.com/equinor/tagreader-python/commit/0db35a4b017d666a3d6ec8b8a717af3c0f1fcafa))
39+
40+
41+
### ✨ Features
42+
43+
* return more aspen tag search results ([#357](https://github.com/equinor/tagreader-python/issues/357)) ([89f7961](https://github.com/equinor/tagreader-python/commit/89f7961f148861e543696e8edc3b161fd4335566))
44+
* return more search tag search results ([89f7961](https://github.com/equinor/tagreader-python/commit/89f7961f148861e543696e8edc3b161fd4335566))
45+
46+
## [5.4.0](https://github.com/equinor/tagreader-python/compare/v5.3.0...v5.4.0) (2024-06-03)
47+
48+
49+
### 🧹 Chores
50+
51+
* **deps:** bump jinja2 from 3.1.3 to 3.1.4 ([#343](https://github.com/equinor/tagreader-python/issues/343)) ([3503905](https://github.com/equinor/tagreader-python/commit/350390522f51aeb470f9a36d47f732cb0470cb73))
52+
* **deps:** bump msal-bearer from 0.2.1 to 1.0.0 ([#348](https://github.com/equinor/tagreader-python/issues/348)) ([f93e38f](https://github.com/equinor/tagreader-python/commit/f93e38f56242bf83407f31aa9c2c2bc9b14a2edc))
53+
* **deps:** bump pytest from 7.4.4 to 8.2.1 ([#345](https://github.com/equinor/tagreader-python/issues/345)) ([716b084](https://github.com/equinor/tagreader-python/commit/716b0845329af0a951d87081dd23162f642e5f3b))
54+
* **deps:** bump requests from 2.31.0 to 2.32.3 ([#350](https://github.com/equinor/tagreader-python/issues/350)) ([0e79987](https://github.com/equinor/tagreader-python/commit/0e799876c099181b1e94e0c0d2300dea6c38effc))
55+
* update manual.md ([5f3bc1a](https://github.com/equinor/tagreader-python/commit/5f3bc1afd5398c1677fa7f4fa71bc482b8239c4e))
56+
57+
58+
### ✨ Features
59+
60+
* cleanup remove unused statoil certificate ([#337](https://github.com/equinor/tagreader-python/issues/337)) ([5f3bc1a](https://github.com/equinor/tagreader-python/commit/5f3bc1afd5398c1677fa7f4fa71bc482b8239c4e))
61+
62+
63+
### 🐛 Bug Fixes
64+
65+
* handle invalid description search from aspen ([#340](https://github.com/equinor/tagreader-python/issues/340)) ([39a9364](https://github.com/equinor/tagreader-python/commit/39a93640160735d44e2c4f4dcb5678b2a6e467cc))
66+
67+
## [5.3.0](https://github.com/equinor/tagreader-python/compare/v5.2.1...v5.3.0) (2024-04-19)
68+
69+
70+
### 📦 Build system
71+
72+
* update snyk ignores and docusaurus ([#334](https://github.com/equinor/tagreader-python/issues/334)) ([a7aa362](https://github.com/equinor/tagreader-python/commit/a7aa362e4f732299e457b6538190f69c60cfb77b))
73+
74+
75+
### ✨ Features
76+
77+
* aspen query_sql get host from source name ([#323](https://github.com/equinor/tagreader-python/issues/323)) ([bb6eced](https://github.com/equinor/tagreader-python/commit/bb6ecedad9c42ff346b492fd3111bcf6cea9b66f))
78+
79+
80+
### 🐛 Bug Fixes
81+
82+
* got external url by default ([#339](https://github.com/equinor/tagreader-python/issues/339)) ([6df4a56](https://github.com/equinor/tagreader-python/commit/6df4a562194d2290f724561dce5a52e517cae07a))
83+
* remove circular import ([bb6eced](https://github.com/equinor/tagreader-python/commit/bb6ecedad9c42ff346b492fd3111bcf6cea9b66f))
84+
85+
## [5.2.1](https://github.com/equinor/tagreader-python/compare/v5.2.0...v5.2.1) (2024-03-18)
86+
87+
88+
### 📦 Build system
89+
90+
* **deps:** relax requests-ntlm version requirement ([61f3cd2](https://github.com/equinor/tagreader-python/commit/61f3cd2c883c57fcec627ca989f95df167a64600))
91+
92+
## [5.2.0](https://github.com/equinor/tagreader-python/compare/v5.1.3...v5.2.0) (2024-03-18)
93+
94+
95+
### 🧹 Chores
96+
97+
* update snyk ignore ([9428ffd](https://github.com/equinor/tagreader-python/commit/9428ffd3ea44913746465144a5eea8e2490ec228))
98+
99+
100+
### 👷 CI/CD
101+
102+
* update tagreader dependencies ([ec16d46](https://github.com/equinor/tagreader-python/commit/ec16d4610cfd2ab1f39c66ea14b96175b32360c5))
103+
104+
105+
### ✨ Features
106+
107+
* add legacy support for MD4 in Python patch versions greater than 4. Used in NTLM auth ([f9ac0c1](https://github.com/equinor/tagreader-python/commit/f9ac0c107ab51493fb1997ba6cc8aa448e795c9e))
108+
* authenticate to aspen api using bearer token ([#154](https://github.com/equinor/tagreader-python/issues/154)) ([5e40b27](https://github.com/equinor/tagreader-python/commit/5e40b27806a84ecf8166430e0bcdc8d47f5f230c))
109+
* optionally exclude descriptions from tag search results ([#118](https://github.com/equinor/tagreader-python/issues/118)) ([857a594](https://github.com/equinor/tagreader-python/commit/857a594b16064bb4824c33e8941b546ab0c38e9e))
110+
111+
112+
### 🐛 Bug Fixes
113+
114+
* correct signature for MD4 monkeypatch ([6bd7e5c](https://github.com/equinor/tagreader-python/commit/6bd7e5cefd31326475349a30052ceba5db01acb8))
115+
5116
## [5.1.3](https://github.com/equinor/tagreader-python/compare/v5.1.2...v5.1.3) (2023-12-06)
6117

7118

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ as possible to the backend historians.
1313
You can install tagreader directly into your project from pypi by using pip
1414
or another package manager. The only requirement is Python version 3.8 or above.
1515

16-
```shell"
16+
```shell
1717
pip install tagreader
1818
```
1919

@@ -26,7 +26,7 @@ The following are required and will be installed:
2626
* diskcache
2727

2828
## Usage
29-
Tagreader easy to use for both Equinor internal IMS services, and non-internal usage. For non-internal usage
29+
Tagreader is easy to use for both Equinor internal IMS services, and non-internal usage. For non-internal usage
3030
you simply need to provide the corresponding IMS service URLs and IMSType.
3131
See [data source](https://equinor.github.io/tagreader-python/docs/about/usage/data-source) for details.
3232

docs/manual.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ pip install --upgrade tagreader
5656

5757
***Note**: Since v2.7.0 the procedure described below will be automatically performed on Equinor hosts when importing the tagreader module. It should therefore no longer be necessary to perform this step manually.*
5858

59-
The Web APIs are queried with the requests package. Requests does not utilize the system certificate store, but instead relies on the certifi bundle. In order to avoid SSL verification errors, we need to either turn off SSL verification (optional input argument `verifySSL=False` for relevant function calls) or, strongly preferred, add the certificate to the certifi bundle. To do this, simply activate the virtual environment where you installed tagreader, and run the following snippet:
59+
The Web APIs are queried with the `requests` package. `requests` does not utilize the system certificate store, but instead relies on the `certifi` bundle. In order to avoid SSL verification errors, we need to either turn off SSL verification (optional input argument `verifySSL=False` for relevant function calls) or, preferably, add the certificate to the `certifi` bundle. To do this, simply activate the virtual environment where you installed `tagreader`, and run the following snippet:
6060

6161
``` python
62-
from tagreader.utils import add_statoil_root_certificate
63-
add_statoil_root_certificate()
62+
from tagreader.utils import add_equinor_root_certificate
63+
add_equinor_root_certificate()
6464
```
6565

6666
The output should inform you that the certificate was successfully added. This needs to be repeated whenever certifi is upgraded in your python virtual environment. It is safe to run more than once: If the function detects that the certificate has already been added to your current certifi installation, the certificate will not be duplicated.
@@ -117,7 +117,7 @@ The client presents the interface for communicating with the data source to the
117117
A connection to a data source is prepared by creating an instance of `tagreader.IMSClient` with the following input arguments:
118118

119119
* `datasource` : Name of data source
120-
* `imstype` (optional): The name of the [IMS type](#ims-types) to query. Indicates the type of data source that is requested, and therefore determines which handler type to use. Valid values are `piwebapi` and `aspenone`. If not provided it will search the availble sources and find the type.
120+
* `imstype` (optional): The name of the [IMS type](#ims-types) to query. Indicates the type of data source that is requested, and therefore determines which handler type to use. Valid values are `piwebapi` and `aspenone`. If not provided it will search the available sources and find the type.
121121
* `tz` (optional): Time zone naive time stamps will be interpreted as belonging to this time zone. Similarly, the returned data points will be localized to this time zone. **Default**: _"Europe/Oslo"_.
122122

123123
The following input arguments can be used when connecting to either `piwebapi` or to `aspenone`. None of these should be necessary to supply when connecting to Equinor servers.
@@ -209,7 +209,7 @@ Data is read by calling the client method `read()` with the following input argu
209209
By specifying the optional parameter `read_type` to `read()` , it is possible to specify what kind of data should be returned. The default query method is interpolated. All valid values for `read_type` are defined in the `utils.ReaderType` class (mirrored for convenience as `tagreader.ReaderType` ), although not all are currently implemented. Below is the list of implemented read types.
210210

211211
* `INT` : The raw data points are interpolated so that one new data point is generated at each step of length `ts` starting at `start_time` and ending at or less than `ts` seconds before `end_time` .
212-
* The following aggregated read types perform a weighted calculation of the raw data within each interval. Where relevant, time-weighted calculations are used. Returned time stamps are anchored at the beginning of each interval. So for the 60 seconds long interval between 08:11:00 and 08:12:00, the time stamp will be 08:11:00.
212+
* The following aggregated read types perform a weighted calculation of the raw data within each interval, using time-weighted calculations where applicable. Returned timestamps are anchored at the beginning of each interval. For example, for a 60-second interval from 08:11:00 to 08:12:00, the timestamp will be 08:11:00.
213213
+ `MIN` : The minimum value.
214214
+ `MAX` : The maximum value.
215215
+ `AVG` : The average value.

documentation/package.json

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,30 @@
1616
},
1717
"dependencies": {
1818
"@akebifiky/remark-simple-plantuml": "^1.0.2",
19-
"@docusaurus/core": "^3.0.1",
20-
"@docusaurus/preset-classic": "^3.0.1",
21-
"@docusaurus/theme-mermaid": "^3.0.1",
22-
"@mdx-js/react": "^3.0.0",
23-
"prism-react-renderer": "^2.3.0",
24-
"react": "^18.2.0",
25-
"react-dom": "^18.2.0",
26-
"rehype-katex": "7.0.0",
19+
"@docusaurus/core": "^3.6.3",
20+
"@docusaurus/preset-classic": "^3.6.3",
21+
"@docusaurus/theme-mermaid": "^3.6.3",
22+
"@mdx-js/react": "^3.1.0",
23+
"prism-react-renderer": "^2.4.1",
24+
"react": "^18.3.1",
25+
"react-dom": "^18.3.1",
26+
"rehype-katex": "7.0.1",
2727
"remark-math": "6.0.0"
2828
},
2929
"devDependencies": {
30-
"@tsconfig/docusaurus": "^2.0.2",
31-
"typescript": "^5.3.2"
30+
"@tsconfig/docusaurus": "^2.0.3",
31+
"typescript": "^5.6.2"
3232
},
33+
"resolutions": {
34+
"cookie": "0.7.0",
35+
"path-to-regexp": "0.1.12",
36+
"cross-spawn": "7.0.5",
37+
"nanoid": "3.3.8",
38+
"body-parser": "1.20.3",
39+
"express": "4.20.0",
40+
"micromatch": "4.0.8"
41+
},
42+
3343
"browserslist": {
3444
"production": [
3545
">0.5%",
@@ -44,5 +54,6 @@
4454
},
4555
"engines": {
4656
"node": ">=20.0"
47-
}
57+
},
58+
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
4859
}

0 commit comments

Comments
 (0)