-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #1
- Loading branch information
Showing
8 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,44 @@ | ||
# pytopotoolbox | ||
Python interface to TopoToolbox | ||
|
||
Python interface to TopoToolbox. | ||
|
||
## Guide | ||
|
||
Temporary guide for the functionality of the package. For Windows replace "python3" with "py". | ||
|
||
### Generate distribution archives | ||
|
||
Generates a .whl and .tar.gz which then can be used to install package with pip. | ||
These Files can be distributed with PyPi or downloaded directly. | ||
|
||
```bash | ||
cd path/to/pytopotoolbox | ||
python3 -m pip install --upgrade build | ||
python3 -m build | ||
``` | ||
|
||
### Installing distribution archives | ||
|
||
Use "--force-reinstall" to overwrite previous install. | ||
|
||
```bash | ||
pip install dist_name.whl | ||
``` | ||
|
||
### Installing from repository | ||
|
||
If want to install the package directly from the repository without first generating a ".whl" file. | ||
|
||
```bash | ||
cd path/to/pytopotoolbox | ||
pip install . | ||
``` | ||
|
||
### Unittest | ||
|
||
How to run a single unittest: | ||
|
||
```bash | ||
cd path/to/pytopotoolbox | ||
python3 -m tests.filename | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "topotoolbox" | ||
version = "3.0.1" | ||
authors = [ | ||
{name="Wolfgang Schwanghart", email="w.schwanghart@geo.uni-potsdam.de"}, | ||
{name="Dirk Scherler", email="scherler@fz-potsdam.de"}, | ||
{name="Will Kearney", email="william.kearney@uni-potsdam.de"}, | ||
{name="Theo Bringezu", email="theophil.bringezu@uni-potsdam.de"} | ||
] | ||
description = "Python interface to TopoToolbox." | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
dependencies = [ | ||
"numpy", | ||
"matplotlib" | ||
] | ||
requires-python = ">=3.8" | ||
keywords = ["TopoToolbox"] | ||
classifiers = [] | ||
|
||
[project.urls] | ||
Homepage = "https://topotoolbox.github.io" | ||
Repository = "https://github.com/TopoToolbox/pytopotoolbox" | ||
Issues = "https://github.com/TopoToolbox/pytopotoolbox/issues" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .placeholder import example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def example(input): | ||
return str(input) + " example" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import topotoolbox | ||
|
||
print(dir(topotoolbox)) | ||
print(topotoolbox.example("test")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import unittest | ||
from src.topotoolbox.placeholder import example | ||
|
||
class TestPlaceholder(unittest.TestCase): | ||
def test_example1(self): | ||
self.assertEqual(example("test"), "test example", "failed unittest") | ||
|
||
def test_example2(self): | ||
self.assertEqual(example(""), " example", "failed unittest") | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |