Skip to content

Commit

Permalink
Publish to pypi (#22)
Browse files Browse the repository at this point in the history
* Re-organize so the sdk can be published solo

* add the publish workflow, adjust setup.py

* copy workflow from fidesctl docs

* made some small tweaks

* add versioneer to fideslog

* modify versionfile_build due to install error

* fix dependency conflict with versioneer

Co-authored-by: Thomas La Piana <tal103020@icloud.com>
  • Loading branch information
SteveDMurphy and Thomas La Piana authored Mar 4, 2022
1 parent e9f018d commit a47b24f
Show file tree
Hide file tree
Showing 13 changed files with 2,618 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fideslog/sdk/python/_version.py export-subst
25 changes: 25 additions & 0 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish fideslog

on:
push:
branches:
- main
release:
types: [published]

jobs:
upload_to_pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Twine
run: pip install twine

- name: Twine Upload
run: |
python setup.py sdist
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ RUN pip install -U pip
COPY dev-requirements.txt dev-requirements.txt
RUN pip install -r dev-requirements.txt

COPY requirements.txt requirements.txt
COPY fideslog/api/requirements.txt api-requirements.txt
RUN pip install -r api-requirements.txt

COPY fideslog/sdk/python/requirements.txt requirements.txt
RUN pip install -r requirements.txt

# Copy in the application files and install it locally
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include fideslog/sdk/python/_version.py
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ xenon:
--max-modules B \
--max-average A \
--ignore "tests" \
--exclude "fideslog/sdk/python/event.py"
--exclude "fideslog/sdk/python/event.py,fideslog/sdk/python/_version.py"

####################
# Utils
Expand Down
3 changes: 3 additions & 0 deletions fideslog/sdk/python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import _version

__version__ = _version.get_versions()["version"]
Loading

0 comments on commit a47b24f

Please sign in to comment.