Skip to content

Modernize building and CI and fix bugs due to SymPy upgrades#22

Merged
chenpeizhi merged 47 commits intomasterfrom
pep621
Sep 16, 2025
Merged

Modernize building and CI and fix bugs due to SymPy upgrades#22
chenpeizhi merged 47 commits intomasterfrom
pep621

Conversation

@chenpeizhi
Copy link
Collaborator

@chenpeizhi chenpeizhi commented Sep 3, 2025

This pull request modernizes, streamlines, and fixes the project's configuration, CI/CD workflows, documentation, and unit tests. It replaces legacy CI files and Python setup logic with new, platform-specific GitHub Actions workflows for Ubuntu, macOS, and Windows, utilizing the latest actions and dependency management tools. The documentation is updated to reflect these changes, and several obsolete IDE and CI configuration files are removed. A few code improvements have also been made for compatibility, maintainability, and correctness.

Continuous Integration Modernization:

  • Added new GitHub Actions workflows for Ubuntu, macOS, and Windows, each with dedicated build and test jobs using the latest actions, Python setup, and uv for dependency management. Coverage reporting is now handled via Coveralls in the Ubuntu workflow. (.github/workflows/ubuntu.yml, .github/workflows/macos.yml, .github/workflows/windows.yml) [1] [2] [3]
  • Removed legacy CI files and scripts, including Travis CI and old GitHub Actions workflow, to fully migrate to the new system. (.travis.yml, .github/workflows/pythonapp.yml) [1] [2]

Documentation Updates:

  • Added a new README.md with badges, revised descriptions, and updated installation instructions for the new workflows and tools; removed the old README.rst. [1] [2]
  • Added a Citation section to README.md.

Repository and Build Configuration Cleanup:

  • Removed obsolete IDE configuration files and project metadata to declutter the repository. (.idea/*, .ycm_extra_conf.py) [1] [2] [3] [4] [5] [6] [7] [8]
  • Used pyproject.toml together with setup.py and MANIFEST.in for building and packaging in accord with PEP 621.
  • Used uv to lock the versions of the dependencies.

Codebase Maintenance:

chenpeizhi and others added 19 commits September 1, 2025 22:05
…d has been deprecated, functionality tested and no changes on tests

2) Slight wording change on comment of EnumSymbs class
3) Added __getstate__() and __setstate__() functions to EnumSymbs class as pickling was using default __getstate__() provided by basic which just returns null. This allows pickling to account for and store slotted variables and fixes basic_wick_test.py::test_ancr_character_has_basic_properties
…ted README badges (#21)

Also attempt to fix the Windows build, without success.
Copilot AI review requested due to automatic review settings September 3, 2025 06:36

This comment was marked as outdated.

@chenpeizhi chenpeizhi self-assigned this Sep 3, 2025
@chenpeizhi chenpeizhi changed the title Modernize building, packing, and CI in accord with PEP 621 Modernize building, packaging, and CI in accord with PEP 621 Sep 3, 2025
@chenpeizhi
Copy link
Collaborator Author

@Wholinator Hi Matthew, could you try to figure out what's going on with the Windows build? I don't have a Windows machine. It will be easier if you could build Drudge locally on Windows. I'll tell you tomorrow how to use uv to manage the package.

@chenpeizhi chenpeizhi requested a review from Copilot September 6, 2025 20:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request modernizes the project's build infrastructure by migrating from legacy CI systems to modern GitHub Actions workflows and adopting PEP 621 standards for Python packaging. It also includes several code fixes for compatibility with newer SymPy versions and improves C++ extension handling.

  • Replaced legacy Travis CI and old GitHub Actions with new platform-specific workflows (Ubuntu, macOS, Windows)
  • Migrated from setup.py-only packaging to pyproject.toml with PEP 621 compliance
  • Fixed SymPy compatibility issues and updated test configurations

Reviewed Changes

Copilot reviewed 21 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/*.yml New GitHub Actions workflows for cross-platform CI/CD
pyproject.toml New PEP 621 compliant project configuration
setup.py Simplified setup script with platform-specific compiler flags
tests/*.py Test fixes for SymPy compatibility and fixture scoping
drudge/*.py Code fixes for SymPy upgrades and Python compatibility
drudge/*.cpp C++ code improvements for better Python integration
Files not reviewed (7)
  • .idea/dictionaries/tschijnmo.xml: Language not supported
  • .idea/drudge.iml: Language not supported
  • .idea/encodings.xml: Language not supported
  • .idea/inspectionProfiles/profiles_settings.xml: Language not supported
  • .idea/misc.xml: Language not supported
  • .idea/modules.xml: Language not supported
  • .idea/vcs.xml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chenpeizhi
Copy link
Collaborator Author

chenpeizhi commented Sep 6, 2025

The failed unit tests were mostly due to SymPy upgrades. All the tests now pass on Ubuntu and macOS.

@chenpeizhi chenpeizhi changed the title Modernize building, packaging, and CI in accord with PEP 621 Modernize building and CI and fix bugs due to SymPy upgrades Sep 6, 2025
Copy link
Collaborator

@gauravharsha gauravharsha left a comment

Choose a reason for hiding this comment

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

Requesting minor changes before we can merge

Copy link
Collaborator

@gauravharsha gauravharsha left a comment

Choose a reason for hiding this comment

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

Small question with ci.yml, but otherwise we should merge it.

Also, regarding the windows.yml, we can make an executive decision to not support native windows platform, but instead offer support through WSL or Anaconda?

@chenpeizhi
Copy link
Collaborator Author

Small question with ci.yml, but otherwise we should merge it.

Also, regarding the windows.yml, we can make an executive decision to not support native windows platform, but instead offer support through WSL or Anaconda?

Yes, let's ask Windows users to use WSL for now.

@chenpeizhi chenpeizhi requested a review from Copilot September 16, 2025 16:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 21 out of 30 changed files in this pull request and generated 3 comments.

Files not reviewed (7)
  • .idea/dictionaries/tschijnmo.xml: Language not supported
  • .idea/drudge.iml: Language not supported
  • .idea/encodings.xml: Language not supported
  • .idea/inspectionProfiles/profiles_settings.xml: Language not supported
  • .idea/misc.xml: Language not supported
  • .idea/modules.xml: Language not supported
  • .idea/vcs.xml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenpeizhi chenpeizhi merged commit 384acfc into master Sep 16, 2025
2 of 4 checks passed
@obackhouse obackhouse mentioned this pull request Sep 16, 2025
@chenpeizhi chenpeizhi deleted the pep621 branch September 17, 2025 01:48
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.

6 participants