-
Notifications
You must be signed in to change notification settings - Fork 21
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
Merge develop into master branch #306
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
78a9356
Add magpie data to data_loader
edbb91a
Add magpie properties
0f3355f
Add magpie data
b563be1
Update smact/data_loader.py
AntObi 22bd955
Merge pull request #289 from AntObi/data_updates
AntObi ddef919
Add the modified NValence file
9a2250e
Load in the modified NValence data
9d8f9f0
Fix __init__.py
8500179
Merge pull request #290 from AntObi/nvalence_modification
AntObi 92e9bc9
Merge pull request #298 from WMD-group/master
AntObi 231bb20
VEC integration into smact.properties
ryannduma c84e475
small tweak to csv file naming
ryannduma 289ac52
changes to valence_electron_count & test_core.py
ryannduma c085b49
ran pre-commit
ryannduma b9a303a
moved VECexample.py to examples/vec_example.py
ryannduma e90a23b
ran pre-commit to fix qa failures
ryannduma 80ccabf
fixing test.core issues
ryannduma 8377670
updates on tests, pre-commit-config.yaml, and
ryannduma f8b7a8a
testing value error for invalid elements in VEC
ryannduma 55ba0db
ValueError Modifications in VEC for
ryannduma b6f4a7b
Merge pull request #305 from ryannduma/VEC
AntObi 538d6ae
Add composition utility module
AntObi e73ca25
Add test for parsing formulas
AntObi 44927f5
Remove parser function defined within a function
AntObi bbf35d4
Add contributing guide
AntObi 6dbda8b
Add form_maker and comp_maker to utils
AntObi df08b83
Add tests for comp_maker and form_maker
AntObi 508f78a
Fix link
AntObi 92fca9f
Add __future__ import
AntObi 4bf54ce
Correct the type hint
AntObi 87e4f61
Add __init__.py in utils
AntObi 7a8a13b
Run pre-commit
AntObi b067048
Add utils to packages in setup.py
AntObi e34abb8
Add docs for utils
AntObi 487247a
Fix name
AntObi 83507d8
Add utils to docs
AntObi 7b1f4f1
Merge pull request #307 from AntObi/utils
AntObi b937fae
Modify if else block for valence data for conciseness
AntObi 54672d0
Improve docstring in parse_formula
AntObi 97034aa
Improve docstring and use a dictionary comprehension for simplification
AntObi 32d7f23
Improve docstring
AntObi a5bcf69
Improve docstring
AntObi 69dae14
Remove unused imports
AntObi 50865b7
Update metadata
AntObi 4b0ea93
Update conf.py
AntObi 6199001
Add warnings about changing SMACT defaults
AntObi d440b16
Merge pull request #308 from AntObi/develop
AntObi add458e
Update contact info in the README
AntObi 4dc7117
Update requirement.txt
AntObi a7946c9
Update README.md
AntObi 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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Contributing | ||
|
||
This is a quick guide on how to follow best practice and contribute smoothly to `SMACT`. | ||
|
||
## Workflow | ||
|
||
We follow the [GitHub flow](<https://docs.github.com/en/get-started/using-github/github-flow>), using | ||
branches for new work and pull requests for verifying the work. | ||
|
||
The steps for a new piece of work can be summarised as follows: | ||
|
||
1. Push up or create [an issue](https://github.com/WMD-group/SMACT/issues). | ||
2. Create a branch from main, with a sensible name that relates to the issue. | ||
3. Do the work and commit changes to the branch. Push the branch | ||
regularly to GitHub to make sure no work is accidentally lost. | ||
4. Write or update unit tests for the code you work on. | ||
5. When you are finished with the work, ensure that all of the unit | ||
tests pass on your own machine. | ||
6. Open a pull request [on the pull request page](https://github.com/WMD-group/SMACT/pulls). | ||
7. If nobody acknowledges your pull request promptly, feel free to poke one of the main developers into action. | ||
|
||
## Pull requests | ||
|
||
For a general overview of using pull requests on GitHub look [in the GitHub docs](https://help.github.com/en/articles/about-pull-requests). | ||
|
||
When creating a pull request you should: | ||
|
||
- Ensure that the title succinctly describes the changes so it is easy to read on the overview page | ||
- Reference the issue which the pull request is closing | ||
|
||
Recommended reading: [How to Write the Perfect Pull Request](https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/) | ||
|
||
## Dev requirements | ||
|
||
When developing locally, it is recommended to install the python packages in `requirements-dev.txt`. | ||
|
||
```bash | ||
pip install -r requirements-dev.txt | ||
``` | ||
|
||
This will allow you to run the tests locally with pytest as described in the main README, | ||
as well as run pre-commit hooks to automatically format python files with isort and black. | ||
To install the pre-commit hooks (only needs to be done once): | ||
|
||
```bash | ||
pre-commit install | ||
pre-commit run --all-files # optionally run hooks on all files | ||
``` | ||
|
||
Pre-commit hooks will check all files when you commit changes, automatically fixing any files which are not formatted correctly. Those files will need to be staged again before re-attempting the commit. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,14 +122,15 @@ Development notes | |
----------------- | ||
|
||
### Bugs, features and questions | ||
Please use the [Issue Tracker](https://github.com/WMD-group/smact/issues) to report bugs or request features in the first instance. While we hope that most questions can be answered by searching [the docs](https://smact.readthedocs.io/en/latest/), we welcome new questions on the issue tracker, especially if they helps us improve the docs! For other queries about any aspect of the code, please contact either Dan Davies (author) or Anthony Onwuli (maintainer) by e-mail: d.w.davies@imperial.ac.uk or [email protected] respectively. | ||
Please use the [Issue Tracker](https://github.com/WMD-group/smact/issues) to report bugs or request features in the first instance. While we hope that most questions can be answered by searching [the docs](https://smact.readthedocs.io/en/latest/), we welcome new questions on the issue tracker, especially if they help us improve the docs! For other queries about any aspect of the code, please contact either Aron Walsh on behalf of The SMACT Developers (author) or Anthony Onwuli (maintainer) by e-mail: a.walsh@imperial.ac.uk or [email protected] respectively. | ||
|
||
### Code contributions | ||
We are always looking for ways to make SMACT better and more useful to the wider community; contributions are welcome. Please use the ["Fork and Pull"](https://guides.github.com/activities/forking/) workflow to make contributions and stick as closely as possible to the following: | ||
|
||
- Code style should comply with [PEP8](http://www.python.org/dev/peps/pep-0008) where possible. [Google's house style](https://google.github.io/styleguide/pyguide.html) is also helpful, including a good model for docstrings. | ||
- Please use comments liberally when adding nontrivial features, and take the chance to clean up other people's code while looking at it. | ||
- Add tests wherever possible, and use the test suite to check if you broke anything. | ||
- Look at the [contributing guide](CONTRIBUTING.md) for more information. | ||
|
||
### Tests | ||
Testing modules should be pass/fail and wrapped into **tests/test_core.py** or another **tests/test_something.py** file added, if appropriate. | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SMACT Utilities Composition Module | ||
===================================== | ||
|
||
Miscellaneous utilities for composition handling | ||
|
||
.. automodule:: smact.utils.composition | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SMACT Utilities module | ||
=========================== | ||
|
||
The utilities module provides some utilty functions to support the core functionalities of SMACT | ||
|
||
Submodules | ||
---------- | ||
|
||
.. toctree:: | ||
|
||
smact.utils.composition |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from smact.properties import valence_electron_count | ||
|
||
# Define the compound | ||
compound = "Fe2O3" | ||
|
||
# Calculate the Valence Electron Count (VEC) | ||
vec = valence_electron_count(compound) | ||
|
||
# Print the result | ||
print(f"The Valence Electron Count (VEC) for {compound} is: {vec:.2f}") |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#!/usr/bin/env python | ||
|
||
__author__ = "Daniel W. Davies" | ||
__author_email__ = "d.w.davies@imperial.ac.uk" | ||
__author__ = "The SMACT Developers" | ||
__author_email__ = "a.walsh@imperial.ac.uk" | ||
__copyright__ = ( | ||
"Copyright Daniel W. Davies, Adam J. Jackson, Keith T. Butler (2019)" | ||
) | ||
__version__ = "2.6" | ||
__version__ = "2.7" | ||
__maintainer__ = "Anthony O. Onwuli" | ||
__maintaier_email__ = "[email protected]" | ||
__date__ = "July 10 2024" | ||
__maintainer_email__ = "[email protected]" | ||
__date__ = "August 30 2024" | ||
|
||
|
||
import os | ||
import unittest | ||
|
@@ -28,10 +29,11 @@ | |
author=__author__, | ||
author_email=__author_email__, | ||
maintainer=__maintainer__, | ||
maintainer_email=__maintaier_email__, | ||
maintainer_email=__maintainer_email__, | ||
license="MIT", | ||
packages=[ | ||
"smact", | ||
"smact.utils", | ||
"smact.tests", | ||
"smact.structure_prediction", | ||
"smact.dopant_prediction", | ||
|
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
Oops, something went wrong.
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.
Correct grammatical error in the issue tracker sentence.
The previous comment by coderabbitai[bot] highlighted a grammatical error that still needs correction. The verb form should be 'help' instead of 'helps' to agree with the plural subject 'they'.
Apply this diff to correct the grammar:
Committable suggestion
Tools
Markdownlint