Skip to content

Commit 3c0e2f2

Browse files
test: Add Archives integration tests (box/box-codegen#744) (#901)
1 parent d604ea9 commit 3c0e2f2

File tree

942 files changed

+76146
-39165
lines changed

Some content is hidden

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

942 files changed

+76146
-39165
lines changed

.codegen.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "engineHash": "c34d8bf", "specHash": "c27c421", "version": "0.1.0" }

.gitattributes

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Bug
33
about: Report a bug found in the SDK
44
title: ''
55
labels: bug
6-
assignees: mwwoda, mhagmajer, antusus, arjankowski, lukaszsocha2, bartlomiejleszczynski
7-
6+
assignees: mwwoda, mhagmajer, arjankowski, lukaszsocha2, bartlomiejleszczynski, congminh1254
87
---
98

109
- [ ] I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
@@ -13,36 +12,44 @@ assignees: mwwoda, mhagmajer, antusus, arjankowski, lukaszsocha2, bartlomiejlesz
1312
- [ ] I have searched [Issues in this repo][github-repo] and my issue isn't already reported.
1413

1514
### Description of the Issue
15+
1616
<!-- Replace this text with a description of what problem you're having. -->
1717
<!-- Please include as much detail as possible to help us troubleshoot! -->
1818
<!-- If it isn't obvious, please include how the behavior you expect differs from what actually happened. -->
1919
<!-- This is really important so we know how to start troubleshooting your issue. -->
2020

2121
### Steps to Reproduce
22+
2223
<!-- Please include detailed steps to reproduce the issue you're seeing, if possible. -->
2324
<!-- If you don't have a reproducible error, please make sure that you give us as much detail -->
2425
<!-- as you can about what your application was doing when the error occurred. -->
2526
<!-- Good steps to reproduce the problem help speed up debugging for us and gets your issue resolved sooner! -->
27+
2628
1. Go to '...'
2729
2. Click on '....'
2830
3. Scroll down to '....'
2931
4. See error
3032

3133
### Expected Behavior
34+
3235
<!-- What did you expect to happen? -->
3336

3437
### Error Message, Including Stack Trace
38+
3539
<!-- Share the full error output you're seeing, if applicable. -->
3640
<!-- Please include the full stack trace to help us identify where the error is happening. -->
3741

3842
### Screenshots
43+
3944
<!-- If applicable, add screenshots to help explain your problem. -->
4045

4146
### Versions Used
47+
4248
Python SDK: <!-- Replace with the version of the Python SDK you're using. -->
4349
Python: <!-- Replace with the version of Python your application is running on. -->
4450

45-
[sdk-docs]: ./doc
51+
52+
[sdk-docs]: https://github.com/box/box-python-sdk-gen/tree/main/docs
4653
[api-docs]: https://developer.box.com/docs
4754
[dev-forums]: https://community.box.com/t5/Platform-and-Development-Forum/bd-p/DeveloperForum
48-
[github-repo]: https://github.com/box/box-python-sdk/search?type=Issues
55+
[github-repo]: https://github.com/box/box-python-sdk-gen/search?type=Issues

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: SDK documentation
4-
url: https://github.com/box/box-python-sdk/tree/main/docs
4+
url: https://github.com/box/box-python-sdk-gen/tree/main/docs
55
about: Before creating an issue, I have checked that the SDK documentation doesn't solve my issue.
66
- name: API documentation
77
url: https://developer.box.com/docs
@@ -10,5 +10,5 @@ contact_links:
1010
url: https://community.box.com/t5/Platform-and-Development-Forum/bd-p/DeveloperForum
1111
about: Before creating an issue, I have searched the Box Developer Forums and my issue isn't already reported there.
1212
- name: Issues in this repo
13-
url: https://github.com/box/box-python-sdk/search?type=Issues
13+
url: https://github.com/box/box-python-sdk-gen/search?type=Issues
1414
about: Before creating an issue, I have searched Issues in this repo and my issue isn't already reported.

.github/ISSUE_TEMPLATE/enhancement.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ name: Enhancement
33
about: Suggest a new feature or change
44
title: ''
55
labels: enhancement
6-
assignees: mwwoda, mhagmajer, antusus, arjankowski, lukaszsocha2, bartlomiejleszczynski
7-
6+
assignees: mwwoda, mhagmajer, arjankowski, lukaszsocha2, bartlomiejleszczynski, congminh1254
87
---
98

109
### Is your feature request related to a problem? Please describe.
10+
1111
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1212

1313
### Describe the solution you'd like
14+
1415
<!-- A clear and concise description of what you want to happen. -->
1516

1617
### Describe alternatives you've considered
18+
1719
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1820

1921
### Additional context
22+
2023
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Question
33
about: Request for Assistance
44
title: ''
55
labels: question
6-
assignees: mwwoda, mhagmajer, antusus, arjankowski, lukaszsocha2, bartlomiejleszczynski
7-
6+
assignees: mwwoda, mhagmajer, arjankowski, lukaszsocha2, bartlomiejleszczynski, congminh1254
87
---
98

109
- [ ] I have checked that the [SDK documentation][sdk-docs] doesn't solve my issue.
@@ -13,36 +12,44 @@ assignees: mwwoda, mhagmajer, antusus, arjankowski, lukaszsocha2, bartlomiejlesz
1312
- [ ] I have searched [Issues in this repo][github-repo] and my issue isn't already reported.
1413

1514
### Description of the Issue
15+
1616
<!-- Replace this text with a description of what problem you're having. -->
1717
<!-- Please include as much detail as possible to help us troubleshoot! -->
1818
<!-- If it isn't obvious, please include how the behavior you expect differs from what actually happened. -->
1919
<!-- This is really important so we know how to start troubleshooting your issue. -->
2020

2121
### Steps to Reproduce
22+
2223
<!-- Please include detailed steps to reproduce the issue you're seeing, if possible. -->
2324
<!-- If you don't have a reproducible error, please make sure that you give us as much detail -->
2425
<!-- as you can about what your application was doing when the error occurred. -->
2526
<!-- Good steps to reproduce the problem help speed up debugging for us and gets your issue resolved sooner! -->
27+
2628
1. Go to '...'
2729
2. Click on '....'
2830
3. Scroll down to '....'
2931
4. See error
3032

3133
### Expected Behavior
34+
3235
<!-- What did you expect to happen? -->
3336

3437
### Error Message, Including Stack Trace
38+
3539
<!-- Share the full error output you're seeing, if applicable. -->
3640
<!-- Please include the full stack trace to help us identify where the error is happening. -->
3741

3842
### Screenshots
43+
3944
<!-- If applicable, add screenshots to help explain your problem. -->
4045

4146
### Versions Used
47+
4248
Python SDK: <!-- Replace with the version of the Python SDK you're using. -->
4349
Python: <!-- Replace with the version of Python your application is running on. -->
4450

45-
[sdk-docs]: ./doc
51+
52+
[sdk-docs]: https://github.com/box/box-python-sdk-gen/tree/main/docs
4653
[api-docs]: https://developer.box.com/docs
4754
[dev-forums]: https://community.box.com/t5/Platform-and-Development-Forum/bd-p/DeveloperForum
48-
[github-repo]: https://github.com/box/box-python-sdk/search?type=Issues
55+
[github-repo]: https://github.com/box/box-python-sdk-gen/search?type=Issues

.github/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ markComment: >
1919
2020
# Comment to post when closing a stale issue. Set to `false` to disable
2121
closeComment: >
22-
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box Python SDK and feel free to open another PR/issue at any time.
22+
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box SDK and feel free to open another PR/issue at any time.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Autoupdate PR
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
update_pull_requests:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
token: ${{ secrets.DISPATCH_ACCESS_TOKEN }}
16+
17+
- name: Set up Git
18+
run: |
19+
git config --global user.name 'box-sdk-build'
20+
git config --global user.email '[email protected]'
21+
22+
- name: Fetch all branches and tags
23+
run: git fetch --prune --unshallow
24+
25+
- name: Auto update pull requests
26+
run: |
27+
PR_LIST=$(curl -s -H "Authorization: Bearer ${{ secrets.DISPATCH_ACCESS_TOKEN }}" "https://api.github.com/repos/$GITHUB_REPOSITORY/pulls?state=open" | jq -r '.[] | .head.ref')
28+
for pr_branch in $PR_LIST; do
29+
git checkout "$pr_branch"
30+
if git merge origin/main; then
31+
git push
32+
else
33+
# Conflict occurred, resolve by keeping our changes
34+
git checkout --ours .
35+
git add .
36+
git commit -m "Auto resolve conflict by keeping our changes"
37+
git push
38+
fi
39+
done

.github/workflows/build.yml

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,47 +9,80 @@ on:
99

