Skip to content
Snippets Groups Projects
Commit 9f127b65 authored by Maeva Pourpoint's avatar Maeva Pourpoint
Browse files

Merge branch 'update_package_structure_files' into 'master'

Latest updates to the package structure before MVP release

See merge request mt/lemi2seed!14
parents 80e42621 eda0c27f
No related branches found
No related tags found
1 merge request!14Latest updates to the package structure before MVP release
Pipeline #1460 passed with stage
in 5 minutes and 46 seconds
...@@ -5,4 +5,4 @@ Credits ...@@ -5,4 +5,4 @@ Credits
Development Lead Development Lead
---------------- ----------------
* IRIS PASSCAL <software-support@passcal.nmt.edu> * Maeva Pourpoint - IRIS PASSCAL <software-support@passcal.nmt.edu>
...@@ -15,7 +15,7 @@ Types of Contributions ...@@ -15,7 +15,7 @@ Types of Contributions
Report Bugs Report Bugs
~~~~~~~~~~~ ~~~~~~~~~~~
Report bugs at https://git.passcal.nmt.edu/maeva/lemi2seed/issues. Report bugs at https://git.passcal.nmt.edu/MT/lemi2seed/issues.
If you are reporting a bug, please include: If you are reporting a bug, please include:
...@@ -46,7 +46,7 @@ Submit Feedback ...@@ -46,7 +46,7 @@ Submit Feedback
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at The best way to send feedback is to file an issue at
https://git.passcal.nmt.edu/maeva/lemi2seed/issues. https://git.passcal.nmt.edu/MT/lemi2seed/issues.
If you are proposing a feature: If you are proposing a feature:
...@@ -62,7 +62,7 @@ Ready to contribute? Here's how to set up `lemi2seed` for local development. ...@@ -62,7 +62,7 @@ Ready to contribute? Here's how to set up `lemi2seed` for local development.
1. Clone the `lemi2seed` repo: 1. Clone the `lemi2seed` repo:
* $ git clone https://git.passcal.nmt.edu/maeva/lemi2seed.git * $ git clone https://git.passcal.nmt.edu/MT/lemi2seed.git
2. Install your local copy: 2. Install your local copy:
......
package: package:
name: lemi2seed name: lemi2seed
version: 2021.239 version: 2022.025
source: source:
path: ../ path: ../
...@@ -17,9 +17,9 @@ requirements: ...@@ -17,9 +17,9 @@ requirements:
run: run:
- python >=3.7 - python >=3.7
- configobj - configobj
- numpy=1.21
- obspy - obspy
- openpyxl - openpyxl
- PySide2
test: test:
source_files: source_files:
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
__author__ = """IRIS PASSCAL""" __author__ = """IRIS PASSCAL"""
__email__ = 'software-support@passcal.nmt.edu' __email__ = 'software-support@passcal.nmt.edu'
__version__ = '2021.239' __version__ = '2022.025'
...@@ -33,6 +33,7 @@ from lemi2seed.utils import (check_email_formatting, check_instrument_specs, ...@@ -33,6 +33,7 @@ from lemi2seed.utils import (check_email_formatting, check_instrument_specs,
if TYPE_CHECKING: if TYPE_CHECKING:
import numpy import numpy
from openpyxl.worksheet.worksheet import Worksheet
from lemi2seed.lemi_data import LemiData from lemi2seed.lemi_data import LemiData
# Read lemi2seed config file # Read lemi2seed config file
...@@ -743,7 +744,6 @@ DCS_SUB_REMA = Union[Run, Electric, Magnetic, Auxiliary] ...@@ -743,7 +744,6 @@ DCS_SUB_REMA = Union[Run, Electric, Magnetic, Auxiliary]
DCS_SUB_EMA = Union[Electric, Magnetic, Auxiliary] DCS_SUB_EMA = Union[Electric, Magnetic, Auxiliary]
DCS_SUB_MA = Union[Magnetic, Auxiliary] DCS_SUB_MA = Union[Magnetic, Auxiliary]
WORKBOOK = openpyxl.Workbook WORKBOOK = openpyxl.Workbook
WORKSHEET = openpyxl.worksheet.worksheet.Worksheet
# -- Type aliases -- # -- Type aliases --
...@@ -788,7 +788,7 @@ class LemiMetadata(): ...@@ -788,7 +788,7 @@ class LemiMetadata():
self.filenames = filenames self.filenames = filenames
@staticmethod @staticmethod
def get_metadata_field(sheet: WORKSHEET, cell: str) -> Optional[MD_VAL]: def get_metadata_field(sheet: Worksheet, cell: str) -> Optional[MD_VAL]:
"""Get metadata field at a given cell in a given field sheet.""" """Get metadata field at a given cell in a given field sheet."""
try: try:
field_value = sheet[cell].value field_value = sheet[cell].value
...@@ -798,7 +798,7 @@ class LemiMetadata(): ...@@ -798,7 +798,7 @@ class LemiMetadata():
return None return None
return field_value return field_value
def identify_field_sheet(self, sheet: WORKSHEET, filename: Path) -> Optional[str]: def identify_field_sheet(self, sheet: Worksheet, filename: Path) -> Optional[str]:
""" """
Check whether a field sheet is an install, removal or credential sheet. Check whether a field sheet is an install, removal or credential sheet.
Layout between provided spread sheet templates varies and cell numbers Layout between provided spread sheet templates varies and cell numbers
...@@ -888,7 +888,7 @@ class LemiMetadata(): ...@@ -888,7 +888,7 @@ class LemiMetadata():
output[category] = LemiMetadata.dataclass2dict(mproperty) output[category] = LemiMetadata.dataclass2dict(mproperty)
return output return output
def parse_field_sheet(self, sheet: WORKSHEET, sheet_type: str, metadata_fields: Dict) -> Dict: def parse_field_sheet(self, sheet: Worksheet, sheet_type: str, metadata_fields: Dict) -> Dict:
""" """
Parse field sheet using the cell numbers listed in the config file and Parse field sheet using the cell numbers listed in the config file and
return a nested dictionary of metadata entries organized based on the return a nested dictionary of metadata entries organized based on the
......
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
exclude = docs, *_rc.py exclude = docs, *_rc.py
max-line-length = 120 max-line-length = 120
[mypy-*.lemi_gui] [mypy-*.gui_model]
ignore_errors = True
[mypy-*.gui_widgets]
ignore_errors = True
[mypy-*.gui_view]
ignore_errors = True ignore_errors = True
[mypy-configobj] [mypy-configobj]
...@@ -14,5 +20,5 @@ ignore_missing_imports = True ...@@ -14,5 +20,5 @@ ignore_missing_imports = True
[mypy-obspy.*] [mypy-obspy.*]
ignore_missing_imports = True ignore_missing_imports = True
[mypy-openpyxl] [mypy-openpyxl.*]
ignore_missing_imports = True ignore_missing_imports = True
...@@ -32,9 +32,9 @@ setup( ...@@ -32,9 +32,9 @@ setup(
], ],
}, },
install_requires=['configobj', install_requires=['configobj',
'numpy==1.21',
'obspy', 'obspy',
'openpyxl', 'openpyxl',
'openpyxl-stubs',
'PySide2'], 'PySide2'],
setup_requires=[], setup_requires=[],
extras_require={ extras_require={
...@@ -51,6 +51,6 @@ setup( ...@@ -51,6 +51,6 @@ setup(
name='lemi2seed', name='lemi2seed',
packages=find_packages(include=['lemi2seed']), packages=find_packages(include=['lemi2seed']),
url='https://git.passcal.nmt.edu/MT/lemi2seed', url='https://git.passcal.nmt.edu/MT/lemi2seed',
version='2021.007', version='2022.025',
zip_safe=False, zip_safe=False,
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment