Billingegroup / release-scripts

1 stars 5 forks source link

Build wheels for pdffit2 (non-pure Python) package #98

Closed bobleesj closed 1 week ago

bobleesj commented 1 week ago

I have tested both full and pre-release of pdffit2 and tested using my Mac Arm64.

Test result:

Download from test pypi:

 conda activate diffpy.pdffit2_env
pip install -i https://test.pypi.org/simple/ diffpy.pdffit2==1.4.4rc8
Collecting diffpy.pdffit2==1.4.4rc8

Pytest result:

tests/test_exceptions.py ........................................................................             [ 63%]
tests/test_pdffit.py ..............................                                                           [ 90%]
tests/test_phase_fractions.py ..                                                                              [ 92%]
tests/test_shape_factors.py ........                                                                          [ 99%]
tests/test_version.py .                                                                                       [100%]

Ref:

bobleesj commented 1 week ago

(Applied pre-commit)

bobleesj commented 1 week ago

wow, this is super work! Thank you SOOOOOO much @bobleesj and @Tieqiong

One quick question....for consistency, do we want all the uses: ..... .yml to be uses:... .yml@v0?

@sbillinge Would you be referring to the below uses cases below?

  tag-privilege-check:
    uses: ./.github/workflows/_release_tag_privilege_check.yml

  build-pure-python-package:
    needs: [tag-privilege-check]
    if: inputs.c_extension == false
    uses: ./.github/workflows/_build-pure-python-package.yml
...

For the relative paths above (./.github/...), it appears we aren't allowed to add @v0 shown below.

Screenshot 2024-11-17 at 11 26 03 AM

I assume it is because the top very workflow from pdffit2 has already checked out v0:

jobs:
  release:
    permissions:
      contents: write
    uses: Bilingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 # HERE
sbillinge commented 1 week ago

wow, this is super work! Thank you SOOOOOO much @bobleesj and @Tieqiong One quick question....for consistency, do we want all the uses: ..... .yml to be uses:... .yml@v0?

@sbillinge Would you be referring to the below uses cases below?

  tag-privilege-check:
    uses: ./.github/workflows/_release_tag_privilege_check.yml

  build-pure-python-package:
    needs: [tag-privilege-check]
    if: inputs.c_extension == false
    uses: ./.github/workflows/_build-pure-python-package.yml
...

For the relative paths above (./.github/...), it appears we aren't allowed to add @v0 shown below.

Screenshot 2024-11-17 at 11 26 03 AM

I assume it is because the top very workflow from pdffit2 has already checked out v0:

jobs:
  release:
    permissions:
      contents: write
    uses: Bilingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 # HERE

OK, so I think that means that it will all work as desired. We will check out v0 and v0 branch will contain the right versions of the yml's so we don't need v0 here, right? It just don't want any ambiguity that part of the script is using v0 and another is using main, which will sometimes work and sometimes not and therefore cause immense confusion. Please confirm that my understanding is correct and I can merge this.

bobleesj commented 1 week ago

We will check out v0 and v0 branch will contain the right versions of the yml's so we don't need v0 here

Yes, that's correct. We checkout v0 and we get even more reusable workflow through the relative paths within v0.