1010
jobs:
1111
build:
12-
name: Build and unit tests
13-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1413
strategy:
14+
max-parallel: 1
1515
matrix:
1616
python-version:
17-
- '3.6'
18-
- '3.7'
1917
- '3.8'
20-
- '3.9'
21-
- '3.10'
2218
- '3.11'
23-
- '3.12'
2419
- '3.13'
25-
container:
26-
image: python:${{ matrix.python-version }}
20+
name: Build with Python ${{ matrix.python-version }}
2721
steps:
28-
- name: Checkout code
29-
uses: actions/checkout@v3
30-
31-
- name: Upgrade pip and install dependencies
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
3229
run: |
3330
python -m pip install --upgrade pip
34-
python -m pip install -e .[gh]
31+
python -m pip install -e .[dev]
32+
python -m pip install tox-gh-actions
33+
- name: Test with tox
34+
env:
35+
JWT_CONFIG_BASE_64: ${{ secrets.JWT_CONFIG_BASE_64 }}
36+
ADMIN_USER_ID: ${{ secrets.ADMIN_USER_ID }}
37+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
38+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
39+
USER_ID: ${{ secrets.USER_ID }}
40+
ENTERPRISE_ID: ${{ secrets.ENTERPRISE_ID }}
41+
BOX_FILE_REQUEST_ID: ${{ secrets.BOX_FILE_REQUEST_ID }}
42+
BOX_EXTERNAL_USER_EMAIL: ${{ secrets.BOX_EXTERNAL_USER_EMAIL }}
43+
APP_ITEM_ASSOCIATION_FILE_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FILE_ID }}
44+
APP_ITEM_ASSOCIATION_FOLDER_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FOLDER_ID }}
45+
WORKFLOW_FOLDER_ID: ${{ secrets.WORKFLOW_FOLDER_ID }}
46+
APP_ITEM_SHARED_LINK: ${{ secrets.APP_ITEM_SHARED_LINK }}
47+
SLACK_AUTOMATION_USER_ID: ${{ secrets.SLACK_AUTOMATION_USER_ID }}
48+
SLACK_ORG_ID: ${{ secrets.SLACK_ORG_ID }}
49+
SLACK_PARTNER_ITEM_ID: ${{ secrets.SLACK_PARTNER_ITEM_ID }}
50+
run: |
51+
tox
3552
36-
- name: Run tests with tox
37-
run: tox -e py$(echo "${{ matrix.python-version }}" | tr -d '.')
3853
coverage:
3954
name: Coverage report
4055
runs-on: ubuntu-latest
41-
container:
42-
image: python:3.13
4356
steps:
4457
- name: Checkout
45-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
59+
- name: Set up Python 3.11
60+
uses: actions/setup-python@v4
61+
with:
62+
python-version: '3.11'
4663
- name: Install dependencies
4764
run: |
4865
python -m pip install --upgrade pip
49-
python -m pip install -e .[coveralls]
66+
python -m pip install -e .[dev]
67+
python -m pip install coveralls
5068
- name: Send coverage report to Coveralls
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5369
run: |
5470
tox -e coverage
5571
coveralls --service=github
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
JWT_CONFIG_BASE_64: ${{ secrets.JWT_CONFIG_BASE_64 }}
75+
ADMIN_USER_ID: ${{ secrets.ADMIN_USER_ID }}
76+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
77+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
78+
USER_ID: ${{ secrets.USER_ID }}
79+
ENTERPRISE_ID: ${{ secrets.ENTERPRISE_ID }}
80+
BOX_FILE_REQUEST_ID: ${{ secrets.BOX_FILE_REQUEST_ID }}
81+
BOX_EXTERNAL_USER_EMAIL: ${{ secrets.BOX_EXTERNAL_USER_EMAIL }}
82+
WORKFLOW_FOLDER_ID: ${{ secrets.WORKFLOW_FOLDER_ID }}
83+
APP_ITEM_ASSOCIATION_FILE_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FILE_ID }}
84+
APP_ITEM_ASSOCIATION_FOLDER_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FOLDER_ID }}
85+
APP_ITEM_SHARED_LINK: ${{ secrets.APP_ITEM_SHARED_LINK }}
86+
SLACK_AUTOMATION_USER_ID: ${{ secrets.SLACK_AUTOMATION_USER_ID }}
87+
SLACK_ORG_ID: ${{ secrets.SLACK_ORG_ID }}
88+
SLACK_PARTNER_ITEM_ID: ${{ secrets.SLACK_PARTNER_ITEM_ID }}

.github/workflows/create_release.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)