Skip to content

Doc: improve Usage section #143

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 5 commits into from
Oct 1, 2019

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented Sep 30, 2019

This PR fixes #142. I know, the PR is quite extensive, but it basically boils down to the usage.rst file:

  • Use descriptive titles (verb+ing) to better find the topic
  • Structure the content with (sub)sections
  • Try to structure the different sections with list if there are different options to make it more readable
  • Document other, possible unknown features

I also changed the index.rst file as I think it can be simplified a bit as well (see commit
4d15b25 for the details). Hopefully the comments in the commits make it clear what I did.

I recommend to build the doc with tox -e docs and to look into the HTML pages.

What do you think? 😉

Currently, the version of semver is imported (using
from semver import __version__).

To avoid importing semver, version string could be managed
through bumpversion2. However, this is out of scope for
this PR.
* Improve main title with semver's version and a catchy phrase
* Move the |latest-version| placeholder to the other placeholders
  like build status, downloads etc.
* Remove the "Welcome bla" heading as it introduces a lonly section
  and it is mostly useless
* Add a short explanation about the "version style" major.minor.patch
  (cited from semver.org)
* Reference the other parts with just the filename (with the .rst extension)
  and without the title. The title is automatically retrieved from
  the file, no need to repeat it. This makes the overall doc more consistent.
* Change py.test -> pytest
* Use descriptive titles (verb+ing) to better find the topic
* Structure the content with (sub)sections
* Try to structure the different sections with list if there
  are different options to make it more readable
* Document other, possible unknown features
@tomschr tomschr changed the title improve doc Doc: improve Usage section Sep 30, 2019
@tomschr
Copy link
Member Author

tomschr commented Sep 30, 2019

It seems, Travis CI complains about a flake issue that appears in Python 3.4 only. The respective error message (line breaks introduced by me) looks like this:

flake8 installed: DEPRECATION: Python 3.4 support has been deprecated. 
pip 19.1 will be the last one supporting it. 
Please upgrade your Python as Python 3.4 won't be maintained after
March 2019 (cf PEP 429)

@s-celles
Copy link
Member

Should we drop Python 3.4 support in this library for this reason?

@tomschr
Copy link
Member Author

tomschr commented Sep 30, 2019

Should we drop Python 3.4 support in this library for this reason?

That depends on if you still want to support version 3.4. 😉 If a significant amount of your user base still use it, then it would probably a bad idea. But maybe you should "advertise" it first, for example, in an issue and in the changelog.

Funny side note: I've try to check when version 3.4 was released. I even can't select it in https://docs.python.org from the drop-down menu. 😉

If you still want to support version 3.4, you could have replace flake8 with another linter/checker. For example, pystylecode, pylint and probably many others are available.

@ppkt
Copy link
Member

ppkt commented Sep 30, 2019

@tomschr I think problem is somewhere else, from logs it's an import statement: https://travis-ci.org/k-bx/python-semver/jobs/591505916#L301 . In my opinion you can just silence it:

from semver import __version__  # noqa: E402

Regarding Python 3.4 - I think we should support it as long as it's possible. While I love using new features, probably there is a lot of users who are still using older Python versions (especially 2.7 which will reach EOL status in 3 months: https://pythonclock.org/)

Copy link
Member

@ppkt ppkt left a comment

Choose a reason for hiding this comment

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

looks really good, thank you :)

@tomschr
Copy link
Member Author

tomschr commented Sep 30, 2019

@ppkt Ok Karol, I've added the respective line on the import to silence flake. Let's hope it works. 😉

Regarding Python 3.4 - I think we should support it as long as it's possible. While I love using new features, probably there is a lot of users who are still using older Python versions (especially 2.7 which will reach EOL status in 3 months: https://pythonclock.org/)

I fully agree. 👍

@s-celles s-celles merged commit ecb0736 into python-semver:master Oct 1, 2019
@s-celles
Copy link
Member

s-celles commented Oct 1, 2019

Thanks @tomschr for this other nice PR

@tomschr tomschr deleted the feature/improve-doc branch October 1, 2019 06:35
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.

Doc: Improve Usage Section
3 participants