Page MenuHomeFreeBSD

[NEW] misc/thefuck: App that corrects your previous console command
ClosedPublic

Authored by ygy on Dec 12 2017, 7:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 1:23 AM
Unknown Object (File)
Nov 16 2024, 5:23 AM
Unknown Object (File)
Nov 4 2024, 7:48 AM
Unknown Object (File)
Oct 30 2024, 9:09 AM
Unknown Object (File)
Oct 30 2024, 9:09 AM
Unknown Object (File)
Oct 30 2024, 9:08 AM
Unknown Object (File)
Oct 30 2024, 9:08 AM
Unknown Object (File)
Oct 30 2024, 9:07 AM
Subscribers

Details

Summary

thefuck is a magnificent app which corrects your previous console command.

URI:https://github.com/nvbn/thefuck/
PyPI: https://pypi.python.org/pypi/thefuck/

Skipped the TEST_DEPENDS and do-test for now, since the test suite is not currently in the PyPI releases. Will add the test section once test cases were added back in the release.

It is my first new port, so any feedback would be more than welcome!

[NEW] misc/thefuck: Magnificent app which corrects your previous console command

PR: 224263
Reviewed_by: yuri
Approved_by: adamw
Differential_Revision: https://reviews.freebsd.org/DXXXXX
Test Plan

testport: OK (11.1-RELEASE amd64, 10.4-RELEASE i386)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

misc/thefuck/Makefile
20 ↗(On Diff #36491)

It doesn't need any RUN_DEPENDS?

Switched to use RUN_DEPENDS and rearranged the dependency list.

ygy marked an inline comment as done.Dec 13 2017, 3:35 AM

Ah, they all should be RUN_DEPENDS then...

One unrelated question: if this port is intended to use as a utility only (but not a Python module), is it better to exclude it from the python virtual category?

In D13460#281567, @ygy wrote:

Ah, they all should be RUN_DEPENDS then...

Otherwise, when people pkg install py36-thefuck, none of the dependencies will be installed.

One unrelated question: if this port is intended to use as a utility only (but not a Python module), is it better to exclude it from the python virtual category?

Take a look at https://www.freshports.org/python. There are tons of non-module ports in the python category. I think it's completely appropriate to include it there too.

This looks good to me! Don't forget to add it to misc/Makefile when you commit it.

This revision is now accepted and ready to land.Dec 13 2017, 3:51 AM

Wait, sorry @ygy, hold off. I think @yuri is right about the concurrent.

ygy planned changes to this revision.Dec 13 2017, 5:55 AM

The word magnificent essentially expresses somebody's opinion. IMO, it shouldn't be used in package descriptions, because other people might have different opinions. It should stick to facts. :)

Take a look at https://www.freshports.org/python. There are tons of non-module ports in the python category. I think it's completely appropriate to include it there too.

Right! Also a follow-up question: Should utilities depending on Python have the prefix py-? Like, in this case, should I change the name to misc/py-thefuck, or the package name will be py-thefuck anyway?

In D13460#281614, @yuri wrote:

The word magnificent essentially expresses somebody's opinion. IMO, it shouldn't be used in package descriptions, because other people might have different opinions. It should stick to facts. :)

I think you are right. But still, it is magnificent to me :-)

ygy added a reviewer: yuri.
ygy removed a subscriber: yuri.

Update as the reviewers requested.

In D13460#281785, @ygy wrote:

Right! Also a follow-up question: Should utilities depending on Python have the prefix py-? Like, in this case, should I change the name to misc/py-thefuck, or the package name will be py-thefuck anyway?

My general rule of thumb is that if users are going to look for "thefuck the python module", make it py-thefuck. If users are looking only for "thefuck the program", and they aren't likely to care whether it's written in python, perl, or COBOL, make it just thefuck.

If you do make it just thefuck, I'd skip the automatic flavouring as it doesn't really make sense for a standalone executable. IOW, remove the PKGNAMEPREFIX, and replace USE_PYTHON=concurrent with USE_PYTHON=noflavors.

