2 from .utils import make_flask_user_password
6 admin_user = User("Fleckenstein")
7 admin_user.active = True
8 admin_user.password = make_flask_user_password("tuckfrump")
9 admin_user.github_username = "EliasFleckenstein03"
10 admin_user.forums_username = "Fleckenstein"
11 admin_user.rank = UserRank.ADMIN
12 session.add(admin_user)
15 for tag in ["Render", "World", "Player", \
16 "Chat", "Exploit", "Inventory", "Movement", \
17 "Combat", "Bot", "GUI", \
18 "MineClone", "Any Game", "CTF", "Minetest Game"]:
24 for license in ["GPLv2.1", "GPLv3", "LGPLv2.1", "LGPLv3", "AGPLv2.1", "AGPLv3",
25 "Apache", "BSD 3-Clause", "BSD 2-Clause", "CC0", "CC-BY-SA",
26 "CC-BY", "MIT", "ZLib", "Other (Free)"]:
27 row = License(license)
28 licenses[row.name] = row
31 for license in ["CC-BY-NC-SA", "Other (Non-free)"]:
32 row = License(license, False)
33 licenses[row.name] = row
37 def populate_test_data(session):
38 licenses = { x.name : x for x in License.query.all() }
39 tags = { x.name : x for x in Tag.query.all() }
40 admin_user = User.query.filter_by(rank=UserRank.ADMIN).first()
43 cora.github_username = "corarona"
44 cora.rank = UserRank.EDITOR
47 not1 = Notification(admin_user, cora, "Schematicas Approved", "/packages/Fleckenstein/schematicas/")
51 anon5.github_username = "anon55555"
55 mod.state = PackageState.APPROVED
57 mod.title = "Perlin Terraforming"
58 mod.license = licenses["GPLv3"]
59 mod.media_license = licenses["GPLv3"]
60 mod.type = PackageType.MOD
61 mod.author = admin_user
62 mod.tags.append(tags["world"])
63 mod.tags.append(tags["any_game"])
64 mod.repo = "https://github.com/EliasFleckenstein03/perlin"
65 mod.issueTracker = "https://github.com/EliasFleckenstein03/perlin/issues"
66 mod.short_desc = "A dragonfire CSM that does terraforming automatically using perlin noise."
70 rel = PackageRelease()
73 rel.url = "https://github.com/EliasFleckenstein03/perlin/archive/master.zip"
78 mod.state = PackageState.APPROVED
81 mod.license = licenses["GPLv3"]
82 mod.media_license = licenses["GPLv3"]
83 mod.type = PackageType.MOD
84 mod.author = admin_user
85 mod.tags.append(tags["movement"])
86 mod.tags.append(tags["exploit"])
87 mod.tags.append(tags["gui"])
88 mod.tags.append(tags["any_game"])
89 mod.repo = "https://github.com/EliasFleckenstein03/warp"
90 mod.issueTracker = "https://github.com/EliasFleckenstein03/warp/issues"
91 mod.short_desc = "A dragonfire CSM to set warps in the world and use the teleport exploit."
95 rel = PackageRelease()
98 rel.url = "https://github.com/EliasFleckenstein03/warp/archive/master.zip"
103 mod.state = PackageState.APPROVED
104 mod.name = "pathfinding"
105 mod.title = "Pathfinding"
106 mod.license = licenses["GPLv3"]
107 mod.media_license = licenses["GPLv3"]
108 mod.type = PackageType.MOD
109 mod.author = admin_user
110 mod.tags.append(tags["movement"])
111 mod.tags.append(tags["bot"])
112 mod.tags.append(tags["any_game"])
113 mod.repo = "https://github.com/EliasFleckentein03/pathfinding"
114 mod.issueTracker = "https://github.com/EliasFleckentein03/pathfinding/issues"
115 mod.short_desc = "A dragonfire CSM that adds .goto command."
119 rel = PackageRelease()
122 rel.url = "https://github.com/EliasFleckentein03/pathfinding/archive/master.zip"
127 mod.state = PackageState.APPROVED
128 mod.name = "schematicas"
129 mod.title = "Schematicas"
130 mod.license = licenses["GPLv3"]
131 mod.media_license = licenses["GPLv3"]
132 mod.type = PackageType.MOD
133 mod.author = admin_user
134 mod.tags.append(tags["world"])
135 mod.tags.append(tags["bot"])
136 mod.tags.append(tags["any_game"])
137 mod.repo = "https://github.com/EliasFleckenstein03/schematicas/"
138 mod.issueTracker = "https://github.com/EliasFleckenstein03/schematicas/issues"
139 mod.short_desc = "Dragonfire CSM for saving structures and building them automatically."
143 rel = PackageRelease()
146 rel.url = "https://github.com/EliasFleckenstein03/schematicas/archive/master.zip"
151 txp.state = PackageState.APPROVED
152 txp.name = "mc_textures"
153 txp.title = "Minecraft Textures"
154 txp.license = licenses["Other (Non-free)"]
155 txp.media_license = licenses["Other (Non-free)"]
156 txp.type = PackageType.TXP
157 txp.author = admin_user
158 txp.tags.append(tags["mineclone"])
159 txp.repo = "https://github.com/EliasFleckenstein03/mc-textures/"
160 txp.issueTracker = "https://github.com/EliasFleckenstein03/mc-textures/issues"
161 txp.short_desc = "MineClone2 Texture Pack containing the original minecraft textures."
165 rel = PackageRelease()
168 rel.url = "https://github.com/EliasFleckenstein03/mc-textures/master.zip"
177 for package in Package.query.filter_by(type=PackageType.MOD).all():
180 meta = metas[package.name]
182 meta = MetaPackage(package.name)
184 metas[package.name] = meta
185 package.provides.append(meta)