-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from schuhmaj/master
Github Actions and Documentation
- Loading branch information
Showing
14 changed files
with
212 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/). |
Oops, something went wrong.