Skip to content

Commit

Permalink
workflow to publish data-connector-lib (#712)
Browse files Browse the repository at this point in the history
* workflow to publish data-connector-lib

Signed-off-by: Hiroya Matsubara <[email protected]>

* add how to install to documentation

Signed-off-by: Hiroya Matsubara <[email protected]>

---------

Signed-off-by: Hiroya Matsubara <[email protected]>
  • Loading branch information
hmtbr authored Oct 16, 2024
1 parent 876336a commit ac1c0a7
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/deploy-connector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build, Test, and Upload PyPI package of data-connector-lib

on:
release:
types:
- published
workflow_dispatch:

permissions:
contents: read
# see https://docs.pypi.org/trusted-publishers/
id-token: write

jobs:
build-package:
name: Build data connector library
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# for setuptools-scm
fetch-depth: 0
- name: Build Packages for pypi
run: |
make -C data-connector-lib build
publish-test-pypi:
name: Publish packages to test.pypi.org
# disabled
if: false
runs-on: ubuntu-22.04
needs: build-package

steps:
- name: Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Upload to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish-pypi:
name: Publish release to pypi.org
runs-on: ubuntu-22.04
needs: build-package
# disabled as of now
if: false
steps:
- name: Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 14 additions & 0 deletions data-connector-lib/doc/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ Features:
- Mime type filters: You can restrict mime types which can be downloaded.
- Parallel processing: Requests to websites are processed in parallel.

## How to install

### From PyPI

```sh
pip install data-prep-connector
```

### From Github

```sh
pip install git+https://github.com/IBM/data-prep-kit.git@dev#subdirectory=data-connector-lib
```

## Example usage

```python
Expand Down
2 changes: 1 addition & 1 deletion data-connector-lib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "dpk_connector"
name = "data_prep_connector"
version = "0.2.2.dev0"
requires-python = ">=3.10"
keywords = [
Expand Down

0 comments on commit ac1c0a7

Please sign in to comment.