-
Notifications
You must be signed in to change notification settings - Fork 548
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
V2/format with black #504
Merged
kevingreenman
merged 105 commits into
chemprop:v2/dev
from
davidegraff:v2/format-with-black
Dec 16, 2023
Merged
V2/format with black #504
kevingreenman
merged 105 commits into
chemprop:v2/dev
from
davidegraff:v2/format-with-black
Dec 16, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The introduction of torch_scatter changes the attribute of MolGraph to E, V, edge_index, and rev_edge_index. Others are gone. The Test of V is mainly covered by the test of _calc_node_feature_matrix; the test of E should be partially covered by the test of _calc_edge_feature. So the test of __call__ majorly covers 1. the shape of E and V; 2. examine edge_index and rev_edge_index are expected. When testing the later two attributes, an equivalent but slightly different implementation is used.
1. Create mode_balanced and mode_imbalanced fixture. Behavior change: Originally, each smiles is only tested on one specific mode for some tests. Now, test each smiles on all relevant modes with these new fixtures. This is okay as each test is extremely fast. 2. add rxn_smi fixture to avoid parametrize rxn_smiles every time 3. reuse fixtures of mode_name and rxn_mode to avoid parametrize AVAILABLE_RXN_MODE_NAMES 4. avoid using xxx.items in parametrize as the sequence is not guaranteed. Use dict get inside the unit tests.
kevingreenman
approved these changes
Dec 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR formats the entire
chemprop/v2
codebase withblack
andautopep8
and addresses a majority of the warnings fromflake8
PR stack:
RegistryAction
#497