Skip to content

Commit

Permalink
Merge pull request #185 from dixudx/update-docs-example
Browse files Browse the repository at this point in the history
prune docs and update examples
  • Loading branch information
dixudx authored Mar 29, 2023
2 parents 6536246 + 350dc28 commit 8acff28
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 292 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
- name: Install dependencies
run: |
poetry install --with devel
- name: Check lock file
run: poetry lock --check
- name: Lint with flake8
run: |
poetry run tox -e flake
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
tags:
- '*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Display Python version
run: python --version

- name: Setup Poetry
uses: abatilo/actions-poetry@v2

- name: Build project for distribution
run: poetry build

- name: Check Version
id: check-version
run: |
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: steps.check-version.outputs.prerelease == 'true'

- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
7 changes: 0 additions & 7 deletions AUTHORS

This file was deleted.

271 changes: 0 additions & 271 deletions ChangeLog

This file was deleted.

18 changes: 8 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ This library can help you:
Python & Rational Team Concert Versions
---------------------------------------

This project has been tested against multiple Python versions, such as 2.7, 3.5, 3.6, 3.7, 3.8 and 3.9.
This project has been tested against multiple Python versions, such as "3.7", "3.8", "3.9", "3.10" and "3.11".

Currently the newest release of **rtcclient** is **0.7.0**, which works well with ``Rational Team Concert`` 6.0.6.1 and ``ELM`` 7.0.

For ``Rational Team Concert`` with version **5.0.1**, **5.0.2**, it is suggested to install **rtcclient** with version **0.6.0**.
Please install **rtcclient** with version >= 0.9.0, which works well with ``Rational Team Concert`` 6.0.6.1, **5.0.1**, **5.0.2** and ``ELM`` 7.0.

Important Links
---------------
Expand Down Expand Up @@ -86,11 +84,11 @@ Team Areas, Workitems) into easily managed Python objects:
>>> url = "https://your_domain:9443/jazz"
>>> username = "your_username"
>>> password = "your_password"
# if your rtc server is behind a proxy, remember to set "proxies"
# explicitly. detailed can be found in quick start of the doc
# if your url ends with ccm, set ends_with_jazz to False
# refer to issue #68 for detailed explanation
>>> myclient = RTCClient(url, username, password, ends_with_jazz=True)
# If your rtc server is behind a proxy, remember to set "proxies" explicitly.
# If your url ends with ccm, set ends_with_jazz to False.
# Please refer to issue #68 for detailed explanation
# If your rtc server is too old (such as Rational Team Concert 5.0.1, 5.0.2), please set old_rtc_authentication to True
>>> myclient = RTCClient(url, username, password, ends_with_jazz=True, old_rtc_authentication=False)
# it will be faster if returned properties is specified
# see in below query example
>>> wk = myclient.getWorkitem(123456) # get a workitem whose id is 123456
Expand Down Expand Up @@ -134,7 +132,7 @@ the tests using pytest_ with the following command:
Testing with Poetry
-------
-------------------

When using poetry_ , all dependencies and test environment are managed by this tool even when using tox_.

Expand Down
5 changes: 4 additions & 1 deletion examples/how_to/query/query_workitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
username = "your_username"
password = "your_password"
projectarea_name = "your_projectarea_name"
myclient = RTCClient(url, username, password)
# If your rtc server is too old (such as Rational Team Concert 5.0.1, 5.0.2),
# please set old_rtc_authentication to True.
# Other kwargs, such as ends_with_jazz, old_rtc_authentication
myclient = RTCClient(url, username, password, old_rtc_authentication=False)

# query starts here
myquery = myclient.query
Expand Down
5 changes: 4 additions & 1 deletion examples/how_to/workitem/add_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
url = "https://your_domain:9443/jazz"
username = "your_username"
password = "your_password"
myclient = RTCClient(url, username, password)
# If your rtc server is too old (such as Rational Team Concert 5.0.1, 5.0.2),
# please set old_rtc_authentication to True.
# Other kwargs, such as ends_with_jazz, old_rtc_authentication
myclient = RTCClient(url, username, password, old_rtc_authentication=False)

# change workitem id here
workitem_id = 123456
Expand Down
Loading

0 comments on commit 8acff28

Please sign in to comment.