Skip to content

Commit 056af27

Browse files
committed
Merge branch 'main' of https://github.com/ssec-jhu/bluephos into new-octahedral-embed
2 parents 4133032 + 404bf12 commit 056af27

File tree

13 files changed

+144
-24
lines changed

13 files changed

+144
-24
lines changed

CONTRIBUTING.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Contributing to the BluePhos Pipeline Project
2+
3+
Thank you for your interest in contributing to the BluePhos pipeline project! As a contributor, you’ll work from your fork of the main repository. This document outlines the steps to set up your development environment, guidelines for coding, and instructions for submitting contributions.
4+
5+
## Repository Information
6+
7+
- **Main Repository**: [BluePhos Main Repo](https://github.com/ssec-jhu/bluephos.git)
8+
9+
## How to Fork the Repository
10+
11+
1. **Go to the Repository on GitHub**:
12+
- Open your web browser and navigate to the main repository you want to fork. For the BluePhos pipeline, the URL is [https://github.com/ssec-jhu/bluephos.git](https://github.com/ssec-jhu/bluephos.git).
13+
14+
2. **Click the Fork Button**:
15+
- In the upper-right corner of the repository page, you’ll see a button labeled **Fork**. Click it.
16+
- GitHub will ask you to select your GitHub account or organization where you want the fork to be created.
17+
18+
3. **Wait for the Fork to Complete**:
19+
- GitHub will create a copy of the repository under your account. This new repository is your fork, and you’ll be directed to the forked repository page (e.g., `https://github.com/your-username/bluephos`).
20+
21+
4. **Clone Your Fork Locally**:
22+
- Once your fork is created, you can clone it to your local machine to start working:
23+
```bash
24+
git clone https://github.com/your-username/bluephos.git
25+
cd bluephos
26+
```
27+
28+
You now have your own copy (fork) of the repository where you can make changes independently from the main repository. When you’re ready to contribute back, you can create a pull request from your fork to the main repository.
29+
30+
## Getting Started
31+
32+
1. **Fork the Repository**: First, create a fork of the main repository in your own GitHub account. This will allow you to freely make changes without affecting the main repository.
33+
34+
2. **Clone Your Fork**: Clone your fork to your local machine:
35+
```bash
36+
git clone https://github.com/your-username/bluephos.git
37+
cd bluephos
38+
```
39+
40+
3. **Add the Main Repository as Upstream**: To keep your fork in sync with the latest updates from the main repo, add it as a second remote named `upstream`:
41+
```bash
42+
git remote add upstream https://github.com/ssec-jhu/bluephos.git
43+
```
44+
45+
4. **Create a Branch**: Create a new branch for each feature or bug fix:
46+
```bash
47+
git checkout -b feature/your-feature-name
48+
```
49+
50+
## Making Changes
51+
52+
- **Coding Standards**: Follow PEP 8 for Python code. Use `tox -e format` to ensure code formatting aligns with the repository’s requirements.
53+
- **Testing**: Ensure your changes pass all tests. Include relevant tests for any new features you add.
54+
- **Documentation**: Update the documentation for any significant code changes. This includes comments, docstrings, and relevant updates to the `README.md`.
55+
56+
## Keeping Your Fork Updated
57+
58+
Regularly pull updates from the main repository to keep your fork in sync:
59+
```bash
60+
git fetch upstream
61+
git merge upstream/main
62+
```
63+
64+
## Submitting a Pull Request
65+
66+
When you’re ready to contribute your changes:
67+
68+
1. **Commit Your Changes**: Write concise and descriptive commit messages.
69+
```bash
70+
git add -u # Use 'git add .' if adding new files
71+
git commit -m "Description of changes"
72+
```
73+
74+
2. **Push to Your Fork**:
75+
```bash
76+
git push origin feature/your-feature-name
77+
```
78+
79+
3. **Open a Pull Request**:
80+
- Go to your forked repository on GitHub.
81+
- Click on **New Pull Request**.
82+
- Ensure the base repository is `ssec-jhu/bluephos` and the base branch is `main`.
83+
- Provide a title and description for your pull request.
84+
- Submit the pull request for review.
85+
86+
## Code Review Process
87+
88+
Once you submit a pull request:
89+
- The maintainers will review your changes and may request modifications.
90+
- Please address any feedback and re-submit for review.
91+
92+
## Issues and Support
93+
94+
If you encounter issues or have questions, feel free to open an issue on GitHub. We’ll do our best to assist.
95+
96+
## License
97+
98+
By contributing, you agree that your contributions will be licensed under the same open-source license as the project.
99+
100+
---
101+
102+
Thank you for your contributions to the BluePhos pipeline! We’re excited to work with you.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
BluePhos: An automated pipeline optimizing the synthesis and analysis of blue phosphorescent materials.
1212

13+
1314
# BluePhos Pipeline Introduction
1415

1516
### Overview
@@ -140,6 +141,9 @@ query_result = ddb.query('''SELECT * FROM '08ca147e-f618-11ee-b38f-eab1f408aca3-
140141
print(query_result.to_df())
141142
```
142143

144+
# Contributing
145+
146+
We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to this project.
143147

144148

145149

bluephos/bluephos_pipeline.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
__doc__ = """"BluePhos Discovery Pipeline"""
22

33
from pathlib import Path
4-
import pandas as pd
4+
55
import numpy as np
6+
import pandas as pd
67
from dplutils import cli
78
from dplutils.pipeline.ray import RayStreamGraphExecutor
8-
from bluephos.tasks.generateligandtable import GenerateLigandTableTask
9-
from bluephos.tasks.nn import NNTask
10-
from bluephos.tasks.optimizegeometries import OptimizeGeometriesTask
11-
from bluephos.tasks.smiles2sdf import Smiles2SDFTask
9+
1210
from bluephos.tasks.dft import DFTTask
1311
from bluephos.tasks.filter_pipeline import (
12+
FilterDFTInTask,
13+
FilterDFTOutTask,
1414
FilterNNInTask,
1515
FilterNNOutTask,
1616
FilterXTBInTask,
1717
FilterXTBOutTask,
18-
FilterDFTInTask,
19-
FilterDFTOutTask,
2018
)
19+
from bluephos.tasks.generateligandtable import GenerateLigandTableTask
20+
from bluephos.tasks.nn import NNTask
21+
from bluephos.tasks.optimizegeometries import OptimizeGeometriesTask
22+
from bluephos.tasks.smiles2sdf import Smiles2SDFTask
2123

2224

2325
def ligand_pair_generator(halides_file, acids_file):

bluephos/modules/dft_calculators.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import logging
2+
import multiprocessing
13
import os
24
import subprocess
3-
import multiprocessing
4-
import logging
55
from textwrap import dedent
6+
67
from bluephos.modules.dft_extract import extract
78

89
# Constants

bluephos/modules/dft_extract.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import re
2-
import numpy as np
32
from glob import iglob
3+
4+
import numpy as np
5+
46
import bluephos.modules.log_config as log_config
57

68
# Setup logging and get a logger instance

bluephos/tasks/dft.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import multiprocessing
12
import os
23
import tempfile
3-
import multiprocessing
4+
45
import pandas as pd
5-
import bluephos.modules.log_config as log_config
6-
from bluephos.modules.dft_calculators import OrcaCalculator, ASECalculator, remove_second_row
7-
from dplutils.pipeline import PipelineTask
86
from dplutils import observer
7+
from dplutils.pipeline import PipelineTask
8+
9+
import bluephos.modules.log_config as log_config
10+
from bluephos.modules.dft_calculators import ASECalculator, OrcaCalculator, remove_second_row
911

1012
# Setup logging and get a logger instance
1113
logger = log_config.setup_logging(__name__)

bluephos/tasks/generateligandtable.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import pandas as pd
2-
import bluephos.modules.log_config as log_config
32
from dplutils.pipeline import PipelineTask
43
from rdkit.Chem import AllChem, MolFromSmiles, MolToSmiles
54

5+
import bluephos.modules.log_config as log_config
6+
67
# Setup logging and get a logger instance
78
logger = log_config.setup_logging(__name__)
89

bluephos/tasks/nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import pandas as pd
22
import torch as t
33
import torch.nn.functional as F
4-
import bluephos.modules.log_config as log_config
54
from dplutils.pipeline import PipelineTask
65
from torch.nn import Dropout, Linear
76
from torch.nn.init import kaiming_normal_
87
from torch_geometric.loader import DataLoader
98
from torch_geometric.nn import GCN, Set2Set
109

10+
import bluephos.modules.log_config as log_config
1111
from bluephos.modules.sdf2feature import feature_create
1212

1313
# Setup logging and get a logger instance

bluephos/tasks/optimizegeometries.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import bluephos.modules.log_config as log_config
21
from time import sleep
2+
33
import pandas as pd
44
from ase.calculators.calculator import InputError
5-
from dplutils.pipeline import PipelineTask
65
from dplutils import observer
6+
from dplutils.pipeline import PipelineTask
77
from rdkit import Chem
88
from rdkit.Chem import AddHs, MolToXYZBlock
9-
from bluephos.modules.annotate_rdkit_with_ase import optimize_geometry, annotate_molecule_property
9+
10+
import bluephos.modules.log_config as log_config
11+
from bluephos.modules.annotate_rdkit_with_ase import annotate_molecule_property, optimize_geometry
1012
from bluephos.modules.bond_length import bonds_maintained
1113
from bluephos.modules.isoctahedral import isoctahedral
1214
from bluephos.modules.octahedral_embed import octahedral_embed

bluephos/tasks/smiles2sdf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from functools import reduce
2+
23
import pandas as pd
3-
import bluephos.modules.log_config as log_config
44
from dplutils.pipeline import PipelineTask
55
from rdkit import Chem
66
from rdkit.Chem import AddHs, AllChem, MolFromSmiles
77
from rdkit.Chem.rdmolops import CombineMols, Kekulize, SanitizeMol
88

9+
import bluephos.modules.log_config as log_config
910

1011
# Setup logging and get a logger instance
1112
logger = log_config.setup_logging(__name__)

0 commit comments

Comments
 (0)