-
Notifications
You must be signed in to change notification settings - Fork 2
move networkx call to read_data / reformatting with ruff #20
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d85bf8d
add lint workflow
aditya0by0 838e3ad
update pre-commit
aditya0by0 9c765c0
ruff format -- all
aditya0by0 2ba4932
ruff error - use func instead of line func
aditya0by0 f34fe80
dyanmic import for nx
aditya0by0 cd2655d
update pyproject for inference
aditya0by0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Lint | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' # or any version your project uses | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install black==25.1.0 ruff==0.12.2 | ||
|
|
||
| - name: Run Black | ||
| run: black --check . | ||
|
|
||
| - name: Run Ruff (no formatting) | ||
| run: ruff check . --no-fix |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,31 @@ | ||
| repos: | ||
| #- repo: https://github.com/PyCQA/isort | ||
| # rev: "5.12.0" | ||
| # hooks: | ||
| # - id: isort | ||
| - repo: https://github.com/psf/black | ||
| rev: "22.10.0" | ||
| rev: "25.1.0" | ||
| hooks: | ||
| - id: black | ||
| - id: black | ||
| - id: black-jupyter # for formatting jupyter-notebook | ||
|
|
||
| - repo: https://github.com/pycqa/isort | ||
| rev: 5.13.2 | ||
| hooks: | ||
| - id: isort | ||
| name: isort (python) | ||
| args: ["--profile=black"] | ||
|
|
||
| - repo: https://github.com/asottile/seed-isort-config | ||
| rev: v2.2.0 | ||
| hooks: | ||
| - id: seed-isort-config | ||
|
|
||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.6.0 | ||
| hooks: | ||
| - id: check-yaml | ||
| - id: end-of-file-fixer | ||
| - id: trailing-whitespace | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.12.2 | ||
| hooks: | ||
| - id: ruff | ||
| args: [--fix] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,37 @@ | ||
| from chebai_graph.preprocessing.properties import * | ||
| from chebai_graph.preprocessing.properties import ( | ||
| AtomAromaticity, | ||
| AtomCharge, | ||
| AtomChirality, | ||
| AtomHybridization, | ||
| AtomNumHs, | ||
| AtomProperty, | ||
| AtomType, | ||
| BondAromaticity, | ||
| BondInRing, | ||
| BondProperty, | ||
| BondType, | ||
| MolecularProperty, | ||
| MoleculeNumRings, | ||
| MoleculeProperty, | ||
| NumAtomBonds, | ||
| RDKit2DNormalized, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "AtomAromaticity", | ||
| "AtomCharge", | ||
| "AtomChirality", | ||
| "AtomHybridization", | ||
| "AtomNumHs", | ||
| "AtomProperty", | ||
| "AtomType", | ||
| "BondAromaticity", | ||
| "BondInRing", | ||
| "BondProperty", | ||
| "BondType", | ||
| "MolecularProperty", | ||
| "MoleculeNumRings", | ||
| "MoleculeProperty", | ||
| "NumAtomBonds", | ||
| "RDKit2DNormalized", | ||
| ] |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| from chebai_graph.preprocessing.datasets.chebi import GraphPropertiesMixIn | ||
| from chebai.preprocessing.datasets.pubchem import PubchemChem | ||
|
|
||
| from chebai_graph.preprocessing.datasets.chebi import GraphPropertiesMixIn | ||
|
|
||
|
|
||
| class PubChemGraphProperties(GraphPropertiesMixIn, PubchemChem): | ||
| pass |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import random | ||
|
|
||
| import torch | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| class_path: chebai_graph.preprocessing.datasets.chebi.ChEBI50GraphData | ||
| class_path: chebai_graph.preprocessing.datasets.chebi.ChEBI50GraphData |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| class_path: chebai_graph.loss.pretraining.MaskPretrainingLoss | ||
| class_path: chebai_graph.loss.pretraining.MaskPretrainingLoss |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,4 @@ init_args: | |
| hidden_length: 512 | ||
| dropout_rate: 0.1 | ||
| n_conv_layers: 3 | ||
| n_linear_layers: 3 | ||
| n_linear_layers: 3 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ init_args: | |
| dropout_rate: 0.1 | ||
| n_conv_layers: 5 | ||
| n_linear_layers: 3 | ||
| n_heads: 5 | ||
| n_heads: 5 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,4 @@ init_args: | |
| n_conv_layers: 5 | ||
| n_linear_layers: 3 | ||
| n_atom_properties: 125 | ||
| n_bond_properties: 5 | ||
| n_bond_properties: 5 | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only code where dynamic import is used, rest of the changes are formatting changes by ruff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks