Skip to content
Snippets Groups Projects
Commit 359b4d1e authored by David Thomas's avatar David Thomas
Browse files

Initial commit, 2018-05-22 dthomas

parents
No related branches found
No related tags found
No related merge requests found
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf
[*.bat]
indent_style = tab
end_of_line = crlf
[LICENSE]
insert_final_newline = false
[Makefile]
indent_style = tab
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
#pycharm
.idea/
.DS_Store
* changeo version:
* Python version:
* Operating System:
### Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
### What I Did
```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
=======
Credits
=======
Development Lead
----------------
* IRIS PASSCAL <software-support@passcal.nmt.edu>
Contributors
------------
None yet. Why not be the first?
.. highlight:: shell
============
Contributing
============
Contributions are welcome, and they are greatly appreciated! Every little bit
helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions
----------------------
Report Bugs
~~~~~~~~~~~
Report bugs at https://git.passcal.nmt.edu/passoft/changeo/issues.
If you are reporting a bug, please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.
Fix Bugs
~~~~~~~~
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
wanted" is open to whoever wants to implement it.
Implement Features
~~~~~~~~~~~~~~~~~~
Look through the GitHub issues for features. Anything tagged with "enhancement"
and "help wanted" is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~
changeo could always use more documentation, whether as part of the
official changeo docs, in docstrings, or even on the web in blog posts,
articles, and such.
Submit Feedback
~~~~~~~~~~~~~~~
The best way to send feedback is to file an issue at https://git.passcal.nmt.edu/passoft/changeo/issues.
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 :)
Get Started!
------------
Ready to contribute? Here's how to set up `changeo` for local development.
1. Cone the `changeo` repo::
$ git clone https://git.passcal.nmt.edu/passoft/changeo.git
3. Install your local copy::
$ python setup.py develop
4. 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::
$ python setup.py test
6. 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.
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.7
Tips
----
To run a subset of tests::
$ python -m unittest tests.test_changeo
Deploying
---------
A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in HISTORY.rst).
Then run::
$ git push
$ git push --tags
=======
History
=======
2016.35 (2018-05-22)
------------------
* First release on new build system.
LICENSE 0 → 100644
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Used to gang pprogram and test RT130's.
Copyright (C) 2018 IRIS PASSCAL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
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
Makefile 0 → 100644
.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 changeo 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 changeo setup.py test
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/changeo.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ changeo
$(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
=======
changeo
=======
Used to gang pprogram and test RT130's.
* Free software: GNU General Public License v3 (GPLv3)
Features
--------
* TODO
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
# Requires sourcing the setup information in setup_passoft
EXEC = changeo
PYEXEC = changeo.py
MODLIB = lib/python/$(EXEC)
# There is nothing to do for all, so just for something to do...
all:
@$(PASSCHEXE) $(EXEC)
install:
@$(PASSINSTALL) -d -m 0755 $(PASSCAL)/$(MODLIB)
@$(PASSCHEXE) $(PYEXEC)
@$(PASSCP) $(PYEXEC) $(PASSCAL)/$(MODLIB)
@$(PASSCHEXE) $(EXEC)
@$(PASSCP) $(EXEC) $(PASSCAL)/bin
@$(PASSINSTALL) -d -m 0755 $(PASSCAL)/man/manl
@$(PASSCP) $(EXEC).man $(PASSCAL)/man/manl/$(EXEC).l
installl:
@$(PASSINSTALL) -d -m 0755 $(PASSOFT)/$(MODLIB)
@$(PASSCHEXE) $(PYEXEC)
@$(PASSCP) $(PYEXEC) $(PASSOFT)/$(MODLIB)
@$(PASSCHEXE) $(EXEC)
@$(PASSCP) $(EXEC).local $(PASSOFT)/bin/$(EXEC)
tarsrc:
@$(PASSINSTALL) -d -m 0755 $(PASSCAL)/tar
@$(PASSCP) $(PASSOFT)/src/setup_passoft .
@$(PASSTAR) cf $(EXEC)src.tar setup_passoft Makefile \
$(EXEC) $(EXEC).local *.py *.man
@$(PASSCP) $(EXEC)src.tar $(PASSCAL)/tar
tarbin:
@$(PASSINSTALL) -d -m 0755 $(PASSCAL)/tar
@$(PASSCP) $(PASSOFT)/src/setup_passoft .
@$(PASSTAR) cf $(EXEC)bin.tar setup_passoft Makefile \
$(EXEC) $(EXEC).local *.py *.man
@$(PASSCP) $(EXEC)bin.tar $(PASSCAL)/tar
clean:
@$(PASSRM) *~
uninstall:
@$(PASSRM) $(PASSCAL)/bin/$(EXEC)
@$(PASSRM) -r $(PASSCAL)/$(MODLIB)
@$(PASSRM) $(PASSCAL)/man/manl/$(EXEC).l
# -*- coding: utf-8 -*-
"""Top-level package for changeo."""
__author__ = """IRIS PASSCAL"""
__email__ = 'software-support@passcal.nmt.edu'
__version__ = '2016.35'
#!/usr/bin/env bash
# Launch changeo.py
if [ ! -z "${PASSCAL}" ]
then
PYTHON=${PASSCAL}/other/bin/picpython
export PYTHON
PYTHONPATH=${PASSCAL}/lib/python/changeo
export PYTHONPATH
else
echo "PASSCAL environment variable not set! Cannot continue."
exit 1
fi
if [ ! -e "$PYTHON" ]
then
echo "$PYTHON not found! PyPASSCAL is required. Make sure picpython is in your path variable"
exit
fi
if [ $# = 0 ]
then
echo "Starting changeo..."
${PYTHON} ${PASSCAL}/lib/python/changeo/changeo.py $* &
exit 0
fi
if [ $1 = "-#" ]
then
${PYTHON} ${PASSCAL}/lib/python/changeo/changeo.py $*
exit 0
fi
echo "Starting changeo..."
${PYTHON} ${PASSCAL}/lib/python/changeo/changeo.py $* &
#!/usr/bin/env bash
# Launch changeo.py
if [ ! -z "${PASSOFT}" ]
then
PYTHONPATH=${PASSOFT}/lib/python/changeo
export PYTHONPATH
else
echo "PASSOFT environment variable not set! Cannot continue."
exit 1
fi
if [ $# = 0 ]
then
echo "Starting changeo..."
${PASSOFT}/lib/python/changeo/changeo.py $* &
exit 0
fi
if [ $1 = "-#" ]
then
${PASSOFT}/lib/python/changeo/changeo.py $*
exit 0
fi
echo "Starting changeo..."
${PASSOFT}/lib/python/changeo/changeo.py $* &
.TH CHANGEO 4 "2006.004" "" "PASSCAL MANUAL PAGES"
.SH NAME
changeo \- A Python user interface and control program for Reftek
RT-130 bench testing and field use.
.SH SYNOPSIS
changeo
.SH DESCRIPTION
\fBchangeo\fR allows a user to send various test commands and
programming parameters to Reftek RT-130s DASs when the units are being
tested in the laboratory and being used in the field. The program is
used in conjunction with a serial line controller box that is used
when beginning testing to control serial communication with the
connected DASs.
.sp
The program is started by entering its name on the command line.
There are no command line arguments.
.sp
When started the program checks to ensure that the Python pySerial
package has been installed on the host system. This package must be
installed before the program can communicate. No other special
packages are needed.
.sp
To begin testing the DASs connect the serial cable from the serial
line controller box to the serial port of the host computer, and the
serial cables from the serial line controller box to the DASs. Any
serial line may be connected to any DAS. Press the reset button on
the serial line controller box. This resets the box so that only one
of the up to 15 receive lines to the serial port of the host computer
from the DASs will be active. All of the DASs will hear the commands
from the host computer, but responses from only one at a time will be
allowed in the initial stages. This will prevent the data from the
DASs from being corrupted since all of the DASs will try to respond at
the same time.
.sp
Next click on the Enumerate button on the Changeo control panel. This
will open the serial port, send the Identify Unit and Software (ID)
command out to the DASs, read the response, and close the serial port
15 times. Each time the DAS whose transmit line is active (if any DAS
is connected to that line) will respond with its Unit ID number. When
the serial port is closed the change in state of the serial port's RTS
line will signal to the serial line controller to deactivate the
current serial line and activate the next serial receive line
(transmit line from the DAS). This allows Changeo to step through all
of the connected DASs and compile a list of all of the unit ID numbers
of the connected (and functioning) DASs.
.sp
When all 15 (possible) DASs have been queried for their unit ID
numbers the serial line controller will activate all of the serial
transmit lines from the DASs.
.sp
The DAS List portion of the control panel is a Python Listbox widget.
This means that any or all of the listed DASs may be selected by
clicking on their ID numbers. Selected DASs will have commands
transmitted to them. See more on this subject below in the 0000
Preference button explanation.
.sp
Once all of the DASs have been enumerated the sequence of events is
controlled by the user and by which tests and functions he wants to
perform.
.sp
Status messages appear in the Messages section of the control panel.
All of the status messages are written to the file changeo.msg while
the program is running.
.sp
The program may be used to set up and send all of the 'popular'
programming parameters to the RT-130's.
.sp
The remainder of the help information that should be here can be read
in the Help menu item Help inside the program.
.SH OPTIONS
.TP
The Command Port device designation may be supplied to the program as
a command line argument. If one is supplied then reading of the setups
file changeo.set will not occur.
.SH AUTHOR
Bob Greschke, January 2006
This diff is collapsed.
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = changeo
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.. include:: ../AUTHORS.rst
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# changeo documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import changeo
# -- General configuration ---------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'changeo'
copyright = u"2018, IRIS PASSCAL"
author = u"IRIS PASSCAL"
# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
# the built documents.
#
# The short X.Y version.
version = changeo.__version__
# The full version, including alpha/beta/rc tags.
release = changeo.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output -------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# -- Options for HTMLHelp output ---------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'changeodoc'
# -- Options for LaTeX output ------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'changeo.tex',
u'changeo Documentation',
u'IRIS PASSCAL', 'manual'),
]
# -- Options for manual page output ------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'changeo',
u'changeo Documentation',
[author], 1)
]
# -- Options for Texinfo output ----------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'changeo',
u'changeo Documentation',
author,
'changeo',
'One line description of project.',
'Miscellaneous'),
]
.. include:: ../CONTRIBUTING.rst
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