diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 2bd1c65d78181c1413cb027982434a3d85689043..7f5376af9832241bc2bb27fb530f4b837db1b608 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/fixhdr/issues. +The best way to send feedback is to file an issue at +https://git.passcal.nmt.edu/passoft/fixhdr/issues. If you are proposing a feature: @@ -59,31 +60,31 @@ Get Started! Ready to contribute? Here's how to set up `fixhdr` for local development. -1. Cone the `fixhdr` repo:: +1. Clone the `fixhdr` repo: $ git clone https://git.passcal.nmt.edu/passoft/fixhdr.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_fixhdr + $ python -m unittest Deploying --------- @@ -111,4 +112,3 @@ Then run:: $ git push $ git push --tags - diff --git a/HISTORY.rst b/HISTORY.rst index a1eb17193cd68e483de19510ffaff0e7fc278972..efda69c5a1bd9158bf9895b6c5831733e2e9bf80 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,4 +10,16 @@ History 2018.176 (2018-06-25) ------------------- -* Updating version numbers to 2018.176. \ No newline at end of file +* Updating version numbers to 2018.176. + +2020.212 (2020-07-30) +------------------ +* Updated to work with Python 3 +* Added a unit test to test fixhdr import +* Updated list of platform specific dependencies to be installed when pip + installing fixhdr (see setup.py) +* Installed and tested fixhdr against Python3.[6,7,8] using tox +* Formatted Python code to conform to the PEP8 style guide +* Created conda packages for fixhdr 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 9883f8b34888b14f844daee77d2dd4f07e2bbd35..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 fixhdr 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 fixhdr setup.py test - coverage report -m - coverage html - $(BROWSER) htmlcov/index.html - -docs: ## generate Sphinx HTML documentation, including API docs - rm -f docs/fixhdr.rst - rm -f docs/modules.rst - sphinx-apidoc -o docs/ fixhdr - $(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 f401ff8bfe459721e0d9c71bfce3e1186adddd73..dd0a53ad427b594075da0a731cb3fbdbcb8eed8f 100644 --- a/README.rst +++ b/README.rst @@ -2,23 +2,11 @@ fixhdr ====== +* Description: Modifies mseed headers -Modifies mseed headers - +* Usage: fixhdr + fixhdr -# + fixhdr -h + fixhdr [-d DataDirs] [-m batch_file] [-t batch_file] [-e endianess] * 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 2c70c72191477bd61128d340bd2081a944c51354..3e16c9aa4de92883ce48eebabea3688a4ead6f10 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,22 +1,5 @@ -[bumpversion] -current_version = 2018.176 -commit = True -tag = True - -[bumpversion:file:setup.py] -search = version='{current_version}' -replace = version='{new_version}' - -[bumpversion:file:fixhdr/__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 e41ace994e4f2fc5ac47c2a4517648afb67ac597..e21173da8db8cee782ea18682d5d9ee1dcb98eea 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='fixhdr', name='fixhdr', packages=find_packages(include=['fixhdr']), - test_suite='tests', url='https://git.passcal.nmt.edu/passoft/fixhdr', version='2018.176', zip_safe=False,