Skip to content

Commit 7fffe8c

Browse files
Merge pull request #313 from linode/dev
Release v5.7.0
2 parents 3d90946 + 680c5a2 commit 7fffe8c

Some content is hidden

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

54 files changed

+372
-58
lines changed

.github/workflows/e2e-test-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- run: make INTEGRATION_TEST_PATH="${{ inputs.test_path }}" testint
8282
if: ${{ steps.validate-tests.outputs.match == '' }}
8383
env:
84-
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN }}
84+
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
8585

8686
- uses: actions/github-script@v6
8787
id: update-check-run

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: '3.x'
1919

2020
- name: install dependencies
21-
run: pip3 install -r requirements-dev.txt -r requirements.txt
21+
run: make requirements
2222

2323
- name: run linter
2424
run: make lint

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
matrix:
1717
python-version: ['3.7','3.8','3.9','3.10','3.11']
1818
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-python@v2
19+
- uses: actions/checkout@v3
20+
- uses: actions/setup-python@v4
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
- name: Run tests
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Nightly Smoke Tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
smoke_tests:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
ref: dev
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install Python deps
24+
run: pip install -r requirements.txt -r requirements-dev.txt wheel boto3
25+
26+
- name: Install Python SDK
27+
run: make install
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Run smoke tests
32+
run: |
33+
make smoketest
34+
env:
35+
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}

.github/workflows/publish-pypi.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
- name: Install Python deps
2525
run: pip install -U wheel build certifi
2626

27-
- name: Install package requirements
28-
run: make requirements
29-
3027
- name: Build the package
3128
run: make build
3229
env:

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @linode/dx
2+

Makefile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,41 @@ build: clean
2727
release: build
2828
twine upload dist/*
2929

30-
30+
@PHONEY: install
3131
install: clean
3232
python3 -m pip install .
3333

34-
34+
@PHONEY: requirements
3535
requirements:
3636
pip install -r requirements.txt -r requirements-dev.txt
3737

38-
38+
@PHONEY: black
3939
black:
4040
black linode_api4 test
4141

42-
42+
@PHONEY: isort
4343
isort:
4444
isort linode_api4 test
4545

46-
46+
@PHONEY: autoflake
4747
autoflake:
4848
autoflake linode_api4 test
4949

50-
50+
@PHONEY: format
5151
format: black isort autoflake
5252

53-
54-
lint:
53+
@PHONEY: lint
54+
lint: build
5555
isort --check-only linode_api4 test
5656
autoflake --check linode_api4 test
5757
black --check --verbose linode_api4 test
5858
pylint linode_api4
59+
twine check dist/*
5960

6061
@PHONEY: testint
6162
testint:
6263
python3 -m pytest test/integration/${INTEGRATION_TEST_PATH}${MODEL_COMMAND} ${TEST_CASE_COMMAND}
64+
65+
@PHONEY: smoketest
66+
smoketest:
67+
pytest -m smoke test/integration --disable-warnings

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Integration tests live in the ``test/integration`` directory.
140140

141141
Pre-requisite
142142
^^^^^^^^^^^^^^^^^
143-
Export Linode API token as `LINODE_CLI_TOKEN` before running integration tests::
143+
Export Linode API token as `LINODE_TOKEN` before running integration tests::
144144

145145
export LINODE_TOKEN = $(your_token)
146146

docs/guides/core_concepts.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ certain group. This library implements filtering with a SQLAlchemy-like
4949
syntax, where a model's attributes may be used in comparisons to generate
5050
filters. For example::
5151

52+
from linode_api4 import Instance
53+
5254
prod_linodes = client.linode.instances(Instance.group == "production")
5355

5456
Filters may be combined using boolean operators similar to SQLAlchemy::
5557

5658
# and_ and or_ can be imported from the linode package to combine filters
57-
from linode_api4 import or_
5859
prod_or_staging = client.linode.instances(or_(Instance.group == "production",
5960
Instance.group == "staging"))
6061

@@ -66,7 +67,7 @@ Filters may be combined using boolean operators similar to SQLAlchemy::
6667
Filters are generally only applicable for the type of model you are querying,
6768
but can be combined to your heart's content. For numeric fields, the standard
6869
numeric comparisons are accepted, and work as you'd expect. See
69-
:doc:`Filtering Collections<../linode/objects/filtering>` for full details.
70+
:doc:`Filtering Collections</linode_api4/objects/filtering>` for full details.
7071

7172
Models
7273
------

linode_api4/groups/account.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def events(self, *filters):
4949
API Documentation: https://www.linode.com/docs/api/account/#events-list
5050
5151
:param filters: Any number of filters to apply to this query.
52+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
53+
for more details on filtering.
5254
5355
:returns: A list of events on the current account matching the given filters.
5456
:rtype: PaginatedList of Event
@@ -124,6 +126,8 @@ def oauth_clients(self, *filters):
124126
API Documentation: https://www.linode.com/docs/api/account/#oauth-clients-list
125127
126128
:param filters: Any number of filters to apply to this query.
129+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
130+
for more details on filtering.
127131
128132
:returns: A list of OAuth Clients associated with this account.
129133
:rtype: PaginatedList of OAuthClient
@@ -167,6 +171,8 @@ def users(self, *filters):
167171
API Documentation: https://www.linode.com/docs/api/account/#users-list
168172
169173
:param filters: Any number of filters to apply to this query.
174+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
175+
for more details on filtering.
170176
171177
:returns: A list of users on this account.
172178
:rtype: PaginatedList of User

0 commit comments

Comments
 (0)