From 350dc2811326ef9173c5b378f5ade579afb26f22 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Wed, 29 Mar 2023 19:38:18 +0800 Subject: [PATCH] prune docs and update examples --- .github/workflows/ci.yml | 2 + .github/workflows/release.yml | 45 ++++ AUTHORS | 7 - ChangeLog | 271 ----------------------- README.rst | 18 +- examples/how_to/query/query_workitems.py | 5 +- examples/how_to/workitem/add_comment.py | 5 +- examples/how_to/workitem/get_workitem.py | 5 +- pyproject.toml | 2 +- 9 files changed, 68 insertions(+), 292 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 AUTHORS delete mode 100644 ChangeLog diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5373bf0..bfd0cd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..918f38c --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 8a0c02a..0000000 --- a/AUTHORS +++ /dev/null @@ -1,7 +0,0 @@ -Carsten Sauerbrey -Di Xu -Di Xu -Felipe Ruhland -Oscar de la Torre -Siddharth Kaul -stephenhsu diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 3156e4b..0000000 --- a/ChangeLog +++ /dev/null @@ -1,271 +0,0 @@ -CHANGES -======= - -0.8.2 ------ - -* fix CI (#164 -* Updating doc info from README - -0.8.1 ------ - -* release 0.8.1 -* Using tox also for CI -* Extending CI tests to multiple OS -* Dropping Python 2.7 + adding Python 3.10 -* Extending tox by flake8 + fixes -* Fixing lint error for Python 2.7 -* Formatting code + tox extension -* Formatting introduced CI error -* Adding Threadpool for initializeFromRaw -* Updating pre-commit config -* use ThreadPool for multi-thread -* format and fix pep8 errors -* add ci workflow -* Revert "Adding multiprocessing to _get_paged_resources" -* Revert "Formatting with tox" -* Revert "Further speed improvements" - -0.8.0 ------ - -* update Changelog for 0.8.0 -* change description file back to rst file -* Revert "README: use markdown instead of rst" -* Further speed improvements -* Formatting with tox -* Updating .gitignore -* Adding multiprocessing to _get_paged_resources -* fix pbr version issue and update classifier -* README: use markdown instead of rst -* update git ignore - -0.7.0 ------ - -* update docs for tag 0.7.0 -* test against more python versions in tox and travis -* fix test error -* fix pep8 error -* Added auth tuple to the get request. Work with 6.0.6.1 Removed Post statement -* update tox command in README -* remove travis check for python 2.6 -* upgrade tox and travis python version to 3.5 -* fix #115: OrderedDict mutated during iteration -* test against py34 instead of py33 -* Pep8 is dead, long live pycodestyle -* fix unicode error when removing empty elements -* fix #96: escape xml post data -* fix bug on empty children ids: #95 -* fix issue #92: Authentication not working for bad login in 6.0.3 -* fix issue #90: item type identifier -* fix RuntimeError: OrderedDict mutated during iteration on Python 3 -* fix issue #88: workitem creation bug -* add slack badge -* fix issue #86: keyword capitalize error -* remove broken PyPI downloads badge and add saythanks badge - -0.6.0 ------ - -* minor doc updates for 0.6.0 release -* add method to download attachment file -* Insure that before files will not be overridden -* upload and get attachments: implement issue #84 -* fix errors in testcases due to code changes in #78 -* new feature #78 add support for proxies -* Fix keyerror for directories changes -* Fix changes == None issue -* downgrade flake8 version due to flake8 no longer supports Python 2.6 -* fix issue #74 -* fix issue #73 -* minor bugs fix on fetching changed files -* add doc for Change -* implement new feature - issue #72 -* add pre-commit and fix style errors -* add pre-commit and fix code styles -* add RTCClient to __init__ -* issue #70: raise exception for relogin -* close issue #70 -* fix issue #70 client session expired -* fix issue #70 client session expired -* fix issue #70 part 1 -* update ChangeLog for 0.5.0 -* upload ChangeLog for 0.4.0 -* ready for 0.5.0 -* fix issue #68 -* fix exception typo -* ready for 0.4.0 -* add badge for travis ci -* fix bugs across different python versions -* remove error line -* fix bugs on python3.3 -* fix travis ci -* add travis ci -* fix pep8 errors -* update rtcclient introduction -* remove parent workitem -* fix bug when adding child(ren) and add method to remove child(ren) -* add DELETE method in class Base -* update REAME -* add children workitems -* add parent workitem -* get changesets -* add testcases for get children/parent workitems -* get parent/children workitems -* add tests for get includedinbuilds -* add includedinbuild fixture -* Get IncludedInBuilds -* query workitems using query id -* update ChangeLog for 0.3.0 -* update for 0.3.0 -* apply filter for getting paged resources -* fix bugs of saved query and add more tests -* add exception handlers for saved query -* add tests for getting saved queries -* add doc for saved queries -* add methods to query workitems using saved query url -* add methods to get saved queries -* remove wrong log -* add method to add/remove subscribers -* fix object url for getting single workitem -* fix returned properties bug -* add tests for workitem states and enable unicode -* update tests for class projectarea to enable unicode -* update tests for client due to unicode enabled -* add method to get all States of Workitem -* add six to enable unicode string and fix returned_properties bug -* add keyword in setup.cfg and update ChangeLog -* add files/packages and build wheel in setup.cfg -* update badges -* update installation.rst -* add exception for authfailed -* split long tables -* fix malformat of docs -* update conf.py to enable autodoc in other directory -* add several examples to advanced query usage -* add an example for 'in' operator -* add advanced usage on querying -* update index.rst -* remove unused refs -* update doc for quick start -* add tests for roles -* update index and add quick start/advanced_usage -* add doc for workitem attributes -* add doc url in README and bdist wheel option -* update models doc -* add intro doc -* remove unused class ProjectAdmin -* add rst for installation -* update docstring in client.py -* update docs in client.py -* minor update docstring in workitem -* minor update docstring in workitem -* fix exception syntax for python 3.3 -* minor update rtcclient ref -* update docstring in template -* update docstring in query -* update docstrings in workitem -* update docstrings in projectarea -* update rst files and add models.rst -* update docstring -* extract models to models.py -* update all rst files -* update rst files -* update docs -* init doc -* ready for release 0.1 -* update README cfg -* remove redundancy and minor update -* fix bug: add Comment -* fix typos of README -* update README -* add tests for class templater and minor update -* add tests for class workitem -* fix add comment bug due to base class refactor -* update to enable getting workitem with valid str(int_value) -* add tests for query -* enable querying archived workitems -* add tests for class projectarea -* enhance parameter type checking for client -* add tests for checking workitem type -* fix jinja2.meta import error & add tests for listing fields -* add tests for workitems -* fix bug: getting none workitems -* enable getting archived workitems -* refactor getting variables -* add tests for filedagainsts -* add tests for foundins -* add tests for priority -* add tests for severity -* add tests for single plannedfor -* add tests for plannedfors -* fix getOwnedBy bug and add its test -* add tests for teamareas -* fix base class bug -* add more tests including exception for projectareas -* fix pep8 errors in test_client.py -* add tests for projectareas -* add test fixtures -* add serveral fixture xmls -* add fixtures for client -* add test for headers -* minor update tests -* update templates folder -* add tests for base class -* fix pep8 format -* add tox.ini and test-requirements.txt -* add archived param & enable returned_properties -* update query example to use returned_properties -* enable preferred properties for query results -* minor fix query bug -* add an example for query -* refactor query method -* fix typos -* remove redundance and update methods on Comment -* implement getting attribute value -* minor fix and api update -* add new class for projectarea and minor update -* add examples/templates -* implement creatWorkitem -* add several new classes in project_area -* update to enable creating workitem -* update class Templater to list needed attributes -* update Template to support render -* add template -* minor update on ItemType and ProjectAreaID -* fix query bug -* update ItemType -* finish getWorkitems -* fix add comment bug -* minor update -* add an example on how to add comment -* refactor base class and update -* minor update validate url -* minor change addComment return value -* minor fix status code -* add method to addComment -* fix getWorkitem and minor update FieldBase class -* add needed files for packaging -* update log level -* updates on api -* add admins -* minor update updateWorkitem -* add class scheme and add method to create workitem -* update description and base class -* refactor base and add state class -* add workitem actions -* add method for single role and member -* initialize method in workitem and update query -* add members and roles -* add method to handle project area -* update client apis -* add null methods for workitem -* add methods for project area -* add several rtc components modules -* refactor base class -* update base class and query -* add base class and client -* initial project -* Initial commit diff --git a/README.rst b/README.rst index 7549f03..51a2af5 100644 --- a/README.rst +++ b/README.rst @@ -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 --------------- @@ -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 @@ -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_. diff --git a/examples/how_to/query/query_workitems.py b/examples/how_to/query/query_workitems.py index 876509a..fa185f4 100644 --- a/examples/how_to/query/query_workitems.py +++ b/examples/how_to/query/query_workitems.py @@ -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 diff --git a/examples/how_to/workitem/add_comment.py b/examples/how_to/workitem/add_comment.py index 716454e..7f12dfd 100644 --- a/examples/how_to/workitem/add_comment.py +++ b/examples/how_to/workitem/add_comment.py @@ -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 diff --git a/examples/how_to/workitem/get_workitem.py b/examples/how_to/workitem/get_workitem.py index 7064f40..7c779fd 100644 --- a/examples/how_to/workitem/get_workitem.py +++ b/examples/how_to/workitem/get_workitem.py @@ -9,7 +9,10 @@ url = "https://your_domain:9443/jazz" username = "your_username" password = "your_password" - myclient = RTCClient(url, username, password) # ends_with_jazz , old_rtc_authentication kwargs + # 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) # get all workitems # If both projectarea_id and projectarea_name are None, all the workitems diff --git a/pyproject.toml b/pyproject.toml index 7fe23fe..5ca3acc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rtcclient" - version = "0.8.3" + version = "0.9.0" homepage = "https://github.com/dixudx/rtcclient" description = "RTCClient for Rational Team Concert" authors = ["Di Xu "]