GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - allisonletts/snowfakery_extras: Useful plugins for Snowfakery

This repository was archived by the owner on Oct 29, 2021. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

45 Commits
45 Commits

Folders and files

NameName
Last commit message
Last commit date
recipes
recipes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Readme.md
Readme.md
 
 

Repository files navigation

ARCHIVE NOTICE

Archived in favor of faker_highered

Snowfakery Extras

This is a collection of sample code and directions for creating plugins and providers for Snowfakery.

Things you'll need

  1. Python 3 (generally recent-ish version).
  2. Snowfakery 1.9 or later.
  3. Faker module for python (pip3 install Faker).
    1. A Faker sample community provider like Microservice: pip3 install faker-microservice
  4. A recipe to work from (see recipes folder).

Creating a fakery provider for Snowfakery

  1. Create a directory in your project to hold your plugins.
  2. Create a file named __init__.py in that directory to make a package.
  3. Create directory for your new provider with the pattern faker_[my_service_name], in my case faker_nonprofit.
  4. In the directory create a file named __init__.py this defines the faker provider module.
  5. Create your provider in that file (see example for details):
    1. import faker.providers to make sure you have required classes.
    2. Define a series of dictionaries for providers creating text.
    3. Create a class that extends the base: class Provider(faker.providers.BaseProvider):
    4. Define a method that returns the desired values: def nonprofit_name(self):
  6. Create test.py in your plugins directory.
  7. Add tests to make sure it works cause it helps keep life easy (see example): $ python -m plugins.test

Attach Your Provider to your recipe

  1. Open the basic recipe you want to use for testing (start with something simple you already know how to use).
  2. Add a new line at the top to load the new plugin: - plugin: plugins.faker_nonprofit
  3. Add/Update a field to use the new provider.

About

Useful plugins for Snowfakery

Topics

cumuluscihacktoberfestsalesforce

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.