misc/thefuck/Makefile
1 ↗(On Diff #36572)

New ports shouldn't have Created by any more.

23 ↗(On Diff #36572)

USE_PYTHON is usually expected to be sorted.

misc/thefuck/pkg-descr
1 ↗(On Diff #36572)

I would remove the word magnificent here too.

misc/thefuck/pkg-descr
10 ↗(On Diff #36572)

The home page is listed as https://pypi.python.org/pypi/thefuck there.

misc/thefuck/Makefile
23 ↗(On Diff #36572)

Got it. Do you think changing concurrent to noflavors is a good idea?

misc/thefuck/pkg-descr
10 ↗(On Diff #36572)

Hmm.. I didn't get what you are saying..

misc/thefuck/Makefile
1 ↗(On Diff #36572)

Yuri's completely right that new ports are preferred without the Created by: line, but I am still happy to commit ports that have them (and when I create ports, I still put them in).

23 ↗(On Diff #36572)

It comes down to the discussion above. Are users going to say "I want the python module called thefuck, and only if it's written in python" or are they going to say "I want the program called thefuck and I don't care what it's written in"? If it's the latter, then yes I'd change concurrent to noflavors, and remove PKGNAMEPREFIX. If you have PKGNAMEPREFIX, you must have concurrent and not noflavors.

misc/thefuck/pkg-descr
1 ↗(On Diff #36572)

It's part of the copy from the website. It's appropriate to use the word here.

10 ↗(On Diff #36572)

It was a copy/paste mixup. He means that on pypi, the homepage is listed as https://github.com/nvbn/thefuck so that should be the WWW.

In D13460#281785, @ygy wrote:

Right! Also a follow-up question: Should utilities depending on Python have the prefix py-? Like, in this case, should I change the name to misc/py-thefuck, or the package name will be py-thefuck anyway?

My general rule of thumb is that if users are going to look for "thefuck the python module", make it py-thefuck. If users are looking only for "thefuck the program", and they aren't likely to care whether it's written in python, perl, or COBOL, make it just thefuck.

If you do make it just thefuck, I'd skip the automatic flavouring as it doesn't really make sense for a standalone executable. IOW, remove the PKGNAMEPREFIX, and replace USE_PYTHON=concurrent with USE_PYTHON=noflavors.

USE_PYTHON=noflavors: if this is a standalone app, and it doesn't have usable by others modules, using noflavors is a good idea. If it has usable modules, then concurrent should be used. I am not sure if thefuck has usable modules.

Just keep USE_PYTHON=concurrent if in doubt.

misc/thefuck/Makefile
23 ↗(On Diff #36572)

About sorting, there are two kind of people, those belonging to the sort police that think it is always better to sort everything even if it does not make any sense, and those who have a more pragmatical way.

In this case, USE_PYTHON= distutils autoplist is better because autoplist depends on distutils, so having it after is better. concurrent works in any case, so the order is not important.

This revision is now accepted and ready to land.Dec 15 2017, 8:57 AM

@yuri you are still being mentored, so any “approval” you give would also have to be reviewed by your mentors. Also, whilst it is good to be eager to do things, there are still many things you do not know, so please, concentrate on your reviews, the one with the patches you send for now. Please.

In D13460#282336, @mat wrote:

@yuri you are still being mentored, so any “approval” you give would also have to be reviewed by your mentors. Also, whilst it is good to be eager to do things, there are still many things you do not know, so please, concentrate on your reviews, the one with the patches you send for now. Please.

Every person, no matter how experienced he is, still doesn't know many things when it comes to technology.
They asked for my approval, and I gave it. -)

ygy planned changes to this revision.Dec 16 2017, 6:37 AM
ygy marked 4 inline comments as done.
ygy retitled this revision from [NEW] misc/thefuck: Magnificent app which corrects your previous console command to [NEW] misc/thefuck: App that corrects your previous console command.Dec 18 2017, 2:23 AM
ygy edited the summary of this revision. (Show Details)

Can some progress be made on this? -)

In D13460#282914, @yuri wrote:

Can some progress be made on this? -)

Yuri, @ygy is a committer, and progress on this review will be between him and me. Please focus on your own reviews for now.

@adamw I prefer treating it as a utility which people will not care about which languages it uses, and just omitting the python prefix in the port name.

However, I find that once I switched from concurrent to noflavors, Python 2.7 (instead of 3.6) version of all the dependencies will be used during a poudriere testport. Do you have any clues about this?

ygy requested review of this revision.Dec 19 2017, 8:17 AM
ygy removed a reviewer: yuri.
ygy added a subscriber: yuri.

Ping, need review on the noflavors confusion.

If this provides modules that other will use, then this is right as it is. If it is only a command line tool, then use USE_PYTHON=noflavors.

I get what you are saying about this and I chose to take the "noflavors" road since the app will not be used as a module. However, I find that once I switched from concurrent to noflavors, Python 2.7 (instead of 3.6) version of all the dependencies will be used during a poudriere testport. Do you have any clues about this?

A testport log is attached.

If you use USE_PYTHON=noflavors, then the port is no longer flavored, so the FLAVOR variable is never set. You need to use PY_FLAVOR on all the dependencies.

ygy marked 7 inline comments as done.

Switch to use noflavors and add PY_FLAVORS.
Update the WWW link.

This looks good, and I think it's ready to go! Please add NO_ARCH= yes to thefuck/Makefile before committing.

This revision is now accepted and ready to land.Jan 4 2018, 1:53 PM
This revision was automatically updated to reflect the committed changes.