Skip to content

[MRG] flake8 + pimp example figures #13

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

Merged
merged 19 commits into from
Jul 20, 2017
Merged

Conversation

agramfort
Copy link
Collaborator

@rflamary @ncourty any opinion on this? shall I continue?

big questions are

  • ok to adopt pep8?
  • do you agree to use py.test for more standard testing mechanism?

don't merge yet. Just tell me what you think.

@rflamary
Copy link
Collaborator

Hello @agramfort ,

  • I agree with pep8 adoption even though some of the rules are dated (80 characters is tough when you have classes). In fact I was working with autopep8 to clean this with no headaches but I think you are more competent than me here.

  • py.test is also better and we will add some proper tests at least for the main functions quickly. Clearly those with GPU cannot build and run on travis so they should be optional (i dont kow how to do that with pytest other than removing the files).

Also I know I use pl instead of plt but it felt so much better at the time (still feels better trust me). Still i understand the need to make the examples more friendly to newcomers.

@ncourty how so you feel about all that?

@ncourty
Copy link
Collaborator

ncourty commented Jul 12, 2017

Hello @agramfort and @rflamary,

  • Clearly we should go for a strict application of pep8 recommendations, even if I do agree with @rflamary that some of them are outdated (I've read several passionate discussions on the 80 chars here and there). Being compliant with pep8 standards, even if too restrictive, is a big plus IMO

  • Regarding pytest, I also do agree that it is one of the best option available for unitary tests and continuous integration, so I think it's also good practice. We need to level up on how to use it though, but it does not seem too complicated.

  • Regarding pl. vs plt., I have seen both versions on many codes. @agramfort, is there a standard here (maybe part of pep8 ?)

@agramfort
Copy link
Collaborator Author

agramfort commented Jul 12, 2017 via email

@rflamary
Copy link
Collaborator

Hello,

Thank you for the work, it looks great I just have small remarks:

  • full flake8 valid is awesome !
  • you did no change all pl to plt, probably because we did no concrge with @ncourty. Sp we need to do it quickly I suppose.

Regarding your remarks:

  • CG here stands for conditional gradient and not conjugate gradient as implemented in scipy.
  • OK for switch to make but all examples and notebooks have to be updated also.
  • Example do not have a proper description yet and I agree we need to complete it with
  • I always thought this choice (params in init) in sklearn was weird since it make it more complicated to perform warm start with a slightly different regularization (in a reg path for instance) value which is common practice in ML. I'm sure you have good reasons for it though. my problem here is that it breaks the code for people who already use the toolbox and I'd like to keep the young and still small community.. Maybe do both for a while with a Deprecated Warning?
  • I agree we should stick to Camel or snake but i personally prefer snake and most of the toolbox is in snake, do you suggest the change for Classes only?, is it a common thing to do ?
  • I agree that the choice for cudamat is probably not the best. We were planing with Nico to switch to a more future proof code with pycuda.

I'll work on the test next week when I don't have NIPS review to write.

@agramfort
Copy link
Collaborator Author

agramfort commented Jul 13, 2017 via email

@rflamary
Copy link
Collaborator

rflamary commented Jul 20, 2017 via email

@agramfort agramfort changed the title [WIP] flake8 + pimp example figures [MRG] flake8 + pimp example figures Jul 20, 2017
@agramfort
Copy link
Collaborator Author

agramfort commented Jul 20, 2017 via email

@rflamary
Copy link
Collaborator

Yeah we are OK with the merge but just wait for travis to merge.

Seems from early results that some PEP8 error remain.

Thank you again

@agramfort
Copy link
Collaborator Author

all green !

@rflamary rflamary merged commit 871302f into PythonOT:master Jul 20, 2017
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