Skip to content

Commit 0be55db

Browse files
authored
Update flavors to types (#27)
1 parent f579915 commit 0be55db

8 files changed

Lines changed: 66 additions & 43 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# repo-man
22

3-
Manage repositories of different flavors.
3+
Manage repositories of a variety of different types.
44
Read [the full documentation](https://repo-man.readthedocs.org) to learn more.
55

66
## Installation

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Changed
1717

18+
- Update `flavors` command and terminology to `types`
1819
- Use `strict` for mypy type checking on source and tests
1920
- Add isort to order imports consistently
2021

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 6. Change flavor terminology to type
2+
3+
Date: 2024-02-15
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
The "flavor" terminology is a bit too playful and perhaps unfamiliar to people of some backgrounds.
12+
The word "type," while possibly a bit generic, is more aligned with colloquial discussion about repositories.
13+
14+
## Decision
15+
16+
Change the word "flavor" to "type" wherever applicable.
17+
18+
## Consequences
19+
20+
- People might better understand what this tool does
21+
- Documentation needs to be updated to reflect the new terminology
22+
- Commands like `flavors` need to change, and will break usage as a result

docs/index.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Welcome to repo-man's documentation!
22
====================================
33

4-
Manage repositories of different flavors.
4+
Manage repositories of different types.
55

66
.. toctree::
77
:maxdepth: 2
@@ -20,14 +20,14 @@ Manage repositories of different flavors.
2020

2121
If you work in open source or as a cross-team individual contributor in your organization,
2222
you may have dozens of repositories cloned to your local machine.
23-
Those repositories may be of several different *flavors*, exhibiting a particular file structure or purpose.
23+
Those repositories may be of several different *types*, exhibiting a particular file structure or purpose.
2424

25-
You may find yourself wanting to query or mutate repositories of a particular flavor and,
26-
unless the repositories of that flavor share a common name prefix or some other signifier,
25+
You may find yourself wanting to query or mutate repositories of a particular type and,
26+
unless the repositories of that type share a common name prefix or some other signifier,
2727
it can prove tedious to specify which repositories to run commands against.
2828
Even great tools like `fzf <https://github.com/junegunn/fzf>`_ don't quite reduce the burden of selecting all desired repositories at this scale.
2929

30-
repo-man is a tool for managing a catalog of repositories and their flavors to improve your productivity.
30+
repo-man is a tool for managing a catalog of repositories and their types to improve your productivity.
3131

3232
Getting started
3333
---------------
@@ -49,19 +49,19 @@ Configuration
4949
*************
5050

5151
To configure repo-man, create a :file:`repo-man.cfg` file alongside your cloned repositories.
52-
This file is an INI-style file with sections, where each section name is a repository flavor.
53-
In each repository flavor section, a single ``known`` property specifies a newline-delimited list of repositories.
52+
This file is an INI-style file with sections, where each section name is a repository type.
53+
In each repository type section, a single ``known`` property specifies a newline-delimited list of repositories.
5454

5555
A valid :file:`repo-man.cfg` file might look something like the following:
5656

5757
.. code-block:: cfg
5858
59-
[some-flavor]
59+
[some-type]
6060
known =
6161
repo-one
6262
repo-two
6363
64-
[some-other-flavor]
64+
[some-other-type]
6565
known =
6666
repo-three
6767
@@ -98,52 +98,52 @@ Listing repositories
9898

9999
.. code-block:: shell
100100
101-
$ repo-man list --type some-flavor
101+
$ repo-man list --type some-type
102102
repo-one
103103
repo-two
104104
105-
Listing flavors for a repository
105+
Listing types for a repository
106106
++++++++++++++++++++++++++++++++
107107

108108
.. code-block:: shell
109109
110-
$ repo-man flavors repo-one
111-
some-flavor
110+
$ repo-man types repo-one
111+
some-type
112112
113113
Adding a repository
114114
+++++++++++++++++++
115115

116-
You can add a repository to an existing flavor:
116+
You can add a repository to an existing type:
117117

118118
.. code-block:: shell
119119
120-
$ repo-man add repo-four --type some-flavor
120+
$ repo-man add repo-four --type some-type
121121
122-
You can also add a repository to an existing flavor:
122+
You can also add a repository to an existing type:
123123

124124
.. code-block:: shell
125125
126-
$ repo-man add repo-five --type some-brand-new-flavor
126+
$ repo-man add repo-five --type some-brand-new-type
127127
128-
Listing known flavors
128+
Listing known types
129129
+++++++++++++++++++++
130130

131131
.. code-block:: shell
132132
133133
$ repo-man sniff --known
134-
some-flavor
135-
some-other-flavor
134+
some-type
135+
some-other-type
136136
137137
138138
Combining with other tools
139139
++++++++++++++++++++++++++
140140

141141
The value of repo-man comes in when combining its output with other tools.
142-
As an example, you can iterate over all the repositories of a given flavor to take some action:
142+
As an example, you can iterate over all the repositories of a given type to take some action:
143143

144144
.. code-block:: shell
145145
146-
$ for repo in $(repo-man list --type some-flavor); do
146+
$ for repo in $(repo-man list --type some-type); do
147147
cd $repo;
148148
# take some action;
149149
cd ..;
@@ -158,7 +158,7 @@ These commands help you query and improve your repo-man configuration.
158158
Unconfigured repositories
159159
^^^^^^^^^^^^^^^^^^^^^^^^^
160160

161-
List repositories you have cloned but that have no configured flavor:
161+
List repositories you have cloned but that have no configured type:
162162

163163
.. code-block:: shell
164164
@@ -169,17 +169,17 @@ List repositories you have cloned but that have no configured flavor:
169169
Duplicate repositories
170170
^^^^^^^^^^^^^^^^^^^^^^
171171

172-
Some repositories may be of multiple flavors, but you may also accidentally configure a repository as two flavors.
173-
You can list all the repositories that you've configured as more than one flavor:
172+
Some repositories may be of multiple types, but you may also accidentally configure a repository as two types.
173+
You can list all the repositories that you've configured as more than one type:
174174

175175
.. code-block:: cfg
176176
177-
[some-flavor]
177+
[some-type]
178178
known =
179179
repo-one
180180
repo-two
181181
182-
[some-other-flavor]
182+
[some-other-type]
183183
known =
184184
repo-one
185185
@@ -192,7 +192,7 @@ You can list all the repositories that you've configured as more than one flavor
192192
Tips and tricks
193193
+++++++++++++++
194194

195-
You may wish to create a hierarchy of flavors, starting your flavor names with the most general classification.
195+
You may wish to create a hierarchy of types, starting your type names with the most general classification.
196196
As an example, you may have several different package and application types that you could capture as follows:
197197

198198
.. code-block:: cfg
@@ -215,7 +215,7 @@ As an example, you may have several different package and application types that
215215
left-pad
216216
is-even
217217
218-
repo-man doesn't currently do anything special with these, but could grow features to e.g. list flavor classes.
218+
repo-man doesn't currently do anything special with these, but could grow features to e.g. list type classes.
219219

220220
Indices and tables
221221
==================

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[metadata]
22
name = repo-man
33
version = 0.0.8
4-
description = Manage repositories of different flavors.
4+
description = Manage repositories of a variety of different types.
55
long_description = file: README.md
66
long_description_content_type = text/markdown
77
url = https://github.com/easy-as-python/repo-man

src/repo_man/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
from repo_man.commands.add import add
66
from repo_man.commands.edit import edit
7-
from repo_man.commands.flavors import flavors
87
from repo_man.commands.implode import implode
98
from repo_man.commands.init import init
109
from repo_man.commands.list_repos import list_repos
1110
from repo_man.commands.remove import remove
1211
from repo_man.commands.sniff import sniff
12+
from repo_man.commands.types import types
1313
from repo_man.consts import REPO_TYPES_CFG
1414

1515

@@ -27,7 +27,7 @@ def cli(context: click.Context) -> None: # pragma: no cover
2727
def main() -> None: # pragma: no cover
2828
cli.add_command(add)
2929
cli.add_command(edit)
30-
cli.add_command(flavors)
30+
cli.add_command(types)
3131
cli.add_command(implode)
3232
cli.add_command(init)
3333
cli.add_command(list_repos)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@click.command
99
@click.argument("repo", type=click.Path(exists=True, file_okay=False))
1010
@pass_config
11-
def flavors(config: configparser.ConfigParser, repo: str) -> None:
11+
def types(config: configparser.ConfigParser, repo: str) -> None:
1212
"""List the configured types for a repository"""
1313

1414
ensure_config_file_exists()
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
import click
66

7-
from repo_man.commands.flavors import flavors
7+
from repo_man.commands.types import types
88

99

10-
def test_flavors_clean(runner: click.testing.CliRunner, get_config: Callable[[], configparser.ConfigParser]) -> None:
10+
def test_types_clean(runner: click.testing.CliRunner, get_config: Callable[[], configparser.ConfigParser]) -> None:
1111
with runner.isolated_filesystem():
1212
Path("some-repo").mkdir()
1313
config = get_config()
14-
result = runner.invoke(flavors, ["some-repo"], obj=config)
14+
result = runner.invoke(types, ["some-repo"], obj=config)
1515
assert result.exit_code == 1
1616
assert result.output == "No repo-man.cfg file found.\n"
1717

1818

19-
def test_flavors_when_configured(
19+
def test_types_when_configured(
2020
runner: click.testing.CliRunner, get_config: Callable[[], configparser.ConfigParser]
2121
) -> None:
2222
with runner.isolated_filesystem():
@@ -36,12 +36,12 @@ def test_flavors_when_configured(
3636
)
3737

3838
config = get_config()
39-
result = runner.invoke(flavors, ["some-repo"], obj=config)
39+
result = runner.invoke(types, ["some-repo"], obj=config)
4040
assert result.exit_code == 0
4141
assert result.output == "foo\n"
4242

4343

44-
def test_flavors_when_not_configured(
44+
def test_types_when_not_configured(
4545
runner: click.testing.CliRunner, get_config: Callable[[], configparser.ConfigParser]
4646
) -> None:
4747
with runner.isolated_filesystem():
@@ -57,12 +57,12 @@ def test_flavors_when_not_configured(
5757
)
5858

5959
config = get_config()
60-
result = runner.invoke(flavors, ["some-repo"], obj=config)
60+
result = runner.invoke(types, ["some-repo"], obj=config)
6161
assert result.exit_code == 0
6262
assert result.output == ""
6363

6464

65-
def test_flavors_when_ignored(
65+
def test_types_when_ignored(
6666
runner: click.testing.CliRunner, get_config: Callable[[], configparser.ConfigParser]
6767
) -> None:
6868
with runner.isolated_filesystem():
@@ -78,6 +78,6 @@ def test_flavors_when_ignored(
7878
)
7979

8080
config = get_config()
81-
result = runner.invoke(flavors, ["some-repo"], obj=config)
81+
result = runner.invoke(types, ["some-repo"], obj=config)
8282
assert result.exit_code == 0
8383
assert result.output == ""

0 commit comments

Comments
 (0)