Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Python build process and streamline CI #600

Merged
merged 37 commits into from
Mar 27, 2023

Conversation

thomas-maschler
Copy link
Contributor

@thomas-maschler thomas-maschler commented Feb 25, 2023

Changes made:

  • update to pyspark 3.3.2
  • pull out python code into /python folder
  • use poetry and pyproject.toml to manage dependencies and project metadata
  • use pytest for testing
  • decouple build documentation from build wheel process
  • use Makefile to manage main dev and CI events for both Scala and Python
  • single out Scala Build, Python Build and Artifact upload into separate CI jobs
  • Lint Python code using Black and iSort

Note: This PR allows to build python wheel separately from the python documentation. Building the Python Markdown documentation still fails due to invalid URLs in the docs. Fixing the Python documentation should be covered in its own PR.

@thomas-maschler thomas-maschler marked this pull request as ready for review March 20, 2023 15:27
@echeipesh echeipesh self-requested a review March 20, 2023 15:27
@thomas-maschler thomas-maschler changed the title Python/spark 3.3 Separate our Scala and Python CI Mar 20, 2023
@thomas-maschler thomas-maschler changed the title Separate our Scala and Python CI Improve Python build process and streamline CI Mar 21, 2023

import pytest

on_circle_ci = os.environ.get("CIRCLECI", "false") == "true"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is CircleCI still in use?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

Comment on lines +108 to +122
# TODO: Where does this go, do we need it?
# - name: upload artefacts
# uses: ./.github/actions/upload_artefacts

# TODO: Where does this go, do we need it?
# - uses: actions/cache@v3
# with:
# path: ./dist/*
# key: dist-${{ github.sha }}

# TODO: Where does this go?
# - name: upload wheel
# working-directory: dist
# shell: bash
# run:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@echeipesh what is the correct workflow here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actions/cache@v3 is an optimization to pull the assembly from workflow cache. We don't need it. It's alright or even better to rebuild it.

I'm not sure where the wheel goes yet, PyPi eventually but I'll need to figure out how that happens.

the artefacts bit is for debugging failed CI. I never used that part of the CI. So much has changed and I think will change a little more that I'm not worried about it. I'm sure when we need it we will wire it right up.

Overall I think the CI is good and even green. I'm a little surprised we didn't end up needing GDAL for the tests though.

Copy link
Contributor

@echeipesh echeipesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@echeipesh echeipesh merged commit 53c5934 into locationtech:develop Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants