Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch script methods need regression tests #87

Open
2 of 47 tasks
snake-biscuits opened this issue Feb 22, 2023 · 6 comments
Open
2 of 47 tasks

Branch script methods need regression tests #87

snake-biscuits opened this issue Feb 22, 2023 · 6 comments
Assignees
Labels
need test We need to write a test for regression testing slow burn lots of work & will take a long time Test Map Adding a map to ship with bsp_tool for tests
Milestone

Comments

@snake-biscuits
Copy link
Owner

snake-biscuits commented Feb 22, 2023

We need more tests to ensure stability.
#73 is going to lead to a lot of refactors & the variable names in methods need to stay up to date.

With #16, we'll have plenty of sample data
If the maps don't change, we can check for determinism

We might have to develop special test maps for some methods
A small test zoo to isolate & show of engine features would be cool (like Source SDK mapsrc/)

Good tests double as documentation, showing how to use features

Methods

  • bspx
    • face_normals
  • id_software.quake
    • face_mesh
    • leaves_of_node
    • lightmap_of_face
    • model
    • parse_vis
  • id_software.quake2
    • face_mesh
  • infinity_ward.call_of_duty1_demo
    • brush
    • model
    • patch_collision_mesh
    • portal_file
    • triangle_soup_mesh
  • infinity_ward.modern_warfare
    • collision_part_mesh
    • layered_triangle_soup_mesh
    • simple_triangle_soup_mesh
  • ion_storm.daikatana
    • plane_faces
  • respawn.apex_legends
    • lit_vertex
    • mesh
    • shadow_mesh
    • texture_data_surface_name
    • unlit_vertex
    • water_body_model
  • respawn.titanfall
    • brush
    • lit_vertex
    • mesh
    • model
    • occlusion_mesh
    • portals_as_prt
    • search_all_entities
    • shadow_mesh
    • tricoll_model
    • unlit_vertex
  • shared
    • worldspawn_volume
  • valve.source
    • displacement_mesh
    • face_mesh
    • model
    • textures_of_brush
@snake-biscuits snake-biscuits added slow burn lots of work & will take a long time need test We need to write a test for regression testing labels Feb 22, 2023
@snake-biscuits snake-biscuits added this to the v0.4.0 milestone Feb 22, 2023
@snake-biscuits snake-biscuits self-assigned this Feb 22, 2023
@snake-biscuits snake-biscuits modified the milestones: v0.4.0, v1.0.0 Mar 17, 2023
@snake-biscuits snake-biscuits added the Test Map Adding a map to ship with bsp_tool for tests label Aug 12, 2023
@snake-biscuits
Copy link
Owner Author

Should probably make a task list of each method so we can track done-ness

@snake-biscuits
Copy link
Owner Author

snake-biscuits commented Aug 12, 2023

How to get a list of all methods:

>>> import bsp_tool
>>> methods = {
...     method
...     for branch in (bsp_tool.branches.quake_based | bsp_tool.branches.source_based)
...     for name, method in branch.methods.items()}
... 
>>> from collections import defaultdict
>>> dd = defaultdict(set)
>>> for method in methods:
...     dd[method.__module__].add(method.__name__)
... 

@snake-biscuits
Copy link
Owner Author

More vertices_of_* methods are planned
I might even move towards unique vertices + indices vs raw triangls
The old OpenGL viewer preferred raw data, but blender exports & decompiles need more context

@snake-biscuits snake-biscuits changed the title branch_script methods need regression testing Branch script methods need regression tests Aug 12, 2023
@snake-biscuits
Copy link
Owner Author

We should also test each branch that implements a given methods, making sure it's still valid
Some of that will come down to #73, but some branches might just be poor fits

@snake-biscuits
Copy link
Owner Author

respawn.titanfall.get_brush_sides doesn't work on MRVN-Radiant .bsps
MRVN-Radiant doesn't emit BrushSideTextureVectors, might have to make a PR

@snake-biscuits
Copy link
Owner Author

branches.bspx (added in 2a5433b) needs it's methods tracked too

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need test We need to write a test for regression testing slow burn lots of work & will take a long time Test Map Adding a map to ship with bsp_tool for tests
Projects
Status: Todo: Test
Status: Todo: Test Map
Status: Todo: Tools
Development

No branches or pull requests

1 participant