Skip to content

Conversation

@mdealencar
Copy link
Contributor

Supersedes #33

The HGS-CVRP changes from v2.0.0 to vidalt/HGS-CVRP@1a92795 involve a few extra args to AlgorithmParameters(), incorporated in PyHygese by this PR.

The build+publish workflow will build wheels for several 64bit platforms and is triggered manually or when a version tag is pushed ('v[0-9]+.[0-9]+.[0-9]+') to any PyHygese branch. The PyPI uploading uses the Trusted Publisher mechanism (the owner of project hygese needs to set it up - see next message for instructions).

It is possible to have the build system fetch the tag for setting project.version's value instead of using a hard-coded one in pyproject.toml, but that is not pursued in this PR.

This PR will also bump version to 0.0.0.11.

…nd PyPI upload as GitHub action; bump version to 0.0.0.11
@mdealencar
Copy link
Contributor Author

Setting up Trusted Publisher for PyHygese in PyPI:

login to your account
open "Your projects" -> "Publishing"
in "Add a new pending publisher" -> "GitHub":
    PyPI Project Name: hygese
    Owner: chkwon
    Repository name: PyHygese
    Workflow name: buildpublish.yml
    Environment name: pypi
The "Add" button concludes the process.

After you push a new version tag to any branch, e.g. 'v0.0.1', the action will do its thing and the project will be published and ready for pip install hygese.

@chkwon
Copy link
Owner

chkwon commented Mar 31, 2025

The auto release to PyPI is already setup with pypi.yml.

Do you think distributing wheels is a good idea for this package? I think the source distribution works with v0.0.0.10.

@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (ee055bb) to head (a6e4ced).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
hygese/hygese.py 0.00% 5 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (ee055bb) and HEAD (a6e4ced). Click for more details.

HEAD has 5 uploads less than BASE
Flag BASE (ee055bb) HEAD (a6e4ced)
9 4
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #34       +/-   ##
==========================================
- Coverage   97.67%   0.00%   -97.68%     
==========================================
  Files           4       4               
  Lines         215     219        +4     
==========================================
- Hits          210       0      -210     
- Misses          5     219      +214     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mdealencar
Copy link
Contributor Author

The auto release to PyPI is already setup with pypi.yml.

Do you think distributing wheels is a good idea for this package? I think the source distribution works with v0.0.0.10.

I think wheels are a great advantage to any project, particularly when there are compiled extensions such as here. With wheels the target system does not need a C++ compiler set up and the installation is much faster. There is always the sdist as a fallback if the platform is not covered.

…e the installed package instead of local folder
@mdealencar
Copy link
Contributor Author

There was a nasty issue resulting from the dropping of setup.py. The python -m build always operates away from the project tree, which means the compiled library file is never seen there. It happens that the way pytest was evoked in ci.yml relied on the hygese module within the project tree (which setup.py used to complement with the compiled library). I was unable to make pytest use the installed module for assessing coverage, because the --cov=hygese option would make it use the project tree instead (folder name on project root is the same name as the package).

There are three possible solutions to that:

  • move the source of hygese to project folder src/hygese (that's the one adopted by the latest commit)
  • change directory before running pytest (which may require moving the coverage report back to project root)
  • figure out the path to the installed hygese module and pass it to pytest

If you are ok with using the first option, I think this PR is ready to merge.

@mdealencar
Copy link
Contributor Author

FYI:

PyHygese is now available as hybgensea both in PyPI and conda-forge:

  • pip install hybgensea
  • conda install -c conda-forge hybgensea

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