Skip to content

Conversation

utensil
Copy link
Member

@utensil utensil commented Sep 19, 2018

  • merge brombo/galgebra#15 based on pygae:master and resolve conflicts literally
  • setup CI preliminarily
  • Fixes tests under Python 2
  • Fixes tests under Python 3

@utensil
Copy link
Member Author

utensil commented Sep 19, 2018

Now there're 7 fails, 13 passes, because my PR has fixed all 10 tests and merging literally has kept 10 tests with 7 fails and 3 passes from the master branch, will check and clean up later.

@utensil
Copy link
Member Author

utensil commented Sep 19, 2018

image

@hugohadfield @arsenovic I don't have the permission to set up a CI for pygae/galgebra, can you help me with the permission? Thanks.

@hugohadfield
Copy link
Member

@utensil sorry I was asleep! Didn't realise I had set your permission settings wrong in the invite, you are now an owner in pygae, so hopefully you should be able to do everything you want without permission problems!

@utensil utensil force-pushed the 15-pip branch 2 times, most recently from b7a0500 to 01c9d7b Compare September 19, 2018 12:11
@arsenovic
Copy link
Member

i gave the galgebra group to admin rights for the galgebra repo,
its under repo settings-> collaborators and team

@utensil utensil changed the title [DON't MERGE YET] Merge brombo/galgebra#15 [READY] Merge brombo/galgebra#15 Sep 20, 2018
@utensil utensil self-assigned this Sep 20, 2018
@utensil
Copy link
Member Author

utensil commented Sep 20, 2018

@arsenovic @hugohadfield This PR has completed all 4 tasks and passes 12 tests under both py 2 & 3, please review, comments welcome. 😄

@utensil utensil requested a review from arsenovic September 20, 2018 14:07
Copy link
Member

@hugohadfield hugohadfield left a comment

Choose a reason for hiding this comment

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

Looks good :) Nice job Utensil!

Copy link
Member

@arsenovic arsenovic left a comment

Choose a reason for hiding this comment

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

i just glossed over these changes but they look good. glad to see the project start moving again.

global n,nbar
Fx = HALF*((x*x)*n+2*x-nbar)
global n, nbar
Fx = ((x * x) * n + 2 * x - nbar) / 2
Copy link
Member Author

Choose a reason for hiding this comment

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

Some doubts about the division here, will look into it later.

Copy link
Member Author

Choose a reason for hiding this comment

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

This was originally for a rational division. Better keep the HALF for now.

def sort_terms(self):
self.terms.sort(key=operator.itemgetter(1), cmp=Pdop.compare)
# self.terms.sort(key=operator.itemgetter(1))
self.terms.sort(key=cmp_to_key(Pdop.compare))
Copy link
Member Author

@utensil utensil Sep 21, 2018

Choose a reason for hiding this comment

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

It was using both key and cmp, and the cmp obviously contains more logics which I chose to keep instead of key.

setup.py Outdated
sys.argv.remove('--noconflict')
except Exception as e:
pass
ga_namespace = 'galgebra' if noconflict else ''
Copy link
Member Author

Choose a reason for hiding this comment

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

These are probably obsolete.

@utensil
Copy link
Member Author

utensil commented Sep 21, 2018

Thanks, then I'll merge after some small revision 😃

Here's a little change log besides changes in brombo/galgebra#15 :

  • .travis.yml: runs test_test.py and test_mv.py for py 2.7 & 3.6 using py.test, no coverage yet, installation is done by python setup.py install instead of setting pth
  • change the way of importing modules to make it compatible with both py 2 & 3, circular dependencies removed (except a few helper functions depending on them which can be at a better place or removed later)
    • use from . import in modules
    • use from galgebra.ga import-ish in tests
    • remove self-dependencies and the circular dependencies between mv and ga
  • fix illegal escape sequence warning by adding r prefix to strings with LaTeX in it
  • fix most of py3 compatiblity issues by 2to3 and __future__ imports
  • manually fix the following py3 compatibility issues:
    • make string type checking work under both 2 and 3 without importing unicode_literals from __future__
    • add a naive compiler.ast. flatten implementation to make it work under 3 (it's gone since 3)
    • fix Sdop.sort_terms by using key function with the help of functools.cmp_to_key (cmp is gone since 3)
    • fix bugs in _print_Derivative implementation in GaPrinter when handling the variables and the powers of them
  • .gitignore: add a few more file types

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.

3 participants