0
and 4,294,967,295 (232 - 1)
12 |
13 | ### Extending the Provider
14 |
15 | If you need a specific range you can pass custom `min` and `max` values to the provider:
16 |
17 | ```kotlin
18 | val uInteger = UIntProvider(min = 1u, max = 15u).get()
19 | ```
20 |
--------------------------------------------------------------------------------
/website/docs/supported-types/ulong.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 17
3 | ---
4 |
5 | # ULong
6 |
7 | The `ULong` provider generates a random ULong value between two unsigned longs.
8 |
9 | ### Default Behavior
10 |
11 | Between 0
and 18,446,744,073,709,551,615 (264 - 1)
12 |
13 | ### Extending the Provider
14 |
15 | If you need a specific range you can pass custom `min` and `max` values to the provider:
16 |
17 | ```kotlin
18 | val uLong = ULongProvider(min = 1u, max = 15u).get()
19 | ```
20 |
--------------------------------------------------------------------------------
/website/docs/supported-types/ushort.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 18
3 | ---
4 |
5 | # UShort
6 |
7 | The `UShort` provider generates a random UShort value between two unsigned integers.
8 |
9 | ### Default Behavior
10 |
11 | Between `0` and `65,535`
12 |
13 | ### Extending the Provider
14 |
15 | If you need a specific range you can pass custom `min` and `max` values to the provider:
16 |
17 | ```kotlin
18 | val uShort = UShortProvider(min = 1u, max = 15u).get()
19 | ```
20 |
--------------------------------------------------------------------------------
/website/docs/supported-types/uuid.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 19
3 | ---
4 |
5 | # UUID
6 |
7 | The `UUID` provider generates random UUIDs.
8 |
--------------------------------------------------------------------------------
/website/docusaurus.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 | // Note: type annotations allow type checking and IDEs autocompletion
3 |
4 | const {themes} = require('prism-react-renderer');
5 | const lightTheme = themes.github;
6 | const darkTheme = themes.dracula;
7 |
8 | /** @type {import('@docusaurus/types').Config} */
9 | const config = {
10 | title: 'Model Forge',
11 | tagline: 'Kotlin model generation for tests',
12 | url: 'https://hellocuriosity.github.io/',
13 | baseUrl: '/model-forge/',
14 | onBrokenLinks: 'throw',
15 | onBrokenMarkdownLinks: 'warn',
16 | favicon: 'img/favicon.ico',
17 |
18 | // GitHub pages deployment config.
19 | // If you aren't using GitHub pages, you don't need these.
20 | organizationName: 'HelloCuriosity', // Usually your GitHub org/user name.
21 | projectName: 'model-forge', // Usually your repo name.
22 |
23 | // Even if you don't use internalization, you can use this field to set useful
24 | // metadata like html lang. For example, if your site is Chinese, you may want
25 | // to replace "en" with "zh-Hans".
26 | i18n: {
27 | defaultLocale: 'en',
28 | locales: ['en'],
29 | },
30 |
31 | presets: [
32 | [
33 | 'classic',
34 | /** @type {import('@docusaurus/preset-classic').Options} */
35 | ({
36 | docs: {
37 | sidebarPath: require.resolve('./sidebars.js'),
38 | // Please change this to your repo.
39 | // Remove this to remove the "edit this page" links.
40 | editUrl:
41 | 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
42 | },
43 | theme: {
44 | customCss: require.resolve('./src/css/custom.css'),
45 | },
46 | }),
47 | ],
48 | ],
49 |
50 | themeConfig:
51 | /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
52 | ({
53 | navbar: {
54 | title: 'Model Forge',
55 | logo: {
56 | alt: 'Model Forge Logo',
57 | src: 'img/logo.svg',
58 | },
59 | items: [
60 | {
61 | type: 'doc',
62 | docId: 'introduction',
63 | position: 'left',
64 | label: 'Docs',
65 | },
66 | {
67 | href: 'https://github.com/HelloCuriosity/model-forge',
68 | label: 'GitHub',
69 | position: 'right',
70 | },
71 | ],
72 | },
73 | footer: {
74 | style: 'dark',
75 | links: [
76 | {
77 | title: 'Docs',
78 | items: [
79 | {
80 | label: 'Getting Started',
81 | to: '/docs/getting-started/gradle-dependency',
82 | },
83 | {
84 | label: 'Custom Providers',
85 | to: '/docs/getting-started/custom-providers',
86 | },
87 | {
88 | label: 'Supported Types',
89 | to: 'docs/category/supported-types',
90 | },
91 | ],
92 | },
93 | {
94 | title: 'Community',
95 | items: [
96 | {
97 | label: 'Stack Overflow',
98 | href: 'https://stackoverflow.com/questions/tagged/model-forge',
99 | },
100 | ],
101 | },
102 | {
103 | title: 'More',
104 | items: [
105 | {
106 | label: 'GitHub',
107 | href: 'https://github.com/HelloCuriosity/model-forge',
108 | },
109 | ],
110 | },
111 | ],
112 | copyright: `Copyright © ${new Date().getFullYear()} Model Forge Team - Built with Docusaurus.`,
113 | },
114 | prism: {
115 | theme: lightTheme,
116 | darkTheme: darkTheme,
117 | },
118 | colorMode: {
119 | defaultMode: 'light',
120 | disableSwitch: true, // disabled dark mode
121 | respectPrefersColorScheme: false,
122 | },
123 | }),
124 | };
125 |
126 | module.exports = config;
127 |
--------------------------------------------------------------------------------
/website/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "website",
3 | "version": "0.0.0",
4 | "private": true,
5 | "scripts": {
6 | "docusaurus": "docusaurus",
7 | "start": "docusaurus start",
8 | "build": "docusaurus build",
9 | "swizzle": "docusaurus swizzle",
10 | "deploy": "docusaurus deploy",
11 | "clear": "docusaurus clear",
12 | "serve": "docusaurus serve",
13 | "write-translations": "docusaurus write-translations",
14 | "write-heading-ids": "docusaurus write-heading-ids"
15 | },
16 | "dependencies": {
17 | "@docusaurus/core": "^3.0.0",
18 | "@docusaurus/preset-classic": "^3.0.0",
19 | "@mdx-js/react": "^3.0.0",
20 | "clsx": "^2.0.0",
21 | "prism-react-renderer": "^2.0.0",
22 | "react": "^19.0.0",
23 | "react-dom": "^19.0.0"
24 | },
25 | "devDependencies": {
26 | "@docusaurus/module-type-aliases": "^3.0.0",
27 | "@docusaurus/types": "3.7.0"
28 | },
29 | "browserslist": {
30 | "production": [
31 | ">0.5%",
32 | "not dead",
33 | "not op_mini all"
34 | ],
35 | "development": [
36 | "last 1 chrome version",
37 | "last 1 firefox version",
38 | "last 1 safari version"
39 | ]
40 | },
41 | "engines": {
42 | "node": ">=18.0"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/website/sidebars.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Creating a sidebar enables you to:
3 | - create an ordered group of docs
4 | - render a sidebar for each doc of that group
5 | - provide next/previous navigation
6 |
7 | The sidebars can be generated from the filesystem, or explicitly defined here.
8 |
9 | Create as many sidebars as you want.
10 | */
11 |
12 | // @ts-check
13 |
14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
15 | const sidebars = {
16 | // By default, Docusaurus generates a sidebar from the docs folder structure
17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
18 |
19 | // But you can create a sidebar manually
20 | /*
21 | tutorialSidebar: [
22 | {
23 | type: 'category',
24 | label: 'Tutorial',
25 | items: ['hello'],
26 | },
27 | ],
28 | */
29 | };
30 |
31 | module.exports = sidebars;
32 |
--------------------------------------------------------------------------------
/website/src/components/HomepageFeatures/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import clsx from 'clsx';
3 | import styles from './styles.module.css';
4 |
5 | const FeatureList = [
6 | {
7 | title: 'Auto Generate Models',
8 | Svg: require('@site/static/img/build.svg').default,
9 | description: (
10 | <>
11 | Model forge auto generates models for use in unit or integration tests. Removing the need to create
12 | static models and removes redundancy in your tests.
13 | >
14 | ),
15 | },
16 | {
17 | title: 'Extendability',
18 | Svg: require('@site/static/img/extendability.svg').default,
19 | description: (
20 | <>
21 | Model forge can easily be extended with custom providers, helping you specify distinct behavior where
22 | needed.
23 | >
24 | ),
25 | },
26 | {
27 | title: 'Android Friendly',
28 | Svg: require('@site/static/img/android.svg').default,
29 | description: (
30 | <>
31 | Model forge can be used in jvm and android projects alike.
32 | >
33 | ),
34 | },
35 | {
36 | title: 'Open-Source',
37 | Svg: require('@site/static/img/open_source.svg').default,
38 | description: (
39 | <>
40 | Model forge is open-source and developed by the community. Help us shape the future by joining us
41 | on GitHub.
42 | >
43 | ),
44 | },
45 | ];
46 |
47 | function Feature({Svg, title, description}) {
48 | return (
49 | {description}
56 |{siteConfig.tagline}
17 |