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

Update out of date info from cookiecutter and remove unused Makefile

parent f0e67cc9
No related branches found
No related tags found
1 merge request!5Formatting and cookiecutter files cleanup
......@@ -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/tkeqcut/issues.
The best way to send feedback is to file an issue at
https://git.passcal.nmt.edu/passoft/tkeqcut/issues.
If you are proposing a feature:
......@@ -59,31 +60,31 @@ Get Started!
Ready to contribute? Here's how to set up `tkeqcut` for local development.
1. Cone the `tkeqcut` repo::
1. Cone the `tkeqcut` repo:
$ git clone https://git.passcal.nmt.edu/passoft/tkeqcut.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_tkeqcut
$ python -m unittest
Deploying
---------
......@@ -111,4 +112,3 @@ Then run::
$ git push
$ git push --tags
......@@ -6,3 +6,15 @@ History
------------------
* First release on new build system.
2020.216 (2020-08-03)
------------------
* Updated to work with Python 3
* Added a unit test to test tkeqcut import
* Updated list of platform specific dependencies to be installed when pip
installing tkeqcut (see setup.py)
* Installed and tested tkeqcut against Python3.[6,7,8] using tox
* Formatted Python code to conform to the PEP8 style guide
* Created conda package for tkeqcut 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
......@@ -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
.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 tkeqcut 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 tkeqcut setup.py test
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/tkeqcut.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ tkeqcut
$(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
......@@ -2,23 +2,8 @@
tkeqcut
=======
* Description: Prepare input for either segymerge or qmerge
Prepare input for either segymerge or qmerge
* Usage: tkeqcut
* 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
[bumpversion]
current_version = 2008.180
commit = True
tag = True
[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:tkeqcut/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bdist_wheel]
universal = 1
[flake8]
exclude = docs
[aliases]
# Define setup.py command aliases here
......@@ -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='tkeqcut',
name='tkeqcut',
packages=find_packages(include=['tkeqcut']),
test_suite='tests',
url='https://git.passcal.nmt.edu/passoft/tkeqcut',
version='2008.180',
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