18 changed files with 329 additions and 182 deletions
After Width: | Height: | Size: 626 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 6.8 KiB |
@ -1,2 +1,91 @@
|
||||
# Wet-Pancake |
||||
A test project to see how well Console.Waterworks based console programs work with F# libraries. Wet Pancake generates text using the world famous Markov chain. |
||||
![Wet Pancake Banner](.github/Images/wet-pancake-banner.png) |
||||
|
||||
**Note: This project is a work in-progress. Doc's might be out-of-date** |
||||
|
||||
# Summary |
||||
|
||||
Wet Pancake is a NuGet package which generates random text. The solution, also, has a console program for those not needing to program against the package. |
||||
|
||||
## Pre-Requisites |
||||
|
||||
- Visual Studio 2017 |
||||
- F# |
||||
- C# |
||||
- XUnit |
||||
- FsCheck |
||||
- Console.Waterworks |
||||
- .Net 4.7 |
||||
|
||||
### Disclaimer |
||||
|
||||
This project started out as a test project. It was not my intention for it to grow to what it is now (granted, it is still not massive.) At first, I wanted to see how well the [Console.Waterworks](https://github.com/CraigOates/Console.Waterworks) NuGet package worked with F# libraries. This meant I needed to learn F#. To do this, I used [FsMarkov](https://blog.taylorwood.io/2015/07/04/markov-text.html) as a reference/goal to work towards. Because of these factors, the codebase has taken the shape it has. It did not start off with the best development practices. And, the fact, it is now a [NuGet](https://www.nuget.org/profiles/Craig.Oates) package, is a goal which came somewhat after the initial playing period. So, if you find yourself wanting to scream at me for glaring and obvious mistakes, please be kind. Thanks. |
||||
|
||||
![Image of the CLI generating text](.github/Images/cli-generating-text.png) |
||||
|
||||
## Wet Pancake: Solution |
||||
|
||||
The solution consists of three projects. They are WetPancake (NuGet package), WetPancakeCLI and TestCentre. |
||||
|
||||
![Image of the solution's structure](.github/Images/solution-structure.png) |
||||
|
||||
### Wet Pancake (Library/NuGet Package) |
||||
|
||||
This is a F# library project, using .Net 4.7. You can install this package from two places: |
||||
|
||||
1. [**MyGet:**](https://myget.org/gallery/the-immutable-null) This is the testbed for my NuGet packages before they make there way over to nuget.org. The packages here are less stable but they are where you will find the latest bits to test out. If you are unsure how to subscribe to a MyGet feed, click [here](http://docs.myget.org/docs/walkthrough/getting-started-with-nuget). |
||||
2. [**NuGet:**](https://www.nuget.org/profiles/Craig.Oates) This is the official host for NuGets. Download Wet Pancake from this feed for the most stable releases. |
||||
|
||||
You can add Wet Pancake to your project via the following commands: |
||||
|
||||
``` powershell |
||||
// Using the built-in Package Manager console in Visual Studio. |
||||
// Also, remove "< >" when inserting the package version. |
||||
|
||||
// MyGet |
||||
|
||||
PM> Install-Package WetPancake -Version <insert package here> -Source https://www.myget.org/F/the-immutable-null/api/v3/index.json |
||||
|
||||
// NuGet |
||||
|
||||
PM> Install-Package Wet-Pancake -Version <insert package here> |
||||
``` |
||||
|
||||
For further information about this project, please visit the [wiki](https://github.com/CraigOates/Wet-Pancake/wiki). |
||||
|
||||
### Wet Pancake CLI |
||||
|
||||
This project is a C# console program, using .Net 4.7. You use it by entering commands and awaiting the result. It uses [Console.Waterworks](https://github.com/CraigOates/Console.Waterworks) to parse the commands so, if you want to extend it, I recommend you read its [wiki](https://github.com/CraigOates/Console.Waterworks/wiki). If you want to get going straight away, I recommend using *GenerateRandomText*. For more commands, you can either type *Help* into the console or visit the [wiki](https://github.com/CraigOates/Wet-Pancake/wiki). |
||||
|
||||
![Image of the GenerateRandomText in use](.github/Images/generate-random-text-example.png) |
||||
|
||||
### Test Centre |
||||
|
||||
This project holds all the tests for this solution. If uses a combination of unit tests ([XUnit](http://xunit.github.io/)) and property tests ([FsCheck](https://fscheck.github.io/FsCheck/)). If you are unfamiliar with either of them, click on their links for more information. Also, all the tests are accessible in Visual Studio's Test Explorer. This means you can identify failing tests with ease. |
||||
|
||||
![Image of VS's Test Explorer](.github/Images/test-explorer-example.png) |
||||
|
||||
## How to Contribute |
||||
|
||||
If you would like to contribute to the project, first of all, thank you and here are some useful links for for you to get started. |
||||
|
||||
- [Contribution page](https://github.com/CraigOates/Wet-Pancake/blob/master/CONTRIBUTING.md) |
||||
- [Issues](https://github.com/CraigOates/Wet-Pancake/issues) |
||||
- [Bug Report Template](https://github.com/CraigOates/Wet-Pancake/blob/master/.github/ISSUE_TEMPLATE/bug_report.md) |
||||
- [Feature Request Template](https://github.com/CraigOates/Wet-Pancake/blob/master/.github/ISSUE_TEMPLATE/feature_request.md) |
||||
- [Pull Request Template](https://github.com/CraigOates/Wet-Pancake/blob/master/PULL_REQUEST_TEMPLATE.md) |
||||
- [Custom Template](https://github.com/CraigOates/Wet-Pancake/blob/master/.github/ISSUE_TEMPLATE/custom.md) |
||||
|
||||
## Code of Conduction |
||||
|
||||
Please visit the Code of Conduct page for Wet Pancake at: |
||||
|
||||
- [Code of Conduct page](https://github.com/CraigOates/Wet-Pancake/blob/master/CODE_OF_CONDUCT.md) |
||||
- [MIT License](https://github.com/CraigOates/Wet-Pancake/blob/master/LICENSE) |
||||
|
||||
## About the Creator |
||||
|
||||
Hi, my name is Craig and I am the creator of Wet Pancake. Thanks for checking it out. |
||||
|
||||
- Email: [craig@craigoates.net](http://www.craig@craigoates.net) |
||||
- Web: [http://www.craigaotes.net](http://www.craigaotes.net) |
||||
- Project: [http://www.craigoates.net/Software/project/12](http://www.craigoates.net/Software/project/12) |
@ -1,21 +1,33 @@
|
||||
module internal TestingConstants |
||||
|
||||
// Use these to reference the built-in .txt files in Test Centre. |
||||
(* Valid Text Files |
||||
=================================================================================================================== |
||||
Use these to quickly reference the built-in .txt files within Test Centre. |
||||
They should, also, mimic the .txt files in Wet Pancake/textFiles. |
||||
If you are noticing inconsistent behaviour between Test Centre and Wet Pancake, make sure these files match. *) |
||||
|
||||
[<Literal>] |
||||
let ConsoleWaterworks = __SOURCE_DIRECTORY__ + @"\TextFiles\console-waterworks-announcement.txt" |
||||
|
||||
[<Literal>] |
||||
let DesktopClock = __SOURCE_DIRECTORY__ + @"\TextFiles\desktop-clock-info.txt" |
||||
|
||||
[<Literal>] |
||||
let ConsoleWaterworks = __SOURCE_DIRECTORY__ + @"\TextFiles\console-waterworks-announcement.txt" |
||||
let TestPost = __SOURCE_DIRECTORY__ + @"\TextFiles\test-post.txt" |
||||
|
||||
[<Literal>] |
||||
let WordGenerator = __SOURCE_DIRECTORY__ + @"\TextFiles\word-generator.txt" |
||||
|
||||
[<Literal>] |
||||
let TestPost = __SOURCE_DIRECTORY__ + @"\TextFiles\test-post.txt" |
||||
(* Invalid Input |
||||
=================================================================================================================== |
||||
These values should not mimic or reference anything in Wet Pancake. |
||||
Below should just be dummy content/values. *) |
||||
|
||||
[<Literal>] |
||||
let InvalidFilePathInput = __SOURCE_DIRECTORY__ + @"Invalid/file.txt" |
||||
|
||||
[<Literal>] |
||||
let InvalidFileTypeInput = __SOURCE_DIRECTORY__ + @"\TextFiles\desktop-clock-info.doc" |
||||
|
||||
[<Literal>] |
||||
let InvalidTextFile = __SOURCE_DIRECTORY__ + @"\TextFiles\invalid-text.txt" |
||||
|
@ -0,0 +1 @@
|
||||
This file does not contain a vaild end token |
Loading…
Reference in new issue