Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit dd42392

Browse files
authored
Merge pull request #61 from schuhmaj/master
Github Actions and Documentation
2 parents 7e28034 + c65cc46 commit dd42392

File tree

14 files changed

+212
-376
lines changed

14 files changed

+212
-376
lines changed

.github/workflows/python-doc.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy Sphinx documentation to Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
7+
jobs:
8+
pages:
9+
runs-on: ubuntu-latest
10+
environment:
11+
name: github-pages
12+
url: ${{ steps.deployment.outputs.page_url }}
13+
permissions:
14+
pages: write
15+
id-token: write
16+
steps:
17+
- id: deployment
18+
uses: sphinx-notes/pages@v3
19+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy-and-publish:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install build
22+
- name: Build package
23+
run: python -m build
24+
- name: Publish package
25+
uses: pypa/gh-action-pypi-publish@release/v1
26+
with:
27+
user: __token__
28+
password: ${{ secrets.PYPI_API_TOKEN }}
29+
# Use this addition for publishing on TestPyPi
30+
# repository_url: https://test.pypi.org/legacy/

.github/workflows/python-test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test Python Client
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Run pytest
23+
run: |
24+
python setup.py test

.project

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

.pydevproject

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

.travis.yml

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

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
11
# teamscale-client-python [![Build Status](https://travis-ci.org/cqse/teamscale-client-python.svg?branch=master)](https://travis-ci.org/cqse/teamscale-client-python) [![PyPI version](https://badge.fury.io/py/teamscale-client.svg)](https://badge.fury.io/py/teamscale-client) [![Teamscale Project](https://img.shields.io/badge/teamscale-teamscale--client--python-brightgreen.svg)](https://demo.teamscale.com/activity.html#/teamscale-client-python)
22
A simple client to access Teamscale's REST API written in Python
33

4-
Find the documentation here:
4+
Find the documentation here:
55
http://cqse.github.io/teamscale-client-python
66

7+
78
# Installation
8-
Install via:
9+
10+
We recommend to use at least Python 3.7 for running the Teamscale Python Client.
11+
Install from [PyPi](https://pypi.org/project/teamscale-client/):
912

1013
pip install teamscale-client
14+
15+
Alternatively, you can install from source by cloning the repository and executing:
16+
17+
pip install .
1118

12-
# Setup
13-
Copy the file `examples/.teamscale-client.config` into your home directory and update it to reflect your setup.
19+
# Setup & Usage
20+
Copy the file `examples/.teamscale-client.config` into your home directory and update it to reflect your setup.
21+
This way, you can easily create the `TeamscaleClient` from the configuration
22+
file via a `TeamscaleClientConfig`.
23+
24+
To get an overview on common usage scenarios, please have a look
25+
at the `examples` folder of this repository.
1426

1527
# Development
16-
We are happy to add additional service calls to the client. Please make sure you include a test, if you add a service call. To run them use:
28+
29+
To install all required dependencies for running tests and developing
30+
the client, create a new environment and execute:
31+
32+
pip install -r requirements.txt
33+
34+
We are happy to add additional service calls to the client.
35+
Please make sure you include a test, if you add a service call.
36+
To run them use:
1737

1838
python setup.py test
1939

20-
Tests are written using the [responses library](https://pypi.org/project/responses/), to mock the requests passed to the server using the [requests api](http://docs.python-requests.org/en/master/).
40+
Tests are written using the [responses library](https://pypi.org/project/responses/),
41+
to mock the requests passed to the server using the [requests api](http://docs.python-requests.org/en/master/).

0 commit comments

Comments
 (0)