Commit bdcd947f authored by Enrique Garcia's avatar Enrique Garcia
Browse files

creation of the simple library

parent d76db6b0
__pycache__
.pytest_cache
# template_escape
A simple example project to be used as a template
## Guidelines
Please take few minutes to check [ESCAPE repository's guidelines](https://gitlab.in2p3.fr/escape2020/guidelines) (License, access, PEP8 style...)
A structure similar to this repository is likely advised. **Please feel free to
copy / base on it /** ***template it*** **!** (Look to left of the
`Clone or download` button).
- A readme.md file.
- A setup file to install the library.
- A .gitignore file.
- An **open source** license / license file.
- The structure of the repository (***same name as project***)
- Include unitary test would be awesome !
## How to provide software to the repository
TBD
## How to publish in ESCAPE
TBD
## Report issue / Ask a question
Use [GitLab Issues (insert correct link)](https://github.com/garciagenrique/test_repo_ESCAPE/issues)
import setuptools
import template_escape
setuptools.setup(name='template_escape',
version=template_escape.__version__,
description="DESCRIPTION", # these should be minimum list of what is needed to run
packages=setuptools.find_packages(),
install_requires=['numpy'],
package_data={'template_escape': ['./template_escape/*']},
tests_require=['pytest'],
author='See Guidelines',
author_email='See Guidelines',
license='See LICENSE file',
url='https://gitlab.in2p3.fr/escape2020'
)
# -*- coding: utf-8 -*-
# Template module with an example for the ESCAPE project
import numpy as np
def square_number(number):
"""Function that returns the square of the input number.
Parameters:
-----------
number: int or float - number to square.
Returns:
--------
the square of the input number.
"""
return np.square(number)
# -*- coding: utf-8 -*-
import numpy as np
from template_escape.code_escape import square_number
def test_square_number():
test_number = square_number(np.random.random_sample())
assert test_number > 0
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