Skip to content

Commit

Permalink
setup.py works again (using setuptools)
Browse files Browse the repository at this point in the history
  • Loading branch information
titusjan committed Dec 17, 2016
1 parent 6fd56cf commit 9cf33f3
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 80 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ org.eclipse.core.resources.prefs
pylint.out
.idea
uml.dia~
MANIFEST
38 changes: 9 additions & 29 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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/
Expand All @@ -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. <Removed: flake8 and tox are not used>


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
6. Submit a pull request through the GitHub website.
10 changes: 3 additions & 7 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* First release on PyPI.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include *.rst
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
#python setup.py bdist_wheel
#ls -l dist
4 changes: 2 additions & 2 deletions libargos/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions libargos/qt/treemodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions paths.txt
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
52 changes: 23 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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',
Expand All @@ -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
)
24 changes: 17 additions & 7 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9cf33f3

Please sign in to comment.