setup.py and test
This commit is contained in:
parent
b10edb55eb
commit
fc6b0c7663
@ -3,5 +3,5 @@ python_test:
|
|||||||
script:
|
script:
|
||||||
- pip install --upgrade pip
|
- pip install --upgrade pip
|
||||||
- pip install coverage
|
- pip install coverage
|
||||||
- coverage run --source=src -m unittest discover
|
- coverage run --source=obj2html -m unittest discover
|
||||||
- coverage report
|
- coverage report
|
||||||
|
13
README.md
13
README.md
@ -27,14 +27,23 @@ display(HTML('index.html'))
|
|||||||
- [ ] .mat files support
|
- [ ] .mat files support
|
||||||
|
|
||||||
# Dev
|
# Dev
|
||||||
|
|
||||||
|
* run test
|
||||||
```
|
```
|
||||||
python3.8 -m unittest discover
|
python3.8 -m unittest discover
|
||||||
|
```
|
||||||
|
* run test with coverage
|
||||||
|
```
|
||||||
pip install coverage
|
pip install coverage
|
||||||
python3.8 -m coverage run --source=src -m unittest discover
|
python3.8 -m coverage run --source=src -m unittest discover
|
||||||
python3.8 -m coverage report -m
|
python3.8 -m coverage report -m
|
||||||
```
|
```
|
||||||
|
* deploy pipy
|
||||||
|
```
|
||||||
|
python setup.py sdist
|
||||||
|
pip install twine
|
||||||
|
twine upload dist/*
|
||||||
|
```
|
||||||
|
|
||||||
# References
|
# References
|
||||||
In this chapter I add at least a link for each of the knowledge needed for develop this project.
|
In this chapter I add at least a link for each of the knowledge needed for develop this project.
|
||||||
|
41
setup.py
41
setup.py
@ -1,25 +1,38 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
|
long_des = """ # obj2html lib
|
||||||
|
You can use that lib to create html file from a .obj path:
|
||||||
|
```
|
||||||
|
from obj2html import obj2html
|
||||||
|
|
||||||
|
html_string = obj2html(obj_path)
|
||||||
|
obj2html(obj_path, 'index.html')
|
||||||
|
# firefox index.html
|
||||||
|
```
|
||||||
|
|
||||||
|
Use in a Jupyter notebook to display a .obj 3D file:
|
||||||
|
```
|
||||||
|
! pip install obj2html
|
||||||
|
from obj2html import obj2html
|
||||||
|
from IPython.display import display, HTML
|
||||||
|
|
||||||
|
obj_path = 'model.obj'
|
||||||
|
obj2html(obj_path, 'index.html')
|
||||||
|
|
||||||
|
display(HTML('index.html'))
|
||||||
|
```
|
||||||
|
"""
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'obj2html', # How you named your package folder (MyLib)
|
name = 'obj2html', # How you named your package folder (MyLib)
|
||||||
packages = ['obj2html'], # Chose the same as "name"
|
packages = ['obj2html'], # Chose the same as "name"
|
||||||
version = '0.1', # Start with a small number and increase it with every change you make
|
version = '0.2', # Start with a small number and increase it with every change you make
|
||||||
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
|
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
|
||||||
description = 'TYPE YOUR DESCRIPTION HERE', # Give a short description about your library
|
description = 'Create an html with three.js that contains the given .obj file.', # Give a short description about your library
|
||||||
|
long_description=long_des,
|
||||||
author = 'Nicola Landro', # Type in your name
|
author = 'Nicola Landro', # Type in your name
|
||||||
author_email = 'nicolaxx94@live.it', # Type in your E-Mail
|
author_email = 'nicolaxx94@live.it', # Type in your E-Mail
|
||||||
url = 'https://gitlab.com/nicolalandro/obj2html', # Provide either the link to your github or to your website
|
url = 'https://gitlab.com/nicolalandro/obj2html', # Provide either the link to your github or to your website
|
||||||
download_url = 'https://github.com/user/reponame/archive/v_01.tar.gz', # I explain this later on
|
|
||||||
keywords = ['3D', '.obj', '.html','jupyter', ''], # Keywords that define your package best
|
keywords = ['3D', '.obj', '.html','jupyter', ''], # Keywords that define your package best
|
||||||
install_requires=[],
|
install_requires=[],
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 5 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
|
|
||||||
'Intended Audience :: Developers', # Define that your audience are developers
|
|
||||||
'Topic :: Software Development :: Build Tools',
|
|
||||||
'License :: OSI Approved :: MIT License', # Again, pick a license
|
|
||||||
'Programming Language :: Python :: 3', #Specify which pyhton versions that you want to support
|
|
||||||
'Programming Language :: Python :: 3.6',
|
|
||||||
'Programming Language :: Python :: 3.7',
|
|
||||||
'Programming Language :: Python :: 3.8',
|
|
||||||
'Programming Language :: Python :: 3.9',
|
|
||||||
],
|
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user