Skip to content

Commit

Permalink
Resolve: Inconsistent sort for "Installed as dependency for" (#64)
Browse files Browse the repository at this point in the history
* Added a --no-chill option (#36)

* Bump version to 1.0.1

* Fix failing Flake8 test

* Update history

* Add --no-chill command line option. Fixes #34

* Remove click and add black to the requirements file

* Version update

* Remove black - not a dev requirement

* 'Refactored by Sourcery' (#37)

Co-authored-by: Sourcery AI <>

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Version 1.0.1 (#40)

* Bump version to 1.0.1

* Fix failing Flake8 test

* Update history

* Add --no-chill command line option. Fixes #34

* Remove click and add black to the requirements file

* Version update

* Remove black - not a dev requirement

* 'Refactored by Sourcery' (#37)

Co-authored-by: Sourcery AI <>

* Update python-package.yml (#33)

* Circleci project setup (#39)

* Add .circleci/config.yml

* Add .circleci/config.yml

* Add .circleci/config.yml

* Update README with --no-chill switch

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Update github repo url (#50)

* Fix GitHub repo URL (#56)

Will fix Travis tests later

* Sort required_by

* Update README to match new output

* Update github repo url (#50)

* Fix GitHub repo URL (#56)

Will fix Travis tests later

* Sort required_by

* Update README to match new output

* Add to AUTHORS

---------

Co-authored-by: Ricardo Bánffy <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: AndrejK <[email protected]>
Co-authored-by: xatier <[email protected]>
  • Loading branch information
5 people committed Apr 15, 2023
1 parent 5844740 commit 9d4f398
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Development Lead
Contributors
------------

* Kevin Paulson https://github.com/kjwpaulson
* Luke Skibinski https://github.com/lsh-0
* Piotr Surowiec https://github.com/Agrendalath
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Types of Contributions
Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/rbanffy/pip_chill/issues.
Report bugs at https://github.com/rbanffy/pip-chill/issues.

If you are reporting a bug, please include:

Expand Down Expand Up @@ -46,7 +46,7 @@ articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/rbanffy/pip_chill/issues.
The best way to send feedback is to file an issue at https://github.com/rbanffy/pip-chill/issues.

If you are proposing a feature:

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Or, if you want to list package dependencies too::
# chardet==4.0.0 # Installed as dependency for requests
# colorama==0.4.4 # Installed as dependency for twine
# distlib==0.3.1 # Installed as dependency for virtualenv
# docutils==0.16 # Installed as dependency for sphinx, readme-renderer
# docutils==0.16 # Installed as dependency for readme-renderer, sphinx
# filelock==3.0.12 # Installed as dependency for tox, virtualenv
# gitdb==4.0.5 # Installed as dependency for gitpython
...
Expand Down
10 changes: 5 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To install PIP Chill, run this command in your terminal:
$ pip install pip_chill
This is the preferred method to install PIP Chill, as it will always install the most recent stable release.
This is the preferred method to install PIP Chill, as it will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
Expand All @@ -32,13 +32,13 @@ You can either clone the public repository:

.. code-block:: console
$ git clone git:https://github.com/rbanffy/pip_chill
$ git clone git:https://github.com/rbanffy/pip-chill
Or download the `tarball`_:

.. code-block:: console
$ curl -OL https://github.com/rbanffy/pip_chill/tarball/master
$ curl -OL https://github.com/rbanffy/pip-chill/tarball/master
Once you have a copy of the source, you can install it with:

Expand All @@ -47,5 +47,5 @@ Once you have a copy of the source, you can install it with:
$ python setup.py install
.. _Github repo: https://github.com/rbanffy/pip_chill
.. _tarball: https://github.com/rbanffy/pip_chill/tarball/master
.. _Github repo: https://github.com/rbanffy/pip-chill
.. _tarball: https://github.com/rbanffy/pip-chill/tarball/master
6 changes: 4 additions & 2 deletions pip_chill/pip_chill.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ def get_name_without_version(self):
Return the name of the package without a version.
"""
if self.required_by:
sorted_required_by = sorted(self.required_by)
return "# {} # Installed as dependency for {}".format(
self.name, ", ".join(self.required_by)
self.name, ", ".join(sorted_required_by)
)
return self.name

Expand All @@ -45,8 +46,9 @@ def __repr__(self):

def __str__(self):
if self.required_by:
sorted_required_by = sorted(self.required_by)
return "# {}=={} # Installed as dependency for {}".format(
self.name, self.version, ", ".join(self.required_by)
self.name, self.version, ", ".join(sorted_required_by)
)
return "{}=={}".format(self.name, self.version)

Expand Down

0 comments on commit 9d4f398

Please sign in to comment.