зеркало из https://github.com/microsoft/InQRy.git
Merge branch 'pybar' into master
- Fixed merge conflicts. Not sure why those occurred as all files had been removed from master branch
This commit is contained in:
Коммит
f2a5eb93b7
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,11 @@
|
|||
# PyBar
|
||||
Generate asset QR codes for a physical inventory procedure
|
||||
|
||||
### Install
|
||||
|
||||
`python3 setup.py install`
|
||||
|
||||
|
||||
### Test
|
||||
|
||||
`python3 setup.py pytest`
|
|
@ -0,0 +1,7 @@
|
|||
class Asset:
|
||||
"""The current machine and it's associated specs"""
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def is_valid(self):
|
||||
return None
|
|
@ -0,0 +1,6 @@
|
|||
import instructions
|
||||
|
||||
fieldset = {'trashcan': instructions.trashcan}
|
||||
|
||||
for fieldset in fieldsets:
|
||||
pass
|
|
@ -0,0 +1,3 @@
|
|||
class SystemProfile:
|
||||
def __init__(self):
|
||||
pass
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
setup(name='PyBar',
|
||||
version='0.0.1',
|
||||
license='MIT',
|
||||
description='Generate QRCodes for a Physical Inventory',
|
||||
author='Eric Hanko',
|
||||
author_email='v-erhank@microsoft.com',
|
||||
packages=['pybar'],
|
||||
long_description=open('README.md').read(),
|
||||
install_requires=["qrcode >= 5.3.0"],
|
||||
setup_requires=['pytest-runner'],
|
||||
tests_require=['pytest'],
|
||||
)
|
|
@ -0,0 +1,20 @@
|
|||
import pytest
|
||||
from pybar.asset import Asset
|
||||
|
||||
test_data = {
|
||||
'owner': 'Hanko',
|
||||
'serial': 'HZ1KF3L90',
|
||||
'cpu': ('Intel', 'Core i7', '2.9GHz')
|
||||
}
|
||||
|
||||
|
||||
class TestAsset:
|
||||
def test_empty_asset_instantiation_works(self):
|
||||
Asset()
|
||||
|
||||
def test_empty_asset_is_not_valid(self):
|
||||
asset = Asset()
|
||||
assert not asset.is_valid()
|
||||
|
||||
def test_asset_is_valid_with_known_good_test_data(self):
|
||||
pass
|
|
@ -0,0 +1,7 @@
|
|||
import pytest
|
||||
from pybar.system_profile import SystemProfile
|
||||
|
||||
|
||||
class TestSystemProfile:
|
||||
def test_empty_profile_instantiation_works(self):
|
||||
SystemProfile()
|
Загрузка…
Ссылка в новой задаче