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

Backbone files

parent 21fb3705
No related branches found
No related tags found
1 merge request!1Backbone files
Pipeline #1354 passed with stage
in 4 minutes and 22 seconds
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
.gitignore 0 → 100644
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# virtualenv
.venv
venv/
ENV/
# mypy
.mypy_cache/
#pycharm
.idea/
.DS_Store
# pylint
.pylintrc
.gitlab-ci.yml 0 → 100644
image: python
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
stages:
- Static Analysis and Test
before_script:
- uname -a
- apt-get update && apt install -y libgl1-mesa-glx
- pip install -e .[dev]
flake8:
image: python:3.8
tags:
- passoft
stage: Static Analysis and Test
script:
- flake8 --ignore=E501,W503 lemi2seed
- flake8 tests
mypy:
image: python:3.8
tags:
- passoft
stage: Static Analysis and Test
script:
- python -m mypy --config-file ./setup.cfg lemi2seed
python3.7:
image: python:3.7
tags:
- passoft
stage: Static Analysis and Test
script:
- python -m unittest
python3.8:
image: python:3.8
tags:
- passoft
stage: Static Analysis and Test
script:
- python -m unittest
python3.9:
image: python:3.9
tags:
- passoft
stage: Static Analysis and Test
script:
- python -m unittest
AUTHORS.rst 0 → 100644
=======
Credits
=======
Development Lead
----------------
* IRIS PASSCAL <software-support@passcal.nmt.edu>
CONTRIBUTING.rst 0 → 100644
+ 115
0
View file @ 8bc5b838
.. highlight:: shell
============
Contributing
============
Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions
----------------------
Report Bugs
~~~~~~~~~~~
Report bugs at https://git.passcal.nmt.edu/maeva/lemi2seed/issues.
If you are reporting a bug, please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
Fix Bugs
~~~~~~~~
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.
Implement Features
~~~~~~~~~~~~~~~~~~
Look through the GitLab issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~
lemi2seed could always use more documentation, whether as part of the
official lemi2seed docs, in docstrings, or even on the web in blog posts,
articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at
https://git.passcal.nmt.edu/maeva/lemi2seed/issues.
If you are proposing a feature:
* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)
Get Started!
------------
Ready to contribute? Here's how to set up `lemi2seed` for local development.
1. Clone the `lemi2seed` repo:
* $ git clone https://git.passcal.nmt.edu/maeva/lemi2seed.git
2. Install your local copy:
* $ pip install -e .[dev]
3. Create a branch for local development:
* $ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
4. When you're done making changes, check that your changes pass the
tests:
* $ python -m unittest
5. Commit your changes and push your branch to GitHub:
* $ git add .
* $ git commit -m "Your detailed description of your changes."
* $ git push origin name-of-your-bugfix-or-feature
6. Submit a merge request through the Gitlab website.
Pull Request Guidelines
-----------------------
Before you submit a merge request, check that it meets these guidelines:
1. The merge request should include tests.
2. If the merge request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 3.[6,7,8]
Tips
----
To run a subset of tests, for the lemi2seed module for example, run:
* $ python -m unittest tests/test_lemi2seed.py
Deploying
---------
A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
Then run:
* $ git push
* $ git push --tags
HISTORY.rst 0 → 100644
=======
History
=======
2021.?
--------
* First release on new build system.
LICENSE 0 → 100644
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Convert LEMI data and metadata into day-long mseed and StationXML files.
Copyright (C) 2018 IRIS PASSCAL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
MANIFEST.in 0 → 100644
include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
include README.rst
graft lemi2seed
graft tests
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
# lemi2obspy
Program to convert MT data to mseed
\ No newline at end of file
README.rst 0 → 100644
==========
lemi2seed
==========
- **Description**:
- Convert LEMI data and metadata into day-long mseed and StationXML files.
- **Usage**:
- ``lemi2seed -h``
- ``lemi2seed -d path2data -qc`` *(run lemi2seed in "quality control" mode)*
- ``lemi2seed -d path2data -g`` *(run lemi2seed in "gui only" mode)*
- ``lemi2seed -d path2data -m path2metadata`` *(run lemi2seed in "field sheet and gui" mode)*
The "quality control" mode allows to quickly convert LEMI data to day-long mseed files. The GUI and handling of metadata are bypassed.
In the "gui only" mode, metadata are entered only using the GUI.
In the "field sheet and gui" mode, metadata are prepopulated from parsing the provided field sheets.
- **License**: GNU General Public License v3 (GPLv3)
package:
name: lemi2seed
version: 2021.239
source:
path: ../
build:
noarch: python
number: 0
script: {{ PYTHON }} -m pip install --no-deps -vv .
requirements:
build:
- python >=3.7
- pip
run:
- python >=3.7
- configobj
- obspy
- openpyxl
- PySide2
test:
source_files:
- tests
commands:
- python -m unittest
about:
home: https://git.passcal.nmt.edu/maeva/lemi2seed
license: GPLv3
license_file: LICENSE
summary: Convert LEMI data and metadata into day-long mseed and StationXML files.
# -*- coding: utf-8 -*-
"""Top-level package for lemi2seed."""
__author__ = """IRIS PASSCAL"""
__email__ = 'software-support@passcal.nmt.edu'
__version__ = '2021.239'
setup.cfg 0 → 100644
[flake8]
exclude = docs, *_rc.py
max-line-length = 120
[mypy-*.lemi_gui]
ignore_errors = True
[mypy-configobj]
ignore_missing_imports = True
[mypy-numpy]
ignore_missing_imports = True
[mypy-obspy.*]
ignore_missing_imports = True
[mypy-openpyxl]
ignore_missing_imports = True
setup.py 0 → 100644
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst', 'rt') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst', 'rt') as history_file:
history = history_file.read()
setup(
author="IRIS PASSCAL",
author_email='software-support@passcal.nmt.edu',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
description="Convert LEMI data and metadata into day-long mseed and "
"StationXML files.",
entry_points={
'console_scripts': [
'lemi2seed=lemi2seed.lemi2seed:main',
],
},
install_requires=['configobj',
'obspy',
'openpyxl',
'openpyxl-stubs',
'PySide2'],
setup_requires=[],
extras_require={
'dev': [
'flake8',
'tox',
'mypy',
]
},
license="GNU General Public License v3",
long_description=readme + '\n\n' + history,
include_package_data=True,
keywords='lemi2seed',
name='lemi2seed',
packages=find_packages(include=['lemi2seed']),
url='https://git.passcal.nmt.edu/maeva/lemi2seed',
version='2021.007',
zip_safe=False,
)
# -*- coding: utf-8 -*-
"""Unit test package for lemi2seed."""
tox.ini 0 → 100644
[tox]
envlist = py37, py38, py39, flake8, mypy
[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 --ignore=E501,W503 lemi2seed
flake8 tests
[testenv:mypy]
basepython = python
deps = mypy
commands = python -m mypy --config-file ./setup.cfg lemi2seed
[testenv]
commands = python -m unittest
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