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

Sync updates from upstream #510

Merged
merged 79 commits into from
May 15, 2024
Merged

Sync updates from upstream #510

merged 79 commits into from
May 15, 2024

Conversation

utensil
Copy link
Member

@utensil utensil commented Apr 1, 2024

Addresses #505 .

This PR aims to:

  • incorporate the files from upstream, as is when possible, but avoid breaking compatibilities within this PR
  • lint the code
  • add the notebooks from upstream and use them as tests
  • markers like GSG code starts/ends will be kept to make it easier to identify the added code and distinguish it with other changes between 0.5.0 and 0.5.1, as well as GSG's other proposed changes
  • raise discussions about the changes the break previous tests
  • add documentations for new APIs (there are basic docs, I choose to use follow-up PRs to improve)

The goal here is to make it a foundation for merging other people's work, and avoid accidentally rolling back previous work (check v0.5.0...v0.5.1 to decide what to keep when there is code conflict).

The strategy is to add them and fix them file by file.

TODOs:

  • Add Python files
    • Add mv
    • Add lt
    • Add gprinter
    • Add GAlgebraInit (renamed to primer)
  • Add notebooks (They are put into examples/primer, and GAlgebraOutput.ipynb is renamed to gprint.ipynb, and the rest are ensured to be in lowercase.)
  • Ensure test coverage (with primer notebooks: -1.65%; with undual tests: -1.10%; with lt tests: -0.55%; with mv tests: +0.38%)
  • Add change log
  • Check new API doc
  • Investigate the diff of lin_tran_check
  • Investigate the diff of test_gsg_undual_etc.ipynb
  • Add the migration guide for the readers of LAGA&VAGC

utensil and others added 4 commits April 1, 2024 16:02
These changes are just additions, causing no conflict with existing code.

Markers like `GSG code starts/ends` are kept to make it easier to identify the added code and distinguish it with other changes between 0.5.0 and 0.5.1, as well as GSG's other proposed changes.

Co-authored-by: Greg Grunberg <[email protected]>
@utensil
Copy link
Member Author

utensil commented Apr 2, 2024

The new norm break the following test:

    def test_abs(self):
        ga, e_1, e_2, e_3 = Ga.build('e*1|2|3', g=[1, 1, 1])
        B = ga.mv('B', 'bivector')
        assert abs(B*B) == -(B*B).scalar()

Seems fixable by using metric.square_root_of_expr instead of sqrt

image

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 75.91623% with 92 lines in your changes are missing coverage. Please review.

Project coverage is 78.95%. Comparing base (d4d09bd) to head (0defe0c).

Files Patch % Lines
galgebra/lt.py 75.33% 37 Missing ⚠️
galgebra/gprinter.py 74.16% 31 Missing ⚠️
galgebra/primer.py 0.00% 15 Missing ⚠️
galgebra/mv.py 89.74% 8 Missing ⚠️
galgebra/metric.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #510      +/-   ##
==========================================
+ Coverage   78.05%   78.95%   +0.90%     
==========================================
  Files          17       19       +2     
  Lines        4196     4400     +204     
==========================================
+ Hits         3275     3474     +199     
- Misses        921      926       +5     

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

utensil and others added 2 commits April 2, 2024 10:45
Removed code conflicting about `Matrix_to_dictionary` and `inspect.getfullargspec`.

Co-authored-by: Greg Grunberg <[email protected]>
@utensil
Copy link
Member Author

utensil commented Apr 2, 2024

CI is green for mv.py except dropped test coverage. d853c70

@utensil utensil added the state: needs changelog Needs a changelog entry before the next release. Remove this label when the changelog is done. label Apr 2, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@utensil
Copy link
Member Author

utensil commented Apr 2, 2024

The changes to test outputs of simple_ga_test are just using covariant/contravariant notation instead of writing all indexes as subscripts, this was suggested in #475 .

image

The changes to test outputs of lin_tran_check is much significant and looks suspicious:

image

Will investigate later. The current green CI is a delusion for now. The visual diff is at: https://app.reviewnb.com/pygae/galgebra/commit/33a33fbefc67a480e7f0565273cc16b0e34f8d09/

utensil and others added 5 commits April 2, 2024 15:42
They are put into examples/primer, and `GAlgebraOutput.ipynb` is renamed to `gprint.ipynb`, and the rest are ensured to be in lowercase.

Co-authored-by: Greg Grunberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs changelog Needs a changelog entry before the next release. Remove this label when the changelog is done. state:ready_to_merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant