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

Merging the Milestone 3.5. refactor #456

Merged
merged 159 commits into from
Aug 14, 2023
Merged

Merging the Milestone 3.5. refactor #456

merged 159 commits into from
Aug 14, 2023

Conversation

TheDuckCow
Copy link
Member

No description provided.

StandingPad and others added 30 commits October 16, 2022 16:56
As we're dropping 2.7x support, this is no longer needed. Most of the
compatability functions will remain though since they're more readable.
Replaced some instances of os.path with the Path object from pathlib for
readability. Also added type annotations to MCprepEnv as we're moving
towards that. This also means MCprep will not work at all in Blender
2.7x due to the use of new syntax.

This will be the first in a long process of modernizing MCprep's code
with 2.8 style code. Blender 2.7x users may not be happy, but it's for
the better. If anything, 6 years worth of 2.7x support was a mistake (in
my opinion), as it limited what we could do and opened MCprep to even
more bugs (like in Blender 2.93 with make_annotations, which ironically
now is deprecated).
Replaced the old = syntax with the new : syntax. This also removes the
need for make_annotations, hence why they're removed.
As we're removing 2.7x support, it makes sense to remove Blender
Internal compatability as the engine is not present in Blender 2.8 and
above. Even UPBGE (a fork of the Blender game engine that's still
maintained) uses EEVEE, so there's no reason to continue supporting
Blender Internal.
The bang at the top meant Linux users couldn't run the test suite. This
changes now allows Linux users to run tests
Deprecation warning function was moved in MCprepEnv since it made more
sense to put it there
Originally matprep_cycles used to take multiple arguments, each one
representing a seperate option. This was annoying as it meant the
function has an unfathomable amount of arguments to keep track of.

This has been replaced with a dataclass (called PrepOptions) that keeps
track of all the options selected by the user. Not only does it make it
slightly easier for developers, it also gives the following benefits:
	- More info on what types the different options are
	- Better organization

Previously we couldn't do this due to 2.7x support, hence this being in
mcprep-3_5-recore.
Dev to master for v3.4.3
I'm honestly not sure how I missed these, but good thing they were
caught. Now MCprep shouldn't be dealing with any errors related to env
now...
TheDuckCow and others added 26 commits July 23, 2023 10:06
All tests passing, but also created disabled by default tests that
have UI triggered popups which would be annoying to have on by default,
but are good for code coverage.
…nittest-library

Set up new unittest system
Test intentionally does not yet pass, as there's a bug in the code to
fix first. Will do so in the next commit.
One reference wasn't using the new system for version-agnostic mix rgb
slot selection, that is now fixed and all tests are passing across all
versions.
All tests passing, but also created disabled by default tests that
have UI triggered popups which would be annoying to have on by default,
but are good for code coverage.
Test intentionally does not yet pass, as there's a bug in the code to
fix first. Will do so in the next commit.
One reference wasn't using the new system for version-agnostic mix rgb
slot selection, that is now fixed and all tests are passing across all
versions.
Tests are slower to run now since there's no -fast command, but all
tests currently run.
This is to make sure the latest versions of every dependency is
installed, as to reduce variables in what could be causing errors.
Migrated initial prep material tests, all currently passing.
@TheDuckCow TheDuckCow marked this pull request as ready for review August 14, 2023 02:47
@TheDuckCow
Copy link
Member Author

As a sanity check, current state of tests:

-------------------------------------------------------------------------------
bversion   	ran_tests	ran	skips	failed	errors
-------------------------------------------------------------------------------
(3.6.0)   	all_tests	29	2	0	No errors
(4.0.0)   	all_tests	29	2	0	No errors
(3.5.1)   	all_tests	29	2	0	No errors
(3.4.0)   	all_tests	29	2	0	No errors
(3.3.1)   	all_tests	29	2	0	No errors
(3.2.1)   	all_tests	29	2	0	No errors
(3.1.0)   	all_tests	29	2	0	No errors
(3.0.0)   	all_tests	29	2	0	No errors
(2.93.0)   	all_tests	29	2	0	No errors
(2.90.1)   	all_tests	29	2	0	No errors
(2.80.75)   	all_tests	28	3	0	No errors
tests took 49s to run

@TheDuckCow TheDuckCow merged commit fb8d11e into dev Aug 14, 2023
@TheDuckCow TheDuckCow deleted the milestone-3-5-0 branch August 14, 2023 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants