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

V2/format with black #504

Merged
merged 105 commits into from
Dec 16, 2023
Merged

Conversation

davidegraff
Copy link
Contributor

@davidegraff davidegraff commented Oct 7, 2023

Description

This PR formats the entire chemprop/v2 codebase with black and autopep8 and addresses a majority of the warnings from flake8

PR stack:

  1. better RegistryAction #497
  2. THIS

xiaoruiDong and others added 26 commits November 21, 2023 16:34
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 kevingreenman merged commit 0f34c4e into chemprop:v2/dev Dec 16, 2023
3 checks passed
@davidegraff davidegraff deleted the v2/format-with-black branch January 10, 2024 22:22
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

3 participants