diff --git a/README.md b/README.md index 3ea8c90d89d836815886cf449111b693318c6074..c52363dc5b4e4a833ef1f23438ba567882c8c41c 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,21 @@ At this stage the project is still exploratory and not exactly meant for third-p It is recommended to have: - README.md - .gitignore -- Directory for code +- Directories for organization + +## Basic usage + +Your functions can be imported as a library if the directory contains a `__init__.py` file. Check in this repository the `example_basic` directory for example. + +It is possible to use your library **without installation**, if the Python kernel is started at the root folder of the repository. + +``` python +fima@pop-os ~/example-repositories/example-repository-basic $ python +Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux +Type "help", "copyright", "credits" or "license" for more information. +>>> import example_basic +>>> example_basic.examples.first_example() +This is the first example + +``` diff --git a/docs/details.md b/docs/details.md index 80f06f82893e4dd50ebde30ff9a8762387a58aaf..ed2a30f40053941d85305900107cc2cb35659eaa 100644 --- a/docs/details.md +++ b/docs/details.md @@ -4,7 +4,11 @@ In the `docs` directory we can add extended documentation about the repository This is a good place for more detailed descriptions that would make the readme fille too long. -Small images used to illustrate the documentation can be added to the `docs/img/` directory: +## Images - +Small images used to illustrate the documentation can be added to the `docs/img/` directory. + +As example, here's an image of DTU Compute building: + + ` \ No newline at end of file diff --git a/docs/img/DTU-Compute.jpg b/docs/img/DTU-Compute.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f6a6c3a4995eb485b6baa9df8cd172f4350f723c Binary files /dev/null and b/docs/img/DTU-Compute.jpg differ diff --git a/docs/img/blobs_256x256.tif b/docs/img/blobs_256x256.tif deleted file mode 100644 index 84bdc64ea2cf8febbf686932b945ce81b155c0c7..0000000000000000000000000000000000000000 Binary files a/docs/img/blobs_256x256.tif and /dev/null differ diff --git a/example_basic/__init__.py b/example_basic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..23d3aadd9c410d80da768f70b6cae453fd42c5f5 --- /dev/null +++ b/example_basic/__init__.py @@ -0,0 +1 @@ +from example_basic import examples \ No newline at end of file diff --git a/example_basic/examples.py b/example_basic/examples.py new file mode 100644 index 0000000000000000000000000000000000000000..93e9fa8a4b45c1c508f02d5e2d26f66eddb2aeb6 --- /dev/null +++ b/example_basic/examples.py @@ -0,0 +1,3 @@ +def first_example(): + print ("This is the first example") + \ No newline at end of file