Skip to content
Merged
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
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug Report
about: Submit an issue with the project
title: ''

---

### Description
<!--Give a short, clear description of the issue. Include what you tried,
what went wrong, and what you expected to happen.-->


### Your Setup
<!--Include relevant versions by running:

python --version
pip show spectroplot

Include the versions of any other relevant libraries, if applicable.-->

* Operating System:
* Python version:
* spectroplot version:

### Example Code
<!--Give a minimal, complete, and verifiable example.-->

```bash
# Paste the command you ran and the output.

```

### Error Message

```
# Paste the complete error traceback here, if an error occurred.
```
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest a feature/idea for this project
title: ''

---

### Description of the problem/new feature
<!--Give a short, clear description of the problem or new feature.-->


### Description of a possible solution or alternative
<!--Discuss in detail how the problem can be solved, or the benefit of an added feature.-->
34 changes: 34 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--Please fill out all sections of the pull request template.-->

### Description
<!--Describe the pull request in detail, telling why the changes
are required and/or what problems they fix. Link or add the issue number
for any existing issues that the pull request solves.

Note that it is preferred to file an issue first, so that details can be
discussed/finalized before a pull request is created.-->


### Type of Pull Request
<!--Put an x in all boxes that apply, like so: - [x] Bug Fix-->

- [ ] Bug Fix
- [ ] New Feature
- [ ] Miscellaneous Changes (refactor, code improvements, etc.)
- [ ] Documentation or Example Programs

### Pull Request Checklist
<!--Fill in all boxes with an x to verify.

To run tests locally, type the following command: pytest tests/

To lint files using ruff: ruff check src/
-->

- [ ] New code and/or documentation is valid for use with the BSD 3-Clause license.
- [ ] New code is fully documented with docstrings that follow Numpy style,
if applicable.
- [ ] New code follows package conventions (max 80 chars per line, etc.),
if applicable.
- [ ] Added/updated tests and ensured they pass locally, if applicable.
- [ ] Verified that `ruff check src/` passes, if applicable.
41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to spectroplot

Thank you for your interest in contributing!

## Reporting issues

- Use the issue templates for bug reports and feature requests.
- Include a minimal, complete, and verifiable example.
- Include your Python version, OS, and spectroplot version.

## Pull requests

- Open an issue first to discuss changes before submitting a PR.
- Keep changes focused — one PR per feature/bugfix.
- Follow the existing code style: 80-character line limit, Numpy-style
docstrings, descriptive variable names.
- Write tests for new functionality and ensure all tests pass:

```
pytest tests/
```

- Run Ruff before submitting:

```
ruff check src/
```

## Code style

- Maximum line length: 80 characters.
- Docstrings follow the Numpy documentation style.
- Imports: standard library, third-party, local — each group separated
by a blank line.
- No commented-out code; remove dead code.
- Prefer ``np.asarray(..., dtype=float)`` over implicit list coercion.

## Licensing

By contributing, you agree that your contributions will be licensed
under the project's BSD 3-Clause license.
42 changes: 25 additions & 17 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
MIT License
BSD 3-Clause License

Copyright (c) 2026 Emmanuel Bourret
Copyright (c) 2026, Emmanuel Bourret
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "spectroplot"
version = "0.1.0"
description = "Plot optical spectra from ORCA output, spectrum, and ESD root files"
requires-python = ">=3.10"
license = {text = "BSD-3-Clause"}
dependencies = [
"numpy>=1.21",
"pandas>=1.3",
Expand Down
3 changes: 3 additions & 0 deletions src/spectroplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Class for reading and parsing spectrum files.
main
CLI entry point.

Created on June 30, 2026
@author: Emmanuel Bourret
"""

from spectroplot.data_reader import SpectrumData as SpectrumData
Expand Down
6 changes: 6 additions & 0 deletions src/spectroplot/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Allows ``python -m spectroplot`` to invoke the CLI entry point.

Created on June 30, 2026
@author: Emmanuel Bourret
"""

from spectroplot import main

main()
6 changes: 5 additions & 1 deletion src/spectroplot/_patterns.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Compiled regular expressions shared across modules."""
"""Compiled regular expressions shared across modules.

Created on July 1, 2026
@author: Emmanuel Bourret
"""

import re
from spectroplot.global_constants import RE_SPECTRUM_ROOT_PATTERN
Expand Down
6 changes: 6 additions & 0 deletions src/spectroplot/data_reader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Reader for ORCA output, experimental, and ESD spectrum files.

Created on January 10, 2026
@author: Emmanuel Bourret
"""

import logging
import re #regex

Expand Down
6 changes: 6 additions & 0 deletions src/spectroplot/functions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Utility functions for spectrum processing and plotting.

Created on January 10, 2026
@author: Emmanuel Bourret
"""

from typing import Optional
import numpy as np #element-wise tensor processing
import pandas as pd #dataframe processing
Expand Down
3 changes: 3 additions & 0 deletions src/spectroplot/global_constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Global constants and default configuration for spectroplot.

Created on January 10, 2026
@author: Emmanuel Bourret

All-capitals names are true constants. Lowercase names are
user-configurable defaults that can be overridden via CLI flags or
by modifying this file directly.
Expand Down
6 changes: 6 additions & 0 deletions src/spectroplot/spectroplot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Entry point and plotting functions for the spectroplot CLI.

Created on June 30, 2026
@author: Emmanuel Bourret
"""

import sys #sys files processing
from typing import Optional
from pathlib import Path #path processing
Expand Down
6 changes: 6 additions & 0 deletions tests/test_data_reader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Tests for the SpectrumData file reader.

Created on June 29, 2026
@author: Emmanuel Bourret
"""

import sys
sys.path.insert(0, "src")

Expand Down
6 changes: 6 additions & 0 deletions tests/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Tests for spectrum processing utility functions.

Created on June 29, 2026
@author: Emmanuel Bourret
"""

import numpy as np
import pandas as pd
import sys
Expand Down
6 changes: 6 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Integration tests for the full spectroplot pipeline.

Created on June 30, 2026
@author: Emmanuel Bourret
"""

import sys
from pathlib import Path
from unittest.mock import MagicMock, patch
Expand Down
Loading