Skip to content

Commit

Permalink
Sat Jan 13 15:01:42 CET 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
dgerosa committed Jan 13, 2024
1 parent 992f578 commit c4040ae
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
25 changes: 18 additions & 7 deletions lectures/L08_pytest_pip.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,32 @@
"\n",
"*Davide Gerosa (Milano-Bicocca)*\n",
"\n",
"**Sources**: Michael Zingale at Stony Brook University: https://sbu-python-class.github.io"
"**Sources**: \n",
" - Michael Zingale at Stony Brook University: https://sbu-python-class.github.io\n",
" - \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part 1. Share your own package "
"Plan for today:\n",
" \n",
" - Part 1. Package and share your code\n",
" - Part 2. Testing done right\n",
" - Part 3. Find the bottleneck"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part 1. Package and share your code"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -57,7 +70,7 @@
"\n",
"## Standalone module\n",
"\n",
"Here's a very simply module (lets call it `hello.py`):\n",
"Here's a very simple module (lets call it `hello.py`):\n",
"\n",
"```python\n",
"def hello():\n",
Expand Down Expand Up @@ -307,8 +320,6 @@
"\n",
"https://github.com/dgerosa/scientificcomputing_bicocca_2023/tree/main/lectures/mymodule\n",
"\n",
"On your local computer, if you have `git` installed and know how to use it, you can clone the repository. Otherwise go [here](https://github.com/dgerosa/scientificcomputing_bicocca_2023/tree/main), then \"Code\", and \"Download ZIP\".\n",
"\n",
"The directory structure appears as:\n",
"\n",
"```\n",
Expand Down Expand Up @@ -377,7 +388,7 @@
"from setuptools import setup, find_packages\n",
"\n",
"setup(name='mymodule',\n",
" description='test module the SciComp class',\n",
" description='test module for the SciComp class',\n",
" url='https://github.com/dgerosa',\n",
" author='Davide Gerosa',\n",
" author_email='[email protected]',\n",
Expand Down
15 changes: 7 additions & 8 deletions lectures/mymodule/setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from setuptools import find_packages, setup
from setuptools import setup, find_packages

setup(name='mymodule',
description='test module for PHY 546',
url='https://github.com/sbu-python-class/mymodule',
author='Michael Zingale',
author_email='[email protected]',
license='BSD',
version="0.0.1",
description='test module for the SciComp class',
url='https://github.com/dgerosa',
author='Davide Gerosa',
author_email='[email protected]',
license='MIT',
packages=find_packages(),
install_requires=['numpy', 'matplotlib'])
install_requires=['numpy', 'matplotlib'])

0 comments on commit c4040ae

Please sign in to comment.