Coverage for src / rhiza / commands / welcome.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2025-12-29 01:59 +0000

1# This file is part of the jebel-quant/rhiza repository 

2# (https://github.com/jebel-quant/rhiza). 

3# 

4"""Command to display a welcome message and explain Rhiza. 

5 

6This module provides the welcome command that displays a friendly greeting 

7and explains what Rhiza is and how it can help manage configuration templates. 

8""" 

9 

10from rhiza import __version__ 

11 

12 

13def welcome(): 

14 """Display a welcome message and explain what Rhiza is. 

15 

16 Shows a friendly greeting, explains Rhiza's purpose, and provides 

17 next steps for getting started with the tool. 

18 

19 This command is useful for new users to understand what Rhiza does 

20 and how to get started. It provides a high-level overview without 

21 performing any operations on the file system. 

22 """ 

23 # Construct a nicely formatted welcome message with ASCII art border 

24 # The version is dynamically inserted from the package metadata 

25 welcome_message = f""" 

26╭───────────────────────────────────────────────────────────────╮ 

27│ │ 

28│ 🌿 Welcome to Rhiza v{__version__:<39} 

29│ │ 

30╰───────────────────────────────────────────────────────────────╯ 

31 

32Rhiza helps you maintain consistent configuration across multiple 

33Python projects using reusable templates stored in a central repository. 

34 

35✨ What Rhiza can do for you: 

36 

37 • Initialize projects with standard configuration templates 

38 • Materialize (inject) templates into target repositories 

39 • Validate template configurations 

40 • Keep project configurations synchronized 

41 

42🚀 Getting started: 

43 

44 1. Initialize a project: 

45 $ rhiza init 

46 

47 2. Customize .github/rhiza/template.yml to match your needs 

48 

49 3. Materialize templates into your project: 

50 $ rhiza materialize 

51 

52📚 Learn more: 

53 

54 • View all commands: rhiza --help 

55 • Project repository: https://github.com/jebel-quant/rhiza-cli 

56 • Documentation: https://jebel-quant.github.io/rhiza-cli/ 

57 

58Happy templating! 🎉 

59""" 

60 

61 # Print the welcome message to stdout 

62 print(welcome_message)