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

Provide functions for reference data #312

Merged
merged 23 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a0d5c55
Provide functions for reference data
jan-janssen Jul 29, 2024
dc43179
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 29, 2024
86a1645
Add a first set of unit tests
jan-janssen Jul 29, 2024
e141423
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 29, 2024
035d69d
update dependencies
jan-janssen Jul 29, 2024
fe58857
Merge remote-tracking branch 'refs/remotes/origin/reference_data' int…
jan-janssen Jul 29, 2024
9f01b57
fix import
jan-janssen Jul 29, 2024
6de6fed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 29, 2024
be84a5d
Add lxml
jan-janssen Jul 29, 2024
a013161
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 29, 2024
8b339c6
Add docstrings and type hints with co-pilot
jan-janssen Jul 30, 2024
7cfd7c9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 30, 2024
d4d94a7
add coderabbit recommendations
jan-janssen Jul 30, 2024
9830680
Merge branch 'reference_data' of github.com:pyiron/atomistics into re…
jan-janssen Jul 30, 2024
d221132
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 30, 2024
e820d3f
Merge pull request #315 from pyiron/main
jan-janssen Jul 30, 2024
fa0929b
Following Sam's suggestion - renamed get_experimental_elastic_propert…
jan-janssen Jul 30, 2024
dcb287a
Support both:
jan-janssen Jul 30, 2024
fe3c0d7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 30, 2024
031632d
Fix wikipedia docstring
jan-janssen Jul 30, 2024
92cf77a
Merge remote-tracking branch 'refs/remotes/origin/reference_data' int…
jan-janssen Jul 30, 2024
d9d4a83
Update environment-old.yml
jan-janssen Jul 30, 2024
c744330
Update environment-old.yml
jan-janssen Jul 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Support both:
from atomistics.referencedata import get_elastic_properties_from_wikipedia

as well as

from atomistics.referencedata.wikipedia import get_elastic_properties
  • Loading branch information
jan-janssen committed Jul 30, 2024
commit dcb287a729e73f397814d97843c321be70661936
10 changes: 6 additions & 4 deletions atomistics/referencedata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from atomistics.referencedata.wiki import get_elastic_properties_from_wikipedia
from atomistics.referencedata.wikipedia import get_elastic_properties as get_elastic_properties_from_wikipedia

try:
from atomistics.referencedata.mendeleevdb import (
get_chemical_information_from_mendeleev,
get_chemical_information_from_wolframalpha,
from atomistics.referencedata.mendeleev import (
get_chemical_information as get_chemical_information_from_mendeleev
)
from atomistics.referencedata.wolframalpha import (
get_chemical_information as get_chemical_information_from_wolframalpha
)
except ImportError:
__all__ = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from mendeleev.fetch import fetch_table


def get_chemical_information_from_mendeleev(chemical_symbol: str) -> dict:
def get_chemical_information(chemical_symbol: str) -> dict:
"""
Get information of a given chemical element

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pandas


def get_elastic_properties_from_wikipedia(chemical_symbol: str) -> dict:
def get_elastic_properties(chemical_symbol: str) -> dict:
"""
Looks up elastic properties for a given chemical symbol from the Wikipedia: https://en.wikipedia.org/wiki/Elastic_properties_of_the_elements_(data_page) sourced from webelements.com.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def _wolframalpha_download() -> None:
result.to_csv(os.path.join(data_path, "wolfram.csv"))


def get_chemical_information_from_wolframalpha(chemical_symbol: str) -> dict:
def get_chemical_information(chemical_symbol: str) -> dict:
"""
Get information of a given chemical element
Args:
Expand Down
Loading