diff --git a/.gitignore b/.gitignore index c23c3da..0f07966 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ org.eclipse.core.resources.prefs pylint.out .idea uml.dia~ +MANIFEST diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 39eb322..1c108cf 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -49,20 +49,24 @@ 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 :) +* Remember that this is a volunteer-driven project and that there is not guarantee that your + feature will be implemented. + Get Started! ------------ Ready to contribute? Here's how to set up `argos` for local development. +0. Keep in mind that there is no guarantee that your pull request will be accepted. When in doubt, + send me an email or open an issue to discuss it before spending a lot of time on it. 1. Fork the `argos` repo on GitHub. 2. Clone your fork locally:: $ git clone git@github.com:your_name_here/argos.git -3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: +3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this + is how you set up your fork for local development:: $ mkvirtualenv argos $ cd argos/ @@ -74,34 +78,10 @@ Ready to contribute? Here's how to set up `argos` for local development. Now you can make your changes locally. - -5. - - -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 pull request through the GitHub website. - -Pull Request Guidelines ------------------------ - -Before you submit a pull request, check that it meets these guidelines: - -1. The pull request should include tests. -2. If the pull 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.6, 2.7, 3.3, and 3.4, and for PyPy. Check - https://travis-ci.org/titusjan/argos/pull_requests - and make sure that the tests pass for all supported Python versions. - -Tips ----- - -To run a subset of tests:: - - $ python -m unittest tests.test_argos \ No newline at end of file +6. Submit a pull request through the GitHub website. diff --git a/HISTORY.rst b/HISTORY.rst index 1120877..11f9f9f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,17 +5,13 @@ History Current development branch - -* Range config tree items (CTI) have scientific notation -* Axis CTIs can have flip and log-mode. - -0.2.0-devel (2016-03-29) +0.2.0-devel (2016-??-??) --------------------- -* First useable release. +* First usable release. 0.1.0-devel (2014-11-01) --------------------- -* First release on PyPI. \ No newline at end of file +* First release on PyPI. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..bb37a27 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include *.rst diff --git a/Makefile b/Makefile index 55dea45..9096529 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# Make file taken from cookiecutter. Not al targets may be up to date. + .PHONY: clean-pyc clean-build docs clean help: @@ -56,9 +58,9 @@ docs: release: clean python setup.py sdist upload - python setup.py bdist_wheel upload + #python setup.py bdist_wheel upload dist: clean python setup.py sdist - python setup.py bdist_wheel - ls -l dist \ No newline at end of file + #python setup.py bdist_wheel + #ls -l dist diff --git a/libargos/info.py b/libargos/info.py index 26979e1..0f66a9f 100644 --- a/libargos/info.py +++ b/libargos/info.py @@ -19,9 +19,9 @@ """ import os -DEBUGGING = True +DEBUGGING = False -VERSION = '0.2.0-dev' +VERSION = '0.2.0.dev0' REPO_NAME = "argos" SCRIPT_NAME = "argos" PACKAGE_NAME = "libargos" diff --git a/libargos/qt/treemodels.py b/libargos/qt/treemodels.py index c938e65..1565019 100644 --- a/libargos/qt/treemodels.py +++ b/libargos/qt/treemodels.py @@ -177,12 +177,12 @@ def index(self, row, column, parentIndex=QtCore.QModelIndex()): #logger.debug(" Getting row {} from parentItem: {}".format(row, parentItem)) if not (0 <= row < parentItem.nChildren()): - # Can happen when deleting the last child. TODO: remove warning? - logger.warn("Index row {} invalid for parent item: {}".format(row, parentItem)) + # Can happen when deleting the last child. + #logger.warn("Index row {} invalid for parent item: {}".format(row, parentItem)) return QtCore.QModelIndex() if not (0 <= column < self.columnCount()): - logger.warn("Index column {} invalid for parent item: {}".format(column, parentItem)) + #logger.warn("Index column {} invalid for parent item: {}".format(column, parentItem)) return QtCore.QModelIndex() childItem = parentItem.child(row) diff --git a/paths.txt b/paths.txt index 3065efc..67ace1c 100644 --- a/paths.txt +++ b/paths.txt @@ -1,3 +1,4 @@ +# Temporary files with interesting test data. *** /argos/gstp-rad/2014-04-29_FEL-350/calib_1050nm/2014-04-29T11_53_38Nothing m2.h5/scan_procedure/procedure /argos/mytests/string.hdf5/ diff --git a/setup.py b/setup.py index cffdf20..84328be 100644 --- a/setup.py +++ b/setup.py @@ -7,20 +7,19 @@ # See also https://packaging.python.org/en/latest/distributing.html # TODO: still can't make a wheel even following the instructions in the link below. -# http://stackoverflow.com/questions/26664102/why-can-i-not-create-a-wheel-in-python +# http://stackoverflow.com/questions/26664102/why-can-i-not-create-a-wheel-in-pyt -try: - from setuptools import setup -except ImportError: + +if 1: + from setuptools import setup, find_packages +else: print("Using distutils to import setup. No wheels enabled") - assert False, "stopped" from distutils.core import setup + from libargos import info -from libargos.qt import USE_PYQT assert not info.DEBUGGING, "info.DEBUGGING should be False" -assert USE_PYQT, "USE_PYQT should be True" readme = open('README.rst').read() @@ -30,30 +29,23 @@ # TODO: put package requirements here ] -test_requirements = [ - # TODO: put package test requirements here -] setup( - name=info.REPO_NAME, - version=info.VERSION, - description=info.SHORT_DESCRIPTION, - long_description=readme + '\n\n' + history, - author=info.AUTHOR, - author_email=info.EMAIL, + name = info.REPO_NAME, + version = info.VERSION, + description = info.SHORT_DESCRIPTION, + long_description = readme + '\n\n' + history, + author = info.AUTHOR, + author_email = info.EMAIL, + license = "GPLv3", url=info.PROJECT_URL, - packages=[ - info.PACKAGE_NAME - ], - package_dir={info.PACKAGE_NAME: info.PACKAGE_NAME}, + packages = find_packages(), + package_data = {'': ['HISTORY.rst'], info.PACKAGE_NAME: ['img/snipicons/*']}, scripts = ['argos'], - include_package_data=True, - install_requires=requirements, - license="GPLv3", - zip_safe=False, - keywords='NCDF HDF plotting graphs', - classifiers=[ - 'Development Status :: 2 - Pre-Alpha', + install_requires = requirements, + zip_safe = False, + classifiers = [ + 'Development Status :: 4 - Beta', 'Environment :: X11 Applications :: Qt', 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', @@ -67,10 +59,12 @@ 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Topic :: Software Development', 'Topic :: Scientific/Engineering', 'Topic :: Utilities', ], - test_suite='tests', - tests_require=test_requirements + keywords = 'NCDF HDF plotting graphs', + #test_suite='tests', + #tests_require=test_requirements ) diff --git a/todo.txt b/todo.txt index 8ccdf2b..343b2b1 100644 --- a/todo.txt +++ b/todo.txt @@ -1,13 +1,8 @@ TODO version 0.2: - Test by opening all test data. - - Default outlier percentage op 0.1%? - - Layout and Margins. - - --list inspector command line option that show the available inspector + Refresh of directories fails. + Show both error and description # Check oude laptop @@ -22,11 +17,26 @@ TODO version 0.2: Installed plugins dialog doesn't work if scipy is not installed. (Test under Linux) + Release: + Make release candidate. + - scripts + - requirements + - downloading setuptools + + Rename libargos to argos + + Pylint and TODOs? + Test by opening all test data? + + + # check docs dir. TODO version 0.3: Look at QSizePolicy::setControlType + Default outlier percentage op 0.1%? + Interaction in IPython QSettings should not use titusjan by default (auto)refresh