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

Repo config adjust 2nd attemp #31

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
pull_request:
branches:
- main
- v2.0
push:
branches:
- main
- v2.0

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
exclude: "(tests/data/.*|.*\\.ipynb)|poetry.lock"
exclude: "(tests/data/.*|.*\\.ipynb)|poetry.lock|src/pleiades/data/.*"
args: ["--ignore-words-list=DELTE"]
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
.. image:: ./docs/images/PLEIADES.jpg
:alt: **PLEIADES:** Python Libraries Extensions for Isotopic Analysis via Detailed Examination of SAMMY.
:align: center

PLEIADES
========
.. image:: https://results.pre-commit.ci/badge/github/lanl/PLEIADES/main.svg
:target: https://results.pre-commit.ci/latest/github/lanl/PLEIADES/main
:alt: pre-commit.ci status

.. image:: https://readthedocs.org/projects/example-sphinx-basic/badge/?version=latest
:target: https://pleiades-sammy.readthedocs.io/en/latest/
Expand Down
4 changes: 1 addition & 3 deletions src/pleiades/core/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ def get_file_path(self, category: DataCategory, filename: str) -> Path:

file_path = Path(filename)
if file_path.suffix not in self._VALID_EXTENSIONS[category]:
raise ValueError(
f"Invalid file extension for {category}. " f"Allowed extensions: {self._VALID_EXTENSIONS[category]}"
)
raise ValueError(f"Invalid file extension for {category}. " f"Allowed extensions: {self._VALID_EXTENSIONS[category]}")

try:
with resources.path(f"pleiades.data.{self._get_category_path(category)}", filename) as path:
Expand Down
4 changes: 1 addition & 3 deletions src/pleiades/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,7 @@ def areal_density(self) -> float:
if self.thickness_unit == "mm":
thickness_cm /= 10.0

return (
thickness_cm * self.density * CONSTANTS.avogadro_number / self.atomic_mass.value / 1e24
) # Convert to atoms/barn
return thickness_cm * self.density * CONSTANTS.avogadro_number / self.atomic_mass.value / 1e24 # Convert to atoms/barn


# Unit conversion functions
Expand Down
Loading