From eeaa8816ca3eae29fb80df2d8e9f93f8fd5bc62a Mon Sep 17 00:00:00 2001 From: Christopher Lupp Date: Thu, 22 Feb 2024 23:58:40 -0500 Subject: [PATCH 1/2] updated changelog and installation instruction in the docs --- CHANGELOG.md | 12 ++++++++++++ doc/installation.md | 22 ++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d268ee1..d0c8e4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## Version 0.5.0 + +- [feature] Transitioned away from setuptools and setup.py to a pyproject.toml + and poetry-based package. +- [feature] gRPC and protobuf stubs are now automatically compiled when + running an editable install (pip install -e). + +## Version 0.4.0 + +- [doc] General documentation updates. + + ## Version 0.3.0 This release is one of the biggest changes to the code to date. It contains a diff --git a/doc/installation.md b/doc/installation.md index 6eb8079..69b5b0c 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -21,22 +21,16 @@ installed automatically during the installation process: ## Compiling Definitions and Installation -The Philote MDO Python library requires a two step installation process. First, -make sure that `grpcio-tools` and `protoletariat` are installed. If not, they -can be installed using pip. Note, that the first step of the installation -process will not complete without these tools. Unlike the other dependencies, -pip will not automatically install them during the package build. The first step -is to compile the protobuf/gRPC files into python files. This is done by running -(from the repository directory): +Older versions of this library featured a two-step build process. This has since +been simplified. To install the package run pip: - python setup.py compile_proto - -Once this step completes successfully, the package can be installed using pip: + pip install -e . - pip install . +If you want to install the package without editable mode, you will need to run the +two-step process previously described. First, run: -or + python utils/compile_proto.py - pip install -e . +followed by: -for a development install. \ No newline at end of file + pip install . \ No newline at end of file From ceec1a22a39789e7620eb9d023e780f93bb48da7 Mon Sep 17 00:00:00 2001 From: Christopher Lupp Date: Fri, 23 Feb 2024 21:48:03 -0500 Subject: [PATCH 2/2] added pypi upload action --- .github/workflows/publish-pypi.yaml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish-pypi.yaml diff --git a/.github/workflows/publish-pypi.yaml b/.github/workflows/publish-pypi.yaml new file mode 100644 index 0000000..c26dbb9 --- /dev/null +++ b/.github/workflows/publish-pypi.yaml @@ -0,0 +1,31 @@ +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + 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@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}