Package: dailydose
PythondailydosePackageBoredom kills. Here's a package that gives you a daily dose of fun!Team MembersSneheel SarangiWinston ZhangLarry LiPaula SeraphimInstallationInstall thedailydosemodule withpip.UsageOnce installed,dailydosegives access to the package's 4 special features: today's news in different fields (per Vox Media), random fun facts, and the games of hangman and battleship. The variety of the collection is inspired by the traditional newspaper/magazine experience, in which both information and thought-provoking entertainment is regularly provided. This package is ideal for any program that operates on changing content or stimulating applications.dailydosesupports a command-line interface (CLI). To choose one of the above options, simply call:$ python3 -m dailydoseUpon running the package, a main menu is displayed in which your options are listed. Access each feature by entering their corresponding menu number.Fun Stuffs To DoFun FactsTo see a fun fact, press 1 when the main menu is prompted. A random fun fact fromTheFactSitewill be printed.After that, you will be redirected to the main menu.NewsfeedTo see today's news, press 2 when the main menu is prompted. Immediately after, you will be given a list of options to read about: Culture, Politics, Science, World, Technology, Environment, and Business. You also have the option to return to the main menu.Select a field by entering the corresponding listed number. Today's top headlines in the chosen field, as published by Vox Media, as well as a link to read more are printed.The content is sourced from their website and therefore changes accordingly.Upon receiving the headlines, you will be redirected to the main menu.Hangman GameTo play the hangman game, press 3 when the main menu is prompted.You will then be asked to enter the length of the word you want to guess.Upon guessing the correct word or losing the game, you will be redirected to the main menu.Battleship GameTo play the battleship game, press 4 when the main menu is prompted.You will then be asked to enter the board dimensions and ship size. You can also choose to use the default settings.The game creates a dimension*dimension size board and keeps track of how many turns it takes for you to win! What do you think is the optimal strategy?Upon winning or exiting the game, you will be redirected to the main menu.Importing the PackageFor example usage of the package, seeexample.py.1.fact.get-- generate a list of random fun fact objectsfact.get(count=1, include_details=True)Parameterscount: how many non-duplicate fun fact objects to returndefault: 1possible values: [1, 100], inclusiveinclude_details: whether to return the detailed contents of the facts or only the headingsdefault: True2.news.get_headlines-- generate a list of headlinesnews.get_headlines(subject, titular)Parameterssubject: category name in url slug format onVox.compossible values:"culture","policy-and-politics","science-and-health","world","technology","energy-and-environment","business-and-finance"titular: a user-friendly display name for the category namepossible values: anystr3.hang.hangman-- start an interactive hangman gamehang.hangman(num_letter=number_of_letters)Parametersnum_letter: the length of word you want to guesspossible values: a string make up of numbers, the length of word acceptable is in between ["4","10"], inclusive4.battleship.main-- start an interactive battleship gamebattleship.main(ship_size="4", dimension="10")Parametersdimension: the size of the board (dimension * dimension)default:"10"possible values: a string make up of numbers, the board dimension acceptable is in between ["1","10"], inclusiveship_size: the size of the hidden battleshipdefault:"4"possible values: a string make up of numbers, the ship size acceptable is in between ["1",dimension], inclusiveContributeSource CodeClone the package source code fromGitHub repository.Setup Virtual EnvironmentCreate apipenv-managed virtual environment and install all required dependencies by running the following command in the main project directory where thePipfileis:pipenv installActivate the virtual environment:pipenv shellThen you can test and modify the package!Test the PackageRun the tests from the main project directory:python3 -m pytestBuild the PackageDelete the autogenerateddistdirectory if it exists.Delete the autogeneratedsrc/*.egg-infodirectory if it exists.Build the package by running the following command in the main project directory:python3 -m build