Skip to content

Commit ab6b104

Browse files
docs: Update Readme for migrating sdk-gen to main (box/box-codegen#889) (#1207)
1 parent 2c21df9 commit ab6b104

File tree

7 files changed

+117
-10
lines changed

7 files changed

+117
-10
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "35c5d34", "specHash": "e7ce024", "version": "10.1.0" }
1+
{ "engineHash": "4147cc3", "specHash": "e7ce024", "version": "10.1.0" }

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
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/sdk-gen/docs
4+
url: https://github.com/box/box-python-sdk/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
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Build and Test daily
2+
on:
3+
schedule:
4+
- cron: '20 2 * * 1-5'
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 1
10+
matrix:
11+
python-version:
12+
- '3.8'
13+
- '3.11'
14+
- '3.13'
15+
name: Build with Python ${{ matrix.python-version }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
ref: main
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install -e .[dev]
29+
python -m pip install tox-gh-actions
30+
- name: All Tests
31+
env:
32+
JWT_CONFIG_BASE_64: ${{ secrets.JWT_CONFIG_BASE_64 }}
33+
ADMIN_USER_ID: ${{ secrets.ADMIN_USER_ID }}
34+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
35+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
36+
USER_ID: ${{ secrets.USER_ID }}
37+
ENTERPRISE_ID: ${{ secrets.ENTERPRISE_ID }}
38+
BOX_FILE_REQUEST_ID: ${{ secrets.BOX_FILE_REQUEST_ID }}
39+
BOX_EXTERNAL_USER_EMAIL: ${{ secrets.BOX_EXTERNAL_USER_EMAIL }}
40+
BOX_EXTERNAL_USER_ID: ${{ secrets.BOX_EXTERNAL_USER_ID }}
41+
APP_ITEM_ASSOCIATION_FILE_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FILE_ID }}
42+
APP_ITEM_ASSOCIATION_FOLDER_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FOLDER_ID }}
43+
WORKFLOW_FOLDER_ID: ${{ secrets.WORKFLOW_FOLDER_ID }}
44+
APP_ITEM_SHARED_LINK: ${{ secrets.APP_ITEM_SHARED_LINK }}
45+
SLACK_AUTOMATION_USER_ID: ${{ secrets.SLACK_AUTOMATION_USER_ID }}
46+
SLACK_ORG_ID: ${{ secrets.SLACK_ORG_ID }}
47+
SLACK_PARTNER_ITEM_ID: ${{ secrets.SLACK_PARTNER_ITEM_ID }}
48+
run: |
49+
tox
50+
coverage:
51+
name: Coverage report
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
with:
57+
ref: main
58+
- name: Set up Python 3.11
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: '3.11'
62+
- name: Install dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
python -m pip install -e .[dev]
66+
python -m pip install coveralls
67+
- name: Send coverage report to Coveralls
68+
run: |
69+
tox -e coverage
70+
coveralls --service=github
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
JWT_CONFIG_BASE_64: ${{ secrets.JWT_CONFIG_BASE_64 }}
74+
ADMIN_USER_ID: ${{ secrets.ADMIN_USER_ID }}
75+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
76+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
77+
USER_ID: ${{ secrets.USER_ID }}
78+
ENTERPRISE_ID: ${{ secrets.ENTERPRISE_ID }}
79+
BOX_FILE_REQUEST_ID: ${{ secrets.BOX_FILE_REQUEST_ID }}
80+
BOX_EXTERNAL_USER_EMAIL: ${{ secrets.BOX_EXTERNAL_USER_EMAIL }}
81+
WORKFLOW_FOLDER_ID: ${{ secrets.WORKFLOW_FOLDER_ID }}
82+
APP_ITEM_ASSOCIATION_FILE_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FILE_ID }}
83+
APP_ITEM_ASSOCIATION_FOLDER_ID: ${{ secrets.APP_ITEM_ASSOCIATION_FOLDER_ID }}
84+
APP_ITEM_SHARED_LINK: ${{ secrets.APP_ITEM_SHARED_LINK }}
85+
SLACK_AUTOMATION_USER_ID: ${{ secrets.SLACK_AUTOMATION_USER_ID }}
86+
SLACK_ORG_ID: ${{ secrets.SLACK_ORG_ID }}
87+
SLACK_PARTNER_ITEM_ID: ${{ secrets.SLACK_PARTNER_ITEM_ID }}
88+
notify:
89+
name: Send Slack Notification
90+
runs-on: ubuntu-latest
91+
needs: [build, coverage]
92+
if: always()
93+
steps:
94+
- name: Send Slack Notification
95+
env:
96+
SLACK_WEBHOOK_TEST_NOTIFICATION_URL: ${{ secrets.SLACK_WEBHOOK_TEST_NOTIFICATION_URL }}
97+
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
98+
run: |
99+
if [ "${{ needs.build.result }}" != "success" ] || [ "${{ needs.coverage.result }}" != "success" ]; then
100+
STATUS="Failure ❌"
101+
else
102+
STATUS="Success ✅"
103+
fi
104+
105+
curl -X POST -H "Content-Type: application/json" \
106+
--data "{\"text\":\"<${BUILD_URL}|Daily Tests Job> in *${GITHUB_REPOSITORY}* finished with status: ${STATUS}\"}" \
107+
"$SLACK_WEBHOOK_TEST_NOTIFICATION_URL"

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build
22
on:
33
pull_request:
44
branches:
5-
- sdk-gen
5+
- main
66

