Skip to content

Commit 3362f88

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/custom-success-message
2 parents 891da15 + e8b1783 commit 3362f88

File tree

101 files changed

+8522
-2779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+8522
-2779
lines changed

renovate.json renamed to .github/renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"config:base"
5-
]
5+
],
6+
"ignoreDeps": ["python"]
67
}

.github/workflows/release.yaml

Lines changed: 34 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,43 @@ name: release
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66

77
jobs:
8+
test:
9+
uses: ./.github/workflows/test_and_build.yml
10+
secrets: inherit
11+
812
build:
913
runs-on: ubuntu-latest
14+
environment: CD
15+
16+
needs:
17+
- test
1018

1119
steps:
12-
- uses: actions/checkout@v4
13-
14-
- name: Set up Python
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: 3.8
18-
19-
- name: Install dependencies
20-
run: |
21-
python3 -m pip install --upgrade pip poetry
22-
poetry config virtualenvs.create false
23-
poetry lock
24-
poetry install
25-
26-
- name: Check codestyle
27-
run: pre-commit run --all
28-
29-
- name: Run tests
30-
env:
31-
COGNITE_CLIENT_ID: ${{ secrets.COGNITE_PROJECT_CLIENT_ID }}
32-
COGNITE_CLIENT_SECRET: ${{ secrets.COGNITE_PROJECT_CLIENT_SECRET }}
33-
COGNITE_TOKEN_SCOPES: ${{ secrets.COGNITE_PROJECT_SCOPES }}
34-
COGNITE_TOKEN_URL: ${{ secrets.COGNITE_PROJECT_TOKEN_URL }}
35-
COGNITE_PROJECT: extractor-tests
36-
COGNITE_BASE_URL: https://greenfield.cognitedata.com
37-
run: |
38-
coverage run --source cognite.extractorutils -m pytest -v tests
39-
coverage xml
40-
41-
- uses: codecov/codecov-action@v3
42-
with:
43-
token: ${{ secrets.CODECOV_TOKEN }}
44-
file: ./coverage.xml
45-
46-
- name: Build package
47-
run: poetry build
48-
49-
- name: Build docs
50-
run: cd docs && make html
51-
52-
- name: Release to PyPI
53-
env:
54-
TWINE_USERNAME: __token__
55-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
56-
run: twine upload --verbose dist/* || echo 'Version exists'
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.10"
26+
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v5
29+
30+
- name: Install dependencies
31+
run: |
32+
uv sync
33+
python3 -m pip install pre-commit==3.6.2
34+
35+
- name: Build package
36+
run: uv build
37+
38+
- name: Build docs
39+
run: cd docs && make html SPHINXBUILD="uv run sphinx-build"
40+
41+
- name: Release to PyPI
42+
env:
43+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
44+
run: uv publish || echo 'Version exists'

.github/workflows/test_and_build.yml

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: test_and_build
22

33
on:
44
pull_request:
5-
branches: [ master ]
5+
branches: [master]
6+
workflow_call:
67

78
jobs:
89
build:
@@ -11,45 +12,53 @@ jobs:
1112
strategy:
1213
fail-fast: false
1314
matrix:
14-
python-version: [3.8, 3.9, "3.10", "3.11"]
15+
python-version: ["3.10", "3.11", "3.12"]
1516

1617
steps:
17-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v4
1819

19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v5
21-
with:
22-
python-version: ${{ matrix.python-version }}
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
2324

24-
- name: Install dependencies
25-
run: |
26-
python3 -m pip install --upgrade pip poetry
27-
poetry config virtualenvs.create false
28-
poetry lock
29-
poetry install
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v5
3027

31-
- name: Check codestyle
32-
run: pre-commit run --all
28+
- name: Install dependencies
29+
run: |
30+
uv sync
31+
python3 -m pip install pre-commit==3.6.2
3332
34-
- name: Run tests
35-
env:
33+
- name: Check codestyle
34+
run: pre-commit run --all
35+
36+
- name: Run tests
37+
env:
3638
COGNITE_CLIENT_ID: ${{ secrets.COGNITE_PROJECT_CLIENT_ID }}
3739
COGNITE_CLIENT_SECRET: ${{ secrets.COGNITE_PROJECT_CLIENT_SECRET }}
3840
COGNITE_TOKEN_SCOPES: ${{ secrets.COGNITE_PROJECT_SCOPES }}
3941
COGNITE_TOKEN_URL: ${{ secrets.COGNITE_PROJECT_TOKEN_URL }}
42+
KEYVAULT_CLIENT_ID: ${{ secrets.KEYVAULT_CLIENT_ID }}
43+
KEYVAULT_TENANT_ID: ${{ secrets.KEYVAULT_TENANT_ID }}
44+
KEYVAULT_CLIENT_SECRET: ${{ secrets.KEYVAULT_CLIENT_SECRET }}
4045
COGNITE_PROJECT: extractor-tests
4146
COGNITE_BASE_URL: https://greenfield.cognitedata.com
42-
run: |
43-
coverage run --source cognite.extractorutils -m pytest -v tests
44-
coverage xml
47+
COGNITE_DEV_PROJECT: extractor-aws-dub-dev-testing
48+
COGNITE_DEV_BASE_URL: https://aws-dub-dev.cognitedata.com/
49+
COGNITE_DEV_TOKEN_SCOPES: https://aws-dub-dev.cognitedata.com/.default
50+
COGNITE_INTEGRATION: pythonutils-test
51+
run: |
52+
uv run coverage run --source cognite.extractorutils -m pytest -v tests
53+
uv run coverage xml
4554
46-
- uses: codecov/codecov-action@v3
47-
with:
48-
token: ${{ secrets.CODECOV_TOKEN }}
49-
file: ./coverage.xml
55+
- uses: codecov/codecov-action@v5
56+
with:
57+
token: ${{ secrets.CODECOV_TOKEN }}
58+
file: ./coverage.xml
5059

51-
- name: Build package
52-
run: poetry build
60+
- name: Build package
61+
run: uv build
5362

54-
- name: Build docs
55-
run: cd docs && make html
63+
- name: Build docs
64+
run: cd docs && make html SPHINXBUILD="uv run sphinx-build"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ __pycache__/
66
# Local test files
77
test.py
88
test.yaml
9+
local-test.yaml
10+
pyrightconfig.json
911

1012
# Tokens, etc
1113
token.txt
@@ -101,6 +103,7 @@ ipython_config.py
101103
# install all needed dependencies.
102104
#Pipfile.lock
103105

106+
uv.lock
104107
poetry.lock
105108

106109
# pyenv

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
name: mypy
1212
types: [python]
1313
language: system
14-
entry: poetry run mypy --non-interactive --install-types cognite
14+
entry: uv run mypy --non-interactive --install-types cognite
1515
pass_filenames: false
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
1717
rev: v4.5.0

.readthedocs.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
version: 2
22

33
python:
4-
version: 3.8
54
install:
6-
- requirements: 'docs/requirements.txt'
5+
- requirements: "docs/requirements.txt"
76
- method: pip
87
path: .
98

109
sphinx:
11-
configuration: 'docs/source/conf.py'
10+
configuration: "docs/source/conf.py"
1211
fail_on_warning: false
12+
13+
build:
14+
os: ubuntu-22.04
15+
tools:
16+
python: "3.11"

0 commit comments

Comments
 (0)