Skip to content

Commit

Permalink
Merge develop (#66)
Browse files Browse the repository at this point in the history
* 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

* Update HISTORY and bump versions

* Remove __future__ import (we don't need it anymore)

* We only support Python 3+

* Add `ssort`

* Sort methods with `ssort`

* Version bump

* Remove Python 3.5 support

* Remove Python 3.6 support and move 3.10 out of dev

* Upgrade macOS image to 13.2 (Xcode 13.2.1)

* Time `tox` execution

* Update HISTORY.rst

* Update supported Python versions

* Update Python image version

* Update HISTORY.rst

Bump version from current to 1.0.3

* Update config.yml

Use new Docker environment

* Update config.yml

Return to the Python orb approach

* Added note so contributors start from the develop branch

* Remove support for 3.6 in tests, add 3.10, 3.11

* Update pip before installing travis-tox

* Add Python 3.11 to some platforms in travis

* Resolve: Inconsistent sort for "Installed as dependency for" (#64)

* 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 <rbanffy@gmail.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: AndrejK <38130665+andrejkurusiov@users.noreply.github.com>
Co-authored-by: xatier <xatierlike@gmail.com>

* 'Refactored by Sourcery' (#67)

Co-authored-by: Sourcery AI <>

* Fix Flake8 flagged issues

* Apply Black

* Fix version numbers

* Fix f-strings

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Kevin Paulson <kevin.paulson@mindbridge.ai>
Co-authored-by: AndrejK <38130665+andrejkurusiov@users.noreply.github.com>
Co-authored-by: xatier <xatierlike@gmail.com>
Co-authored-by: Ricardo Bánffy <ricardo@gmail.com>
  • Loading branch information
6 people authored Apr 15, 2023
1 parent c32c458 commit ba5149f
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
python: circleci/python@0.2.1
python: circleci/python@2.1.1

jobs:
build-and-test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
53 changes: 15 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,50 @@

# command to install dependencies, e.g. pip install -r requirements.txt
install:
- pip install tox-travis
- pip install --upgrade pip
- pip install tox-travis

# command to run tests, e.g. python setup.py test
script: tox
script: time tox

# Globals
language: python
dist: focal
os: linux
osx_image: xcode13.2

jobs:
include:
- arch: amd64
python: 3.5
- arch: amd64
python: 3.6
- arch: amd64
python: 3.7
- arch: amd64
python: 3.8
- arch: amd64
python: 3.9
- arch: amd64
python: 3.10-dev
python: 3.10
- arch: amd64
python: 3.11

- arch: arm64
python: 3.5
- arch: arm64
python: 3.6
- arch: arm64
python: 3.7
- arch: arm64
python: 3.8
- arch: arm64
python: 3.9
- arch: arm64
python: 3.10-dev
python: 3.10
- arch: arm64
python: 3.11

- arch: ppc64le
python: 3.5
- arch: ppc64le
python: 3.6
- arch: ppc64le
dist: bionic
python: 3.7
- arch: ppc64le
python: 3.8
- arch: ppc64le
python: 3.9

- arch: s390x
python: 3.5
- arch: s390x
python: 3.6
- arch: s390x
dist: bionic
python: 3.7
- arch: s390x
python: 3.8
Expand All @@ -68,31 +55,21 @@ jobs:

- os: osx
language: generic
osx_image: xcode12.2
python: 3.5
env: PYTHON=3.5
- os: osx
language: generic
osx_image: xcode12.2
python: 3.6
env: PYTHON=3.6
- os: osx
language: generic
osx_image: xcode12.2
python: 3.7
env: PYTHON=3.7
- os: osx
language: generic
osx_image: xcode12.2
python: 3.8
env: PYTHON=3.8
- os: osx
language: generic
osx_image: xcode12.2
python: 3.9
env: PYTHON=3.9
- os: osx
language: generic
osx_image: xcode12.2
python: 3.10-dev
env: PYTHON=3.10-dev
python: 3.10
env: PYTHON=3.10
- os: osx
language: generic
python: 3.11
env: PYTHON=3.11
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
10 changes: 5 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ If you are reporting a bug, please include:
Fix Bugs
~~~~~~~~

Look through the GitHub issues for bugs. Anything tagged with "bug"
and "help wanted" is open to whoever wants to implement it.
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it. Remember to start from the
`develop` branch.

Implement Features
~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -101,14 +102,13 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
https://travis-ci.org/rbanffy/pip-chill/pull_requests
3. The pull request should work for Python 3.7+, and for PyPy. Check
https://travis-ci.org/rbanffy/pip_chill/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
----

To run a subset of tests::


$ python -m unittest tests.test_pip_chill
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
History
=======

1.0.2 (2023-04-15)
------------------
* Sort dependencies alphabetically in --verbose
* Use `ssort` to topologically sort code
* Update 3.11-dev to 3.11 on TravisCI
* Remove support for Python 3.5 and 3.6
* Update README.rst with --no-chill switch
* Bump version to 1.0.2

1.0.1 (2021-01-18)
------------------

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
5 changes: 1 addition & 4 deletions pip_chill/cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function
#!/usr/bin/env python3

import argparse

Expand Down
35 changes: 19 additions & 16 deletions pip_chill/pip_chill.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,14 @@ def get_name_without_version(self):
Return the name of the package without a version.
"""
if self.required_by:
return "# {} # Installed as dependency for {}".format(
self.name, ", ".join(self.required_by)
return (
f"# {self.name} # Installed as dependency for "
f"{', '.join(sorted(self.required_by))}"
)
return self.name

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

def __repr__(self):
return '<{}.{} instance "{}">'.format(
self.__module__, self.__class__.__name__, self.name
)
def __lt__(self, other):
return self.name < other.name

def __eq__(self, other):
if self is other:
Expand All @@ -44,12 +36,23 @@ def __eq__(self, other):
else:
return self.name == other

def __lt__(self, other):
return self.name < other.name

def __hash__(self):
return hash(self.name)

def __repr__(self):
return (
f'<{self.__module__}.{self.__class__.__name__} instance "'
f'{self.name}">'
)

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


def chill(show_all=False, no_chill=False):
if show_all:
Expand Down
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ flake8
nose
pytest
sphinx
ssort
tox
twine
watchdog
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.1
current_version = 1.0.2
commit = True
tag = True

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="pip-chill",
version="1.0.1",
version="1.0.2",
description="Like `pip freeze` but lists only the packages that are not "
"dependencies of installed packages.",
long_description=readme + "\n\n" + history,
Expand All @@ -39,11 +39,11 @@
"OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development",
],
test_suite="tests",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pip_chill.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_command_line_interface_omits_ignored(self):

result = os.popen(command).read()
for package in ["wheel", "setuptools", "pip"]:
self.assertFalse(any(p.startswith(package + "==") for p in result.split("\n")))
self.assertFalse(any(p.startswith(f"{package}==") for p in result.split("\n")))

def test_command_line_interface_all(self):
command = "pip_chill/cli.py --all"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py35, py36, py37, py38, py39, bandit, flake8
envlist = py37, py38, py39, py310, py311, bandit, flake8

[testenv:bandit]
basepython=python3
Expand Down

0 comments on commit ba5149f

Please sign in to comment.