77
permissions:
88
contents: read

.github/workflows/semantic-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- edited
88
- synchronize
99
branches:
10-
- sdk-gen
10+
- main
1111

1212
permissions:
1313
contents: read

.github/workflows/spell-check-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request_target:
44
types: [opened, synchronize, edited]
55
branches:
6-
- sdk-gen
6+
- main
77

88
permissions:
99
contents: read

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
# Box Python SDK v10
66

77
[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
8-
![build](https://github.com/box/box-python-sdk/actions/workflows/build.yml/badge.svg?branch=sdk-gen)
8+
![build](https://github.com/box/box-python-sdk/actions/workflows/build.yml/badge.svg?branch=main)
99
[![PyPI version](https://badge.fury.io/py/boxsdk.svg)](https://badge.fury.io/py/boxsdk)
1010
[![image](https://img.shields.io/pypi/dm/boxsdk.svg)](https://pypi.python.org/pypi/boxsdk)
1111
![Platform](https://img.shields.io/badge/python-3.8+-blue)
12-
[![Coverage](https://coveralls.io/repos/github/box/box-python-sdk/badge.svg?branch=sdk-gen)](https://coveralls.io/github/box/box-python-sdk?branch=sdk-gen)
12+
[![Coverage](https://coveralls.io/repos/github/box/box-python-sdk/badge.svg?branch=main)](https://coveralls.io/github/box/box-python-sdk?branch=main)
1313

1414
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
1515
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -69,7 +69,7 @@ Version v4 is intended for:
6969
## Version v10
7070

7171
Starting with v10, the SDK is built entirely on the generated `box_sdk_gen` package, which fully and exclusively replaces the old `boxsdk` package.
72-
The codebase for v10 of the Box Python SDK is currently available on the [sdk-gen](https://github.com/box/box-python-sdk/tree/sdk-gen) branch.
72+
The codebase for v10 of the Box Python SDK is currently available on the [main](https://github.com/box/box-python-sdk/tree/main) branch.
7373

7474
Version v10 is intended for:
7575

@@ -80,8 +80,8 @@ Version v10 is intended for:
8080

8181
| Scenario | Recommended Version | Example `pip install` |
8282
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | --------------------------- |
83-
| Creating a new application | Use [v10](https://github.com/box/box-python-sdk/tree/sdk-gen) | `pip install "boxsdk>=10"` |
84-
| App using [box-sdk-gen](https://pypi.org/project/box-sdk-gen/) artifact | Migrate to [v10](https://github.com/box/box-python-sdk/tree/sdk-gen) | `pip install "boxsdk>=10"` |
83+
| Creating a new application | Use [v10](https://github.com/box/box-python-sdk/tree/main) | `pip install "boxsdk>=10"` |
84+
| App using [box-sdk-gen](https://pypi.org/project/box-sdk-gen/) artifact | Migrate to [v10](https://github.com/box/box-python-sdk/tree/main) | `pip install "boxsdk>=10"` |
8585
| App using both [box-sdk-gen](https://pypi.org/project/box-sdk-gen/) and [boxsdk](https://pypi.org/project/boxsdk/) artifacts | Upgrade to [v4](https://github.com/box/box-python-sdk/tree/combined-sdk) | `pip install "boxsdk~=4.0"` |
8686
| App using v3 of [boxsdk](https://pypi.org/project/boxsdk/) artifact | Upgrade to [v4](https://github.com/box/box-python-sdk/tree/combined-sdk) | `pip install "boxsdk~=4.0"` |
8787

0 commit comments

Comments
 (0)