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

Clarify documentation for v2 and v3 CLI/API differences #240

Closed
baileythegreen opened this issue Feb 17, 2021 · 6 comments · Fixed by #245
Closed

Clarify documentation for v2 and v3 CLI/API differences #240

baileythegreen opened this issue Feb 17, 2021 · 6 comments · Fixed by #245
Assignees
Labels
documentation documentation is unclear or incomplete
Projects
Milestone

Comments

@baileythegreen
Copy link
Contributor

@widdowquinn

This is one of the first things I think needs to be done; I've seen at least five separate instances (like #238 just now) of the exact same conversation where people try to use pyani v0.3+ commands with pyani v0.2.10. I ran into some confusion there myself when I was going over it. Seems like it would save time all around.

I'll assign it to myself (to work on in a few weeks), unless you want to do it?

@baileythegreen baileythegreen added the documentation documentation is unclear or incomplete label Feb 17, 2021
@baileythegreen baileythegreen self-assigned this Feb 17, 2021
@widdowquinn widdowquinn added this to the 0.3.0 milestone Feb 17, 2021
@widdowquinn widdowquinn self-assigned this Feb 17, 2021
@widdowquinn widdowquinn changed the title Clarify documentation Clarify documentation for v2 and v3 CLI/API differences Feb 17, 2021
@widdowquinn
Copy link
Owner

I'm happy for you to take it on if you like. It's been nagging at me for a while, so it would be great to get it clear enough that no new issues arise.

I wonder if a fake pyani script that informs users about their current version and the specific CLI they should be using might be a useful addition to v2.

(my plan was that v0.3 is at least kind of backwards-compatible via wrappers with the same names as the v2 scripts…)

@widdowquinn widdowquinn added this to To do in pyani via automation Feb 17, 2021
@baileythegreen
Copy link
Contributor Author

What do you mean by a fake script? Like just an example script that comes with the installation? Heavily commented?

@widdowquinn
Copy link
Owner

Essentially a script that, when called, does nothing but give a message to the user that they have v2 installed, but are trying to use a CLI command that only works in v3, and points them gently to some online documentation.

@baileythegreen
Copy link
Contributor Author

So, one that runs if they try to call pyani; except that's only going to work if the fake script is on their path, somehow. Might be an issue if they install version 2, then go away and come back to try to run it via the wrong CLI in a different location.

@widdowquinn
Copy link
Owner

The way I think we could make it work is via setuptools.setup() in the setup.py file.

We could define an entry_point which points to a function that returns an appropriate string to sys.stdout, e.g.

setuptools.setup(
    [...]
    entry_points={
        "console_scripts": [
            "pyani = pyani.pyani_tools:pyani_error_msg",
        ]
    },
    [...]
)

and, in pyani_tools.py:

def pyani_error_msg():
    msg = "This is the message for the user"
    sys.stdout.write(msg)

@widdowquinn
Copy link
Owner

widdowquinn commented Feb 17, 2021

The approach above would point pyani at the command-line to the error message, if v2 is installed. If v3 was later installed (and in the $PATH) it should override this. Or am I overlooking something?

widdowquinn added a commit that referenced this issue Mar 10, 2021
Removes outdated references to v0.1

Adds additional information for installation of v0.2 using conda,
pip, and from downloaded source code. Hopefully this is clearer.

Adds a more strident notice about the relationship between 0.2 and
0.3 (0.2 maintenance-only; default repo is 0.3; etc.)

Updated copyright years
@widdowquinn widdowquinn moved this from To do to In progress in pyani Mar 10, 2021
widdowquinn added a commit that referenced this issue Mar 10, 2021
Removes outdated references to v0.1

Adds additional information for installation of v0.2 using conda,
pip, and from downloaded source code. Hopefully this is clearer.

Adds a more strident notice about the relationship between 0.2 and
0.3 (0.2 maintenance-only; default repo is 0.3; etc.)

Updated copyright years
widdowquinn added a commit that referenced this issue Mar 10, 2021
Updates installation instructions with an emphasis on clarifying
that the default repository branch is the development version (v0.3)
and that conda/pip will install v0.2.
@widdowquinn widdowquinn linked a pull request Mar 10, 2021 that will close this issue
pyani automation moved this from In progress to Done Mar 30, 2021
widdowquinn added a commit that referenced this issue Mar 30, 2021
widdowquinn added a commit that referenced this issue Jun 22, 2021
Removes outdated references to v0.1

Adds additional information for installation of v0.2 using conda,
pip, and from downloaded source code. Hopefully this is clearer.

Adds a more strident notice about the relationship between 0.2 and
0.3 (0.2 maintenance-only; default repo is 0.3; etc.)

Updated copyright years
widdowquinn added a commit that referenced this issue Jun 22, 2021
Updates installation instructions with an emphasis on clarifying
that the default repository branch is the development version (v0.3)
and that conda/pip will install v0.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation is unclear or incomplete
Projects
pyani
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants