Commit 57521a2a authored by Chris Woodall's avatar Chris Woodall
Browse files

initial commit

parents
Pipeline #4345 failed with stages
in 0 seconds
# 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
* pypuck 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.
```
# 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/
*.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/
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# pyenv python configuration file
.python-version
stages:
- build
- test
# - release-job
build:
stage: build
# instead of calling g++ directly you can also use some build toolkit like make
# install the necessary build tools when needed
# before_script:
# - apt update && apt -y install make autoconf
script:
- bash ./scripts/build
# depending on your build setup it's most likely a good idea to cache outputs to reduce the build time
# cache:
# paths:
# - "*.o"
# run tests using the binary built before
test:
stage: test
script:
- bash ./scripts/test
#
# release-job:
# # script:
# # - build for release
# artifacts:
# paths:
# - build/*
# only:
# - devel
# - tags
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
### [Unreleased][unreleased]
#### Added
- package files
# Contributing to pypuck
This guide details how to use issues and pull requests to improve pypuck.
Please stick as close as possible to the guidelines. That way we ensure quality in our products and merge requests become easier.
For our standard Software Version Control Procedures at Barrett please see:
- `\\fs2\projects\Barrett Medical\Standards\Software Standards\SWSTD-1_RevAH_Git Version Control Process_RELEASED.doc`
## Merge requests
### Naming and Descriptions
Merge request names should be descriptive, rather than using with the default "Merging branch-name into branch name" name one should fill in details using the following format.
- [Project Name] Brief description of change or Issue #s
- [Common] Brief description of changes.
In the case of a documentation update:
- [Documentation] Brief description.
In the case of an added script or change to shared files:
- [Infrastructure] Brief description.
The brief should give a good idea of what has been done so
code reviewers know what to focus on. The description that follows should include Issues #s addressed in the change along with a more detailed description. Write your descriptions for your audience, the code reviewers. Make sure they know what to look for, and where necessary reference Issues, SOPs, CRs, Meeting Minutes to build the story of the merge request. It is not necessary to go into excruciating detail, but it is useful to have enough detail to make the code review go smoothly.
Merge requests should also get due dates, this will help code reviewers prioritize there work and get to your Merge Request in a timely, but not rushed manner.
If you do not want code review or a merge to happen yet mark your merge requests as Works in Progress by changing the name to:
- WIP: Merge Request Name
### Code Review
To initiate a code review put the following list in your merge requests:
```
Reviewers:
- [ ] @cw
- [ ] @amyblank
- [ ] @bz
- [ ] @ps
```
**How many reviewers do I need?**
For non-trivial changes to code you need, at least _3_ individuals (including yourself) to review the code and provide you with a check before merging the merge request. However, for trivial changes (typo corrections), documentation updates, or infrastructure changes (changes to scripts, etc.) you only need _2_ reviewers (including yourself).
**When do we code review?**
Code reviews are only required when merging into devel or master, but it is encouraged to do smaller code reviews as developers merge features into each others branches or even their own.
**How do we code review?**
Code reviewers should file their comments inline and also give a Merge Request wide code review.
Any comment which is not dismissed or resolved in the merge request should get Issues and be attached to a milestone when appropriate.
**How does a reviewer claim a code review?**
They edit the merge request and put - WIP next to their name, for example:
```
- [ ] @cw - WIP
```
**What is the format for a merge request?**
Please see [the template](.gitlab/merge_request_templates/code-review.md)
Copyright 2017 Barrett Technology, LLC.
Proprietary
include CHANGELOG.md
include CONTRIBUTING.md
include LICENSE
include README.md
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include assets/eds/*.eds
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
.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/
lint: ## check style with flake8
flake8 pypuck tests
test: ## run tests quickly with the default Python
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 pypuck -m pytest
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/pypuck.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ pypuck
$(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: clean ## package and upload a release
python setup.py sdist upload
python setup.py bdist_wheel upload
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
# pypuck
> Python library for the p3 motorcontroller
**Current CI Status**: [![Build Status](https://git.barrett.com/sandbox/pypuck/badges/devel/build.svg)](https://git.barrett.com/sandbox/pypuck/pipelines)
<!-- TOC depthFrom:1 depthTo:4 withLinks:1 updateOnSave:1 orderedList:0 -->
- [pypuck](#cookiecutterprojectslug)
- [Overview](#overview)
- [Usage](#usage)
- [Contributing](#contributing)
- [Resources](#resources)
<!-- /TOC -->
## Overview
## Usage
```
git clone https://git.barrett.com/sandbox/pypuck
```
## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md)
## Resources
pip==8.1.2
bumpversion==0.5.3
wheel==0.29.0
watchdog==0.8.3
flake8==2.6.0
tox==2.3.1
coverage==4.1
Sphinx==1.4.8
pytest==2.9.2
pytest-runner==2.11.1
#!/bin/sh
#
# scripts/build: Build the application
#
#!/bin/sh
#
# scripts/debug: Launch the application in a debug mode
#
#!/bin/sh
#
# scripts/run: Run the application
#
#!/bin/sh
#
# scripts/setup: Set up application for the first time after cloning, or set it
# back to the initial first unused state.
#!/bin/sh
#
# scripts/test: Run all unit tests.
#
[bumpversion]
current_version = 0.1.0
commit = True
tag = True
[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:pypuck/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
[bdist_wheel]
universal = 1
[flake8]
exclude = docs
[aliases]
test = pytest
# Define setup.py command aliases here
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.md') as readme_file:
readme = readme_file.read()
with open('CHANGELOG.md') as history_file:
history = history_file.read()
requirements = [
# TODO: put package requirements here
'canopen==0.6.0.dev1.patch1',
'asset',
]
setup_requirements = [
'pytest-runner',
# TODO(cw): put setup requirements (distutils extensions, etc.) here
]
test_requirements = [
'pytest',
# TODO: put package test requirements here
]
dependency_links=[
'git+https://git.barrett.com/vendor/python-canopen@0.6.0.dev1.patch1#egg=canopen-0.6.0.dev1.patch1'
]
setup(
name='pypuck',
version='0.1.0',
description="Python library for the P3 motorcontroller",
long_description=readme + '\n\n' + history,
author="Christopher Woodall",
author_email='cw@barrett.com',
url='https://github.com/cw/pypuck',
packages=find_packages(include=['pypuck']),
entry_points={
},
include_package_data=True,
install_requires=requirements,
zip_safe=False,
keywords='pypuck',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3',
# 'Programming Language :: Python :: 3.3',
# 'Programming Language :: Python :: 3.4',
# 'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements,
setup_requires=setup_requirements,
dependency_links=dependency_links,
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment