Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

redundant apts[:,i]-apts[:,i] expressions #12

Open
chrisrichardson opened this issue Jun 13, 2014 · 3 comments
Open

redundant apts[:,i]-apts[:,i] expressions #12

chrisrichardson opened this issue Jun 13, 2014 · 3 comments

Comments

@chrisrichardson
Copy link
Contributor

Original report by Nico Schlömer (Bitbucket: nschloe, GitHub: nschloe).


Lines like https://bitbucket.org/fenics-project/fiat/src/550063505522529f9a6c3875007a3c0277d819f0/FIAT/newdubiner.py?at=master#cl-145

results[0,:] = 1.0 + apts[:,0]-apts[:,0]+apts[:,1]-apts[:,1]+apts[:,2]-apts[:,2]

look buggy

0 == apts[:,0]-apts[:,0] + apts[:,1]-apts[:,1] + apts[:,2]-apts[:,2]

There are more of the same kind, e.g., https://bitbucket.org/fenics-project/fiat/src/550063505522529f9a6c3875007a3c0277d819f0/FIAT/expansions.py?at=master#cl-143.

@chrisrichardson
Copy link
Contributor Author

Original comment by Miklós Homolya (Bitbucket: miklos1, GitHub: miklos1).


This is unfortunately, but unsurprisingly causing flake8 errors. However, if we want to enable flake8 in the continuous integration system, then the code must be made flake8 clean, otherwise the build will constantly be red. I'm wondering which of these options is better:

  1. Remove offending code. Since the code is already broken, it is safe to assume that currently no one uses it.
  2. Fix the problematic code. This would be nice, however, it would take time and effort, while no one seems to need it at the moment.
  3. Comment out broken code. This could make sense if we expected that someone would need this functionality in the future, and that the current broken code is a good basis for producing working code.
  4. Give up enabling flake8 in CI.

Edit: @David_Ham has attempted to fix some of these in firedrakeproject#3.

@chrisrichardson
Copy link
Contributor Author

Original comment by Garth N. Wells (Bitbucket: garth-wells, GitHub: garth-wells).


I suggest removing it.

@chrisrichardson
Copy link
Contributor Author

Original comment by Miklós Homolya (Bitbucket: miklos1, GitHub: miklos1).


Offending code was removed in pull request #11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant