Skip to content

Commit a284f3b

Browse files
authored
Format CLI output with rich. (#74)
1 parent 42966a3 commit a284f3b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+572
-522
lines changed

.conda/meta.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ source:
1212
build:
1313
noarch: python
1414
number: 0
15+
skip: true # [py36]
1516
script: {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt
1617
entry_points:
1718
- pytask = _pytask.cli:cli
@@ -24,15 +25,15 @@ requirements:
2425
- setuptools
2526

2627
run:
27-
- python >=3.6
28+
- python
2829

2930
- attrs >=17.4.0
3031
- click
3132
- click-default-group
3233
- networkx
3334
- pluggy
3435
- pony >=0.7.13
35-
- colorama # [win]
36+
- rich
3637

3738
test:
3839
imports:

.github/workflows/continuous-integration-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
22-
python-version: ['3.6', '3.7', '3.8', '3.9']
22+
python-version: ['3.7', '3.8', '3.9']
2323

2424
steps:
2525
- uses: actions/checkout@v2

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ repos:
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=25']
7+
- id: check-case-conflict
78
- id: check-merge-conflict
9+
- id: check-vcs-permalinks
810
- id: check-yaml
911
exclude: meta.yaml
1012
- id: debug-statements
1113
exclude: (debugging\.py)
1214
- id: end-of-file-fixer
15+
- id: fix-byte-order-marker
16+
- id: forbid-new-submodules
17+
- id: mixed-line-ending
18+
- id: no-commit-to-branch
19+
args: [--branch, main]
20+
- id: trailing-whitespace
1321
- repo: https://github.com/pre-commit/pygrep-hooks
1422
rev: v1.8.0 # Use the ref you want to point at
1523
hooks:

README.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,14 @@ projects. Its features include:
7777
.. end-features
7878
7979
80-
Why do I need a build system?
81-
-----------------------------
82-
83-
Read the `section in the documentation <https://pytask-dev.readthedocs.io/en/latest/
84-
explanations/why_do_i_need_a_build_system.html>`_ if you do not know or are not
85-
convinced that you need a build system.
86-
87-
8880
Installation
8981
------------
9082

9183
.. start-installation
9284
93-
pytask is available on `PyPI <https://pypi.org/project/pytask>`_ and on `Anaconda.org
94-
<https://anaconda.org/conda-forge/pytask>`_. Install the package with
85+
pytask is available on `PyPI <https://pypi.org/project/pytask>`_ for Python >= 3.6.1 and
86+
on `Anaconda.org <https://anaconda.org/conda-forge/pytask>`_ for Python >= 3.7. Install
87+
the package with
9588

9689
.. code-block:: console
9790
@@ -101,6 +94,10 @@ pytask is available on `PyPI <https://pypi.org/project/pytask>`_ and on `Anacond
10194
10295
$ conda install -c conda-forge pytask
10396
97+
Color support is automatically available on non-Windows platforms. On Windows, please,
98+
use `Windows Terminal <https://github.com/microsoft/terminal>`_ which can be, for
99+
example, installed via the `Microsoft Store <https://aka.ms/terminal>`_.
100+
104101
.. end-installation
105102
106103
Usage

docs/changes.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ chronological order. Releases follow `semantic versioning <https://semver.org/>`
66
all releases are available on `PyPI <https://pypi.org/project/pytask>`_ and
77
`Anaconda.org <https://anaconda.org/conda-forge/pytask>`_.
88

9-
10-
0.0.14 - 2021-xx-xx
9+
0.0.14 - 2021-03-23
1110
-------------------
1211

12+
- :gh:`74` reworks the formatting of the command line output by using ``rich``. Due to
13+
the new dependency, support for pytask with Python <3.6.1 on PyPI and with Python <3.7
14+
on Anaconda will end.
1315
- :gh:`76` fixes :gh:`75` which reports a bug when a closest ancestor cannot be found to
1416
shorten node names in the CLI output. Instead a common ancestor is used.
1517

docs/explanations/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ systems in general as well as its design.
77
.. toctree::
88
:maxdepth: 1
99

10-
why_do_i_need_a_build_system
1110
build_systems
1211
pluggy

docs/explanations/why_do_i_need_a_build_system.rst

Lines changed: 0 additions & 63 deletions
This file was deleted.

docs/index.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ Features
1414
:end-before: end-features
1515

1616

17-
Installation
18-
------------
19-
20-
.. include:: ../README.rst
21-
:start-after: start-installation
22-
:end-before: end-installation
17+
To install pytask, follow this :doc:`tutorial <tutorials/how_to_install>`.
2318

2419

2520
Documentation

docs/rtd_environment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
channels:
22
- conda-forge
3+
- nodefaults
34

45
dependencies:
5-
- python >= 3.6
6+
- python >= 3.7
67
- pip
78
- furo
89
- ipython
@@ -22,6 +23,7 @@ dependencies:
2223
- pluggy
2324
- pony >=0.7.13
2425
- pexpect
26+
- rich
2527

2628
- pip:
2729
- -e ../

docs/tutorials/how_to_install.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
How to install pytask
2+
=====================
3+
4+
.. include:: ../../README.rst
5+
:start-after: start-installation
6+
:end-before: end-installation

0 commit comments

Comments
 (0)