Skip to content

Commit

Permalink
Merge pull request #61 from schuhmaj/master
Browse files Browse the repository at this point in the history
Github Actions and Documentation
  • Loading branch information
DreierF authored Mar 13, 2023
2 parents 7e28034 + c65cc46 commit dd42392
Show file tree
Hide file tree
Showing 14 changed files with 212 additions and 376 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/python-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy Sphinx documentation to Pages

on:
push:
branches: ["master"]

jobs:
pages:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3

30 changes: 30 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy-and-publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# Use this addition for publishing on TestPyPi
# repository_url: https://test.pypi.org/legacy/
24 changes: 24 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test Python Client

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run pytest
run: |
python setup.py test
17 changes: 0 additions & 17 deletions .project

This file was deleted.

8 changes: 0 additions & 8 deletions .pydevproject

This file was deleted.

24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
# 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)
A simple client to access Teamscale's REST API written in Python

Find the documentation here:
Find the documentation here:
http://cqse.github.io/teamscale-client-python


# Installation
Install via:

We recommend to use at least Python 3.7 for running the Teamscale Python Client.
Install from [PyPi](https://pypi.org/project/teamscale-client/):

pip install teamscale-client

Alternatively, you can install from source by cloning the repository and executing:

pip install .

# Setup
Copy the file `examples/.teamscale-client.config` into your home directory and update it to reflect your setup.
# Setup & Usage
Copy the file `examples/.teamscale-client.config` into your home directory and update it to reflect your setup.
This way, you can easily create the `TeamscaleClient` from the configuration
file via a `TeamscaleClientConfig`.

To get an overview on common usage scenarios, please have a look
at the `examples` folder of this repository.

# Development
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:

To install all required dependencies for running tests and developing
the client, create a new environment and execute:

pip install -r requirements.txt

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:

python setup.py test

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/).
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/).
Loading

0 comments on commit dd42392

Please sign in to comment.