Skip to content

Commit

Permalink
conan-io#3671 Rename tags to topics
Browse files Browse the repository at this point in the history
- We believe that topics is a better name, because tags remember svn
  and git features.
- We voted also for labels but topics sounds better.
- Thanks to @SSE4 for 'topics'

Signed-off-by: Uilian Ries <[email protected]>
  • Loading branch information
uilianries committed Oct 22, 2018
1 parent c78dfd3 commit 3d7d324
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions conans/client/cmd/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class {package_name}Conan(ConanFile):
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of {package_name} here>"
tags = ["<Put some tag here>", "<here>", "<and here>"]
topics = ["<Put some tag here>", "<here>", "<and here>"]
settings = "os", "compiler", "build_type", "arch"
options = {{"shared": [True, False]}}
default_options = "shared=False"
Expand Down Expand Up @@ -65,7 +65,7 @@ class {package_name}Conan(ConanFile):
url = "None"
license = "None"
author = "None"
tags = None
topics = None
def package(self):
self.copy("*")
Expand All @@ -84,7 +84,7 @@ class {package_name}Conan(ConanFile):
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of {package_name} here>"
tags = ["<Put some tag here>", "<here>", "<and here>"]
topics = ["<Put some tag here>", "<here>", "<and here>"]
settings = "os", "compiler", "build_type", "arch"
options = {{"shared": [True, False]}}
default_options = "shared=False"
Expand Down Expand Up @@ -125,7 +125,7 @@ class {package_name}Conan(ConanFile):
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of {package_name} here>"
tags = ["<Put some tag here>", "<here>", "<and here>"]
topics = ["<Put some tag here>", "<here>", "<and here>"]
no_copy_source = True
# No settings/options are necessary, this is header only
Expand Down
2 changes: 1 addition & 1 deletion conans/client/conan_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def inspect(self, path, attributes, remote_name=None):
result = OrderedDict()
if not attributes:
attributes = ['name', 'version', 'url', 'license', 'author', 'description',
'tags', 'generators', 'exports', 'exports_sources', 'short_paths',
'topics', 'generators', 'exports', 'exports_sources', 'short_paths',
'apply_env', 'build_policy']
for attribute in attributes:
try:
Expand Down
2 changes: 1 addition & 1 deletion conans/client/graph/grapher.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def graph(self):
("url", '<a href="{url}">{url}</a>'.format(url=conanfile.url)),
("license", conanfile.license),
("author", conanfile.author),
("tags", conanfile.tags)]:
("topics", conanfile.topics)]:
if data:
data = data.replace("'", '"')
fulllabel.append("<li><b>%s</b>: %s</li>" % (name, data))
Expand Down
10 changes: 5 additions & 5 deletions conans/client/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def show(field):
url = getattr(conan, "url", None)
license_ = getattr(conan, "license", None)
author = getattr(conan, "author", None)
tags = getattr(conan, "tags", None)
topics = getattr(conan, "topics", None)
if url and show("url"):
self._out.writeln(" URL: %s" % url, Color.BRIGHT_GREEN)

Expand All @@ -124,11 +124,11 @@ def show(field):
self._out.writeln(" License: %s" % license_, Color.BRIGHT_GREEN)
if author and show("author"):
self._out.writeln(" Author: %s" % author, Color.BRIGHT_GREEN)
if tags and show("tags"):
if isinstance(tags, (list, tuple, set)):
self._out.writeln(" Tags: %s" % ", ".join(tags), Color.BRIGHT_GREEN)
if topics and show("topics"):
if isinstance(topics, (list, tuple, set)):
self._out.writeln(" Topics: %s" % ", ".join(topics), Color.BRIGHT_GREEN)
else:
self._out.writeln(" Tags: %s" % tags, Color.BRIGHT_GREEN)
self._out.writeln(" Topics: %s" % topics, Color.BRIGHT_GREEN)

if isinstance(ref, ConanFileReference) and show("recipe"): # Excludes PROJECT
self._out.writeln(" Recipe: %s" % node.recipe)
Expand Down
2 changes: 1 addition & 1 deletion conans/model/conan_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ConanFile(object):
license = None
author = None # Main maintainer/responsible for the package, any format
description = None
tags = None
topics = None
build_policy = None
short_paths = False
apply_env = True # Apply environment variables from requires deps_env_info and profiles
Expand Down
2 changes: 1 addition & 1 deletion conans/test/command/info_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ class MyTest(ConanFile):
author = "John Doe"
license = "MIT"
url = "https://foo.bar.baz"
tags = ["foo", "bar", "qux"]
topics = ["foo", "bar", "qux"]
"""

Expand Down
6 changes: 3 additions & 3 deletions conans/test/command/inspect_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def build(self):
license: None
author: None
description: None
tags: None
topics: None
generators: ['txt']
exports: None
exports_sources: None
Expand All @@ -157,7 +157,7 @@ class Pkg(ConanFile):
license = "MIT"
description = "Yet Another Test"
generators = "cmake"
tags = ["foo", "bar", "qux"]
topics = ["foo", "bar", "qux"]
_private = "Nothing"
def build(self):
pass
Expand All @@ -170,7 +170,7 @@ def build(self):
license: MIT
author: John Doe
description: Yet Another Test
tags: ['foo', 'bar', 'qux']
topics: ['foo', 'bar', 'qux']
generators: cmake
exports: None
exports_sources: None
Expand Down

0 comments on commit 3d7d324

Please sign in to comment.