Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make python functions callable from other projects. #13

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed python/__pycache__/refresh_view.cpython-310.pyc
Binary file not shown.
Binary file removed python/__pycache__/refresh_view_test.cpython-310.pyc
Binary file not shown.
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# import function hello from current directory refresh_view.py
import sys
import refresh_view
import unittest

from python.python_functions import refresh_view

print(sys.path)


class TestStringMethods(unittest.TestCase):
def test_hello(self):
self.assertEqual(refresh_view.hello('Chen'), 'Hello, Chen!')


# run test
if __name__ == '__main__':
unittest.main()


10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from setuptools import setup

setup(
name='python_functions',
version='1.0',
description='Functions to be used in treetracker DAG',
packages=['python_functions'],
package_dir={'python_functions':'python/python_functions'},
scripts=['python/scripts/ci.sh'],
)