Enhance Windows compatibility and update CI configurations#212
Enhance Windows compatibility and update CI configurations#212hkmoon wants to merge 252 commits intobertiniteam:developfrom
Conversation
additionally, fix ctest folder
additionally, fix ctest folder
* chore: test for win32 * chore: use Release libraries for linking in windows * chore: use 1e-14 instead of 1e-15 * 1e-15 doesn't work in windows * chore: remove docker-compose.yml * chore: revert test list --------- Co-authored-by: HongKee Moon <moon@mpi-cbg.de>
scipy stopped shipping manylinux_2_17 wheels in 1.14, so the per-Python 'pip install scipy' (needed for eigenpy's find_scipy at configure time) fell back to source-building scipy on cp310/311/312/313 inside the manylinux2014 container and failed on missing OpenBLAS. manylinux_2_28 (glibc 2.28, AlmaLinux 8 base) has scipy binary wheels for cp39–cp313. Tradeoff: produced wheels require glibc 2.28+ (Ubuntu 18.04+, RHEL/CentOS 8+, Debian 10+) instead of 2.17.
a74ca56 added --no-index to the wheel install, which is the right intent (force the local wheel) but blocks pip from reaching PyPI for the transitive numpy dependency: "No matching distribution found for numpy". Install numpy from PyPI first, then bertini offline from dist/.
Ensure thread default precision matches static default precision for Boost.Multiprecision.
…ructors With init<long int> on line 371 still in place plus IMPLICITLY_CONVERTIBLE(int, T) registered later in ExposeFloat, Float(123) will still resolve cleanly.
|
I really like the documentation! I have a few notes about the Python docs:
|
Yes,
Can you check it if it's working? I am currently working on The current url is based on github.com/hkmoon, which should be replaced by b2 when the PR is merged. By the way, Bertini version is 2.0.0 in PyPI. Please check it when you have time. |
|
Hi! Thanks!!! I just want to be cautious: We shouldn't be using actual PyPI for development work through this PR... we should be using testpypi for this, until we get it all dialed in and make a release. Then releases should trigger to PyPI. But I'll still give it a try. |
|
@ofloveandhate Sure, you can manage the releases and versions. I wound't touch it anymore. You can also delete the current release in PyPI too. Let me know when all the things are merged into develop/main. Then, I will check all the information and documentation links are properly updated. Thanks a lot! |
|
Ok! So I think this remains before merging: (we're so close!)
and this will be done after I accept:
|
|
more todos:
|
because i was messing around with using xcode, and i like having a bunch of build folders apparently, that differ by their suffix.
* 📝 docs: add GitHub Pages site combining Doxygen (C++) and Sphinx (Python) Adds a unified docs site deployed under one github.io: a small landing page links to the existing Sphinx site at /python/ and a new Doxygen reference for the C++ core at /cpp/. Sphinx imports `bertini` from PyPI to keep CI fast; C++ docs use doxygen-awesome-css for a modern theme. Triggered on pushes to develop and version tags. * 📚 docs: update push branch in workflow to 'docs' * 📚 docs: update push branch in workflow from 'docs' to 'develop' * 🐛 docs(ci): create Doxygen output directory before build Doxygen only auto-creates a single directory level. The nested `build/docs/cpp` path needs `mkdir -p` first to avoid the "Output directory ... does not exist and cannot be created" error. * 🐛 docs(ci): only deploy to GitHub Pages from develop or tags The github-pages environment's branch-protection rule rejects deployments from non-default branches, so PR runs were failing at the deploy step despite a successful build. Gate the deploy job on the ref so PRs build for validation but don't attempt to publish. * 📚 docs: update workflow to trigger on 'docs' branch instead of 'develop' * 📚 docs: update workflow condition to trigger on 'docs' branch * 📝 docs: surface git commit hash and build date across the docs Compute the commit SHA and build date once in CI and inject into all three doc surfaces so users can identify which revision a deployed docs page reflects: - Doxygen: PROJECT_NUMBER override via stdin (no Doxyfile changes) - Sphinx: env vars BERTINI_GIT_SHA / BERTINI_BUILD_DATE override the existing gitpython lookup; appended to `release` so the sidebar shows `<sha7> (YYYY-MM-DD HH:MM UTC)` - Landing page: footer line links the short SHA to the GitHub commit Also switches the checkout to fetch-depth: 0 so gitpython works for local builds too. * 🐛 docs(sphinx): only inject local source paths if they have _pybertini.so Sphinx autodoc was producing empty stubs for every Python class and function on the deployed site. Root cause: conf.py unconditionally inserted the repo's `python/` source tree at the front of sys.path, which shadowed the pip-installed `bertini` package in CI. The source tree's `__init__.py` re-exports from `bertini._pybertini`, but the compiled `.so` only exists next to the installed package -- so `import bertini._pybertini` fell over and autodoc swallowed the error. Now we only prepend the source tree (or `bld/python_bindings`) if the binary extension actually lives there. CI's pip-installed package is no longer shadowed; local builds with `BERTINI_BUILD_DIR=/path/to/bld` or a populated source tree still work. Verified locally: detailed/multiprec.html went from a near-empty shell to a 556-line page with full autodoc'd class signatures. * 📝 docs(sphinx): show git commit info in PyBertini doc footer Override sphinx_rtd_theme's footer.html via the `extrafooter` block so every Python docs page shows "Built from <short-sha> on <date>" with a link to the GitHub commit. Values come from the html_context dict populated by the same env vars CI already sets. Adds matching styling to _static/custom.css. Falls back to no-op when env vars aren't set (local builds without git metadata). * 📚 docs: update GitHub repository links and workflow conditions * 🔧 chore: update publish conditions for TestPyPI and PyPI in workflow * ♻️ refactor(docs): enhance concurrency group naming for deployments --------- Co-authored-by: HongKee Moon <moon@mpi-cbg.de>
notably, this caused some example code (also committed in this PR) to not freeze caught in this process, but instead crash. i'd rather have crashes than freezes. also notably, the denominator in `StepsizeSatisfyingCriterionB` changed from `predictor_order+1` to `predictor_order+1.0` -- this was probably a source of integer arithmetic problems, and now we guarantee that it's not integer arithmetic down there
helps the example be more self-contained
This pull request introduces significant improvements to the build system and release workflow for the project, especially focusing on cross-platform compatibility and automated Python package publishing. The main highlights include the addition of a comprehensive GitHub Actions workflow for building and publishing Python wheels to PyPI/TestPyPI, enhancements for Windows compatibility, and updates to documentation and changelogs to reflect these changes.
Automated Build and Release Workflow:
.github/workflows/build-and-publish-to-pypi.yml) to automate building Python wheels for Linux, macOS, and Windows, and to publish them to PyPI, TestPyPI, and GitHub Releases. This workflow includes environment setup, dependency installation, platform-specific build steps, artifact uploading, and release signing.Windows Compatibility Improvements:
cmake/FindGMP.cmake,cmake/FindMPFR.cmake,cmake/FindMPC.cmake) to correctly locate and link against Windows-specific library filenames, improving build reliability on Windows. [1] [2] [3]core/CMakeLists.txtto set appropriate build flags and shared library options for MSVC, and improved Boost/Eigen3 detection and linking for cross-platform builds. [1] [2] [3] [4]Documentation and Changelog Updates:
CHANGELOG.mddocumenting recent changes, release preparations, and platform-specific notes, including new contributor acknowledgments.README.mdwith clear installation instructions for Linux, macOS, and Windows, and clarified wheel/platform support.CMake Modernization and Refactoring:
CMakeLists.txtto use modern CMake practices, improved project metadata, integratedjrl-cmakemodulesfor streamlined dependency management, and added options for documentation and testing.pythonsubdirectory in the build to avoid issues during the transition.These changes collectively streamline the build, test, and release process, making it easier to maintain and distribute the package across all major platforms.
References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
Check the github workflow: https://github.com/hkmoon/b2/actions/runs/23671693162
Use https://pypi.org/manage/project/pybertini/release/1.0.9/ for testing.