diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d55cfe8b452edd2a259ae3bd806e990c2c438489..560b77ef2ddc2b09cf06cf25345ffb9d3955e34c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -45,7 +45,8 @@ articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ -The best way to send feedback is to file an issue at https://git.passcal.nmt.edu/passoft/mseedpeek/issues. +The best way to send feedback is to file an issue at +https://git.passcal.nmt.edu/passoft/mseedpeek/issues. If you are proposing a feature: @@ -59,31 +60,31 @@ Get Started! Ready to contribute? Here's how to set up `mseedpeek` for local development. -1. Cone the `mseedpeek` repo:: +1. Clone the `mseedpeek` repo: $ git clone https://git.passcal.nmt.edu/passoft/mseedpeek.git -3. Install your local copy:: +2. Install your local copy: $ pip install -e .[dev] -4. Create a branch for local development:: +3. Create a branch for local development: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. -5. When you're done making changes, check that your changes pass the - tests:: +4. When you're done making changes, check that your changes pass the + tests: $ python setup.py test -6. Commit your changes and push your branch to GitHub:: +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 -7. Submit a merge request through the Gitlab website. +6. Submit a merge request through the Gitlab website. Pull Request Guidelines ----------------------- @@ -94,13 +95,13 @@ Before you submit a merge request, check that it meets these guidelines: 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 2.7 +3. The pull request should work for Python 3.[6,7,8] Tips ---- To run a subset of tests:: - $ python -m unittest tests.test_mseedpeek + $ python -m unittest Deploying --------- @@ -111,4 +112,3 @@ Then run:: $ git push $ git push --tags - diff --git a/HISTORY.rst b/HISTORY.rst index ad2b7968f198fd8691234625b861e6176325595c..6a15f8807e518c13e25af2780387f8f835edd54a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,3 +6,15 @@ History ------------------ * First release on new build system. + +2020.204 (2020-07-22) +------------------ +* Updated to work with Python 3 +* Added a unit test to test mseedpeek import +* Updated list of platform specific dependencies to be installed when pip + installing mseedpeek (see setup.py) +* Installed and tested mseedpeek against Python3.[6,7,8] using tox +* Formatted Python code to conform to the PEP8 style guide +* Created conda packages for mseedpeek that can run on Python3.[6,7,8] +* Updated .gitlab-ci.yml to run a linter and unit tests for Python3.[6,7,8] + in GitLab CI pipeline diff --git a/MANIFEST.in b/MANIFEST.in index 965b2dda7db7c49f68857dc3aea9af37e30a745e..2387d6e279b924229fa0c8c485eeeebf49784996 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,7 +5,5 @@ include LICENSE include README.rst recursive-include tests * -recursive-exclude * __pycache__ -recursive-exclude * *.py[co] -recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif +recursive-include docs *.rst conf.py diff --git a/Makefile b/Makefile deleted file mode 100644 index 76f0c7db17cc57a20cadc583bb8d41b4bcfaff25..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -.PHONY: clean clean-test clean-pyc clean-build docs help -.DEFAULT_GOAL := help - -define BROWSER_PYSCRIPT -import os, webbrowser, sys - -try: - from urllib import pathname2url -except: - from urllib.request import pathname2url - -webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) -endef -export BROWSER_PYSCRIPT - -define PRINT_HELP_PYSCRIPT -import re, sys - -for line in sys.stdin: - match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) - if match: - target, help = match.groups() - print("%-20s %s" % (target, help)) -endef -export PRINT_HELP_PYSCRIPT - -BROWSER := python -c "$$BROWSER_PYSCRIPT" - -help: - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) - -clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts - -clean-build: ## remove build artifacts - rm -fr build/ - rm -fr dist/ - rm -fr .eggs/ - find . -name '*.egg-info' -exec rm -fr {} + - find . -name '*.egg' -exec rm -f {} + - -clean-pyc: ## remove Python file artifacts - find . -name '*.pyc' -exec rm -f {} + - find . -name '*.pyo' -exec rm -f {} + - find . -name '*~' -exec rm -f {} + - find . -name '__pycache__' -exec rm -fr {} + - -clean-test: ## remove test and coverage artifacts - rm -fr .tox/ - rm -f .coverage - rm -fr htmlcov/ - rm -fr .pytest_cache - -lint: ## check style with flake8 - flake8 mseedpeek tests - -test: ## run tests quickly with the default Python - python setup.py test - - -test-all: ## run tests on every Python version with tox - tox - -coverage: ## check code coverage quickly with the default Python - coverage run --source mseedpeek setup.py test - coverage report -m - coverage html - $(BROWSER) htmlcov/index.html - -docs: ## generate Sphinx HTML documentation, including API docs - rm -f docs/mseedpeek.rst - rm -f docs/modules.rst - sphinx-apidoc -o docs/ mseedpeek - $(MAKE) -C docs clean - $(MAKE) -C docs html - $(BROWSER) docs/_build/html/index.html - -servedocs: docs ## compile the docs watching for changes - watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . - -release: dist ## package and upload a release - twine upload dist/* - -dist: clean ## builds source and wheel package - python setup.py sdist - python setup.py bdist_wheel - ls -l dist - -install: clean ## install the package to the active Python's site-packages - python setup.py install diff --git a/README.rst b/README.rst index 77d004bcce434ae1a8893e3c6fd145ff5a86dd59..c33bdd08061a878114e2cd90116806b058242a23 100644 --- a/README.rst +++ b/README.rst @@ -2,23 +2,10 @@ mseedpeek ========= +* Description: View mseed headers -View mseed headers - +* Usage: mseeedpeek + mseedpeek -# + mseedpeek -f file(s) * Free software: GNU General Public License v3 (GPLv3) - - - -Features --------- - -* TODO - -Credits -------- - -This package was created with Cookiecutter_ and the `passoft/cookiecutter`_ project template. - -.. _Cookiecutter: https://github.com/audreyr/cookiecutter -.. _`passoft/cookiecutter`: https://git.passcal.nmt.edu/passoft/cookiecutter diff --git a/setup.cfg b/setup.cfg index 75864c6ea6c18f8dd8a99ed2f6f3df715aca0ddd..3e16c9aa4de92883ce48eebabea3688a4ead6f10 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,22 +1,5 @@ -[bumpversion] -current_version = 2018.129 -commit = True -tag = True - -[bumpversion:file:setup.py] -search = version='{current_version}' -replace = version='{new_version}' - -[bumpversion:file:mseedpeek/__init__.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' - -[bdist_wheel] -universal = 1 - [flake8] exclude = docs [aliases] # Define setup.py command aliases here - diff --git a/setup.py b/setup.py index 1ed0f1b5d0e94ef9d068685fef85d922a7644208..3ab6429aa3297e6a84910abbce58cc87dd964513 100644 --- a/setup.py +++ b/setup.py @@ -34,15 +34,8 @@ setup( setup_requires=[], extras_require={ 'dev': [ - 'pip', - 'bumpversion', - 'wheel', - 'watchdog', 'flake8', 'tox', - 'coverage', - 'Sphinx', - 'twine', ] }, license="GNU General Public License v3", @@ -51,7 +44,6 @@ setup( keywords='mseedpeek', name='mseedpeek', packages=find_packages(include=['mseedpeek']), - test_suite='tests', url='https://git.passcal.nmt.edu/passoft/mseedpeek', version='2018.129', zip_safe=False,