Coverage for tsfpga/about.py: 24%

17 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-12-10 20:51 +0000

1# -------------------------------------------------------------------------------------------------- 

2# Copyright (c) Lukas Vik. All rights reserved. 

3# 

4# This file is part of the tsfpga project, a project platform for modern FPGA development. 

5# https://tsfpga.com 

6# https://github.com/tsfpga/tsfpga 

7# -------------------------------------------------------------------------------------------------- 

8 

9 

10def get_short_slogan() -> str: 

11 """ 

12 Short slogan used e.g. on pypi.org. 

13 Note that there seems to be an upper limit of 98 characters when rendering the slogan 

14 on pypi.org. 

15 

16 Note that this slogan should be the same as the one used in the readme and on the website below. 

17 The difference is capitalization and whether the project name is included. 

18 """ 

19 result = "A flexible and scalable development platform for modern FPGA projects" 

20 return result 

21 

22 

23def get_readme_rst( 

24 include_extra_for_github: bool = False, 

25 include_extra_for_website: bool = False, 

26 include_extra_for_pypi: bool = False, 

27) -> str: 

28 """ 

29 Get the complete README.rst for tsfpga (to be used on website and in PyPI release). 

30 

31 The arguments control some extra text that is included. This is mainly links to the 

32 other places where you can find information on the project (website, github, PyPI). 

33 

34 Arguments: 

35 include_extra_for_github (bool): Include the extra text that shall be included in the 

36 github README. 

37 include_extra_for_website (bool): Include the extra text that shall be included in the 

38 website main page. 

39 include_extra_for_pypi (bool): Include the extra text that shall be included in the 

40 PyPI release README. 

41 """ 

42 if include_extra_for_github: 

43 readme_rst = "" 

44 extra_rst = """\ 

45**See documentation on the website**: https://tsfpga.com 

46 

47**See PyPI for installation details**: https://pypi.org/project/tsfpga/ 

48""" 

49 elif include_extra_for_website: 

50 # The website needs the initial heading, in order for the landing page to get 

51 # the correct title. 

52 # The others do not need this initial heading, it just makes the github/pypi page 

53 # more clunky. 

54 readme_rst = """\ 

55About tsfpga 

56============ 

57 

58""" 

59 extra_rst = """\ 

60To install the Python package, see :ref:`installation`. 

61To check out the source code go to the `GitHub page <https://github.com/tsfpga/tsfpga>`__. 

62""" 

63 elif include_extra_for_pypi: 

64 readme_rst = "" 

65 extra_rst = """\ 

66**See documentation on the website**: https://tsfpga.com 

67 

68**Check out the source code on GitHub**: https://github.com/tsfpga/tsfpga 

69""" 

70 else: 

71 readme_rst = "" 

72 extra_rst = "" 

73 

74 readme_rst += f"""\ 

75.. image:: https://tsfpga.com/logos/banner.png 

76 :alt: Project banner 

77 :align: center 

78 

79| 

80 

81.. |pic_website| image:: https://tsfpga.com/badges/website.svg 

82 :alt: Website 

83 :target: https://tsfpga.com 

84 

85.. |pic_repository| image:: https://tsfpga.com/badges/repository.svg 

86 :alt: Repository 

87 :target: https://github.com/tsfpga/tsfpga 

88 

89.. |pic_chat| image:: https://tsfpga.com/badges/chat.svg 

90 :alt: Chat 

91 :target: https://github.com/tsfpga/tsfpga/discussions 

92 

93.. |pic_pip_install| image:: https://tsfpga.com/badges/pip_install.svg 

94 :alt: pypi 

95 :target: https://pypi.org/project/tsfpga/ 

96 

97.. |pic_license| image:: https://tsfpga.com/badges/license.svg 

98 :alt: License 

99 :target: https://tsfpga.com/license_information.html 

100 

101.. |pic_ci_status| image:: https://github.com/tsfpga/tsfpga/actions/workflows/ci.yml/\ 

102badge.svg?branch=main 

103 :alt: CI status 

104 :target: https://github.com/tsfpga/tsfpga/actions/workflows/ci.yml 

105 

106.. |pic_python_line_coverage| image:: https://tsfpga.com/badges/python_coverage.svg 

107 :alt: Python line coverage 

108 :target: https://tsfpga.com/python_coverage_html 

109 

110|pic_website| |pic_repository| |pic_pip_install| |pic_license| |pic_chat| |pic_ci_status| 

111|pic_python_line_coverage| 

112 

113tsfpga is a flexible and scalable development platform for modern FPGA projects. 

114With its Python-based build/simulation flow it is perfect for CI/CD and test-driven development. 

115The API is simple and easy to use 

116(a complete `simulation project <https://tsfpga.com/simulation.html>`__ is set up in less than 

11715 lines). 

118 

119{extra_rst} 

120Key features 

121------------ 

122 

123* Source code centric `project structure <https://tsfpga.com/module_structure.html>`__ 

124 for scalability. 

125 Build projects, test configurations, constraints, IP cores, etc. are handled close to the 

126 source code, not in a central monolithic script. 

127* Automatically adds build/simulation sources if a recognized folder structure is used. 

128* Enables `local VUnit test configuration 

129 <https://tsfpga.com/simulation.html#local-configuration-of-test-cases>`__ without 

130 multiple ``run.py``. 

131* Handling of `IP cores <https://tsfpga.com/simulation.html#simulating-with-vivado-ip-cores>`__ 

132 and `simlib <https://tsfpga.com/simulation.html#vivado-simulation-libraries>`__ 

133 for your simulation project, with automatic re-compile when needed. 

134* Python-based `Vivado build system <https://tsfpga.com/fpga_build.html>`__ where many builds can 

135 be run in parallel. 

136* Tightly integrated with `hdl-registers <https://hdl-registers.com>`__. 

137 Register code generation is performed before each simulation and each build. 

138* Released under the very permissive BSD 3-Clause License. 

139 

140The maintainers place high focus on quality, with everything having good unit test coverage and a 

141thought-out structure. 

142The project is mature and used in many production environments. 

143""" 

144 

145 return readme_rst