You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-10Lines changed: 23 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Alternative software for `miniforge`:
22
22
The python_github_tutorial package dependencies can be installed via conda, and this package tagged in conda via pip install:
23
23
24
24
To perform the python_github_tutorial package build, please run the following commands
25
-
from the ``<YOUR_FILE_PATH/python_github_tutorial`` directory.
25
+
from the ``<YOUR_FILE_PATH>/python_github_tutorial`` directory.
26
26
27
27
Create and install conda package:
28
28
@@ -38,25 +38,29 @@ Activate the environment the environment
38
38
39
39
`conda activate python_github_tutorial`
40
40
41
-
Install the developement enviroment
41
+
Install the developement environment
42
42
43
43
`pip install -e .`
44
44
45
-
Note: If you update the conda package, you may have to redo the pip install. Without doing this, it may allow incompatable versions of the dependencies to be installed, etc.:
45
+
> [!NOTE]
46
+
> If you update the conda package, you may have to redo the pip install. Without doing this, it may allow incompatable versions of the dependencies to be installed, etc.:
46
47
47
48
48
49
## Run the example
49
50
50
-
This is an example of the supplimentary functions in the utils directory (``<YOUR_FILE_PATH/python_github_tutorial/python_github_tutorial/utils``) and the main function in the main_functions directory (``<YOUR_FILE_PATH/python_github_tutorial/python_github_tutorial/main_functions``).
51
+
This is an example of the supplimentary functions in the utils directory (``<YOUR_FILE_PATH>/python_github_tutorial/python_github_tutorial/utils``) and the main function in the main_functions directory (``<YOUR_FILE_PATH>/python_github_tutorial/python_github_tutorial/main_functions``).
52
+
The example (``examples.py``) is located here ``<YOUR_FILE_PATH>/python_github_tutorial/examples_to_run``. The instructions to run it are provided below:
51
53
52
-
The example is located here ``<YOUR_FILE_PATH/python_github_tutorial/examples_to_run``. The instructions to run it are provided below:
54
+
The example is located here ``<YOUR_FILE_PATH>/python_github_tutorial/examples_to_run``. The instructions to run it are provided below:
53
55
54
56
`cd examples_to_run`
55
57
56
58
`python examples.py`
57
59
58
60
## Run the interactive example in Visual Studios Code (VScode)
59
61
62
+
This interactive example (``interactive_examples.py``) is located here ``<YOUR_FILE_PATH>/python_github_tutorial/examples_to_run``.
63
+
60
64
This is the same example but running it as an interactive job (i.e., like a Jupyter notebook). The example is located here 'examples_to_run/interactive_examples.py'.
61
65
62
66
When using Visual Studios Code (VScode), the '# %%' above each section makes it a cell, which can be run individually by holding shift and pressing enter.
@@ -69,7 +73,7 @@ The unit tests via ``pytest`` ensure that the code is build properly, running co
69
73
accurate results.
70
74
71
75
To perform these tests (unit tests) for the python_github_tutorial package, please run the following commands
72
-
from the ``<YOUR_FILE_PATH/python_github_tutorial/python_github_tutorial/tests`` directory:
76
+
from the ``<YOUR_FILE_PATH>/python_github_tutorial/python_github_tutorial/tests`` directory:
73
77
74
78
Run all the tests:
75
79
@@ -89,22 +93,31 @@ Run individual test on 'test_main_functions.py':
89
93
90
94
`pytest test_main_functions.py`
91
95
96
+
Run individual test on 'test_docs_build.py':
97
+
98
+
`cd python_github_tutorial/tests`
99
+
100
+
`pytest test_docs_build.py`
101
+
92
102
## Build the documentation (docs)
93
103
94
104
Building these HTML files locally via sphinx, which will allow you to access them with your
95
105
local internet browsing application or HTML viewer (chrome, safari, VScode, etc.).
96
-
The HTML files will be located in the ``<YOUR_FILE_PATH/python_github_tutorial/docs/_build/html`` directory after they are built.
106
+
After the files are built, the HTML files will be located in the ``<YOUR_FILE_PATH>/python_github_tutorial/docs/_build/html`` directory after they are built.
97
107
98
108
The python_github_tutorial utilizes [sphinx](https://www.sphinx-doc.org/en/master/index.html) to construct the documentation.
99
-
The user can build the documentation locally by executing the following command from the ``docs`` directory:
100
109
101
-
To perform the documents (docs) build for the python_github_tutorial package, please run the following commands
102
-
from the ``<YOUR_FILE_PATH/python_github_tutorial/docs`` directory:
110
+
The user can build the documentation locally by executing the following command from the ``docs`` directory.
111
+
To perform the documents (docs) build for the python_github_tutorial package, please run the following commands from the ``<YOUR_FILE_PATH>/python_github_tutorial/docs`` directory:
112
+
113
+
103
114
104
115
`conda activate python_github_tutorial`
105
116
106
117
`cd docs`
107
118
108
119
`make html`
109
120
121
+
After the files are built, the HTML files will be located in the ``<YOUR_FILE_PATH>/python_github_tutorial/docs/_build/html`` directory after they are built.
122
+
110
123
You can find the docs `html` build here -> `docs/_build/html`. When in the `docs/_build/html` directory, click on any `html` file and it will open the full docs.
This project's environment can be built using ``miniforge``.
9
+
Alternative software for ``miniforge``:
10
+
- You use can use ``anaconda`` or ``miniconda``, which use the same ``conda`` command.
11
+
- You use can use ``micromamba`` or ``mamba``, supplimenting ``micromamba`` or ``mamba`` respectively for ``conda`` when using them.
12
+
13
+
The python_github_tutorial package dependencies can be installed via conda, and this package tagged in conda via pip install:
14
+
15
+
To perform the python_github_tutorial package build, please run the following commands
16
+
from the ``<YOUR_FILE_PATH>/python_github_tutorial`` directory.
17
+
7
18
::
8
19
9
-
$ cd path_to_first_python_github_tutorial_dirctory_with_environment_yml_file
20
+
$ cd python_github_tutorial
10
21
11
22
$ conda env create -f environment.yml
12
23
@@ -15,31 +26,99 @@ Install an editable version from the source (GitHub)
15
26
$ pip install -e .
16
27
17
28
29
+
.. note::
30
+
31
+
If you update the conda package, you may have to redo the pip install. Without doing this, it may allow incompatable versions of the dependencies to be installed, etc.:
32
+
33
+
34
+
Run the Example
35
+
---------------
36
+
37
+
This is an example of the supplimentary functions in the utils directory (``<YOUR_FILE_PATH>/python_github_tutorial/python_github_tutorial/utils``) and the main function in the main_functions directory (``<YOUR_FILE_PATH>/python_github_tutorial/python_github_tutorial/main_functions``).
38
+
The example (``examples.py``) is located here ``<YOUR_FILE_PATH>/python_github_tutorial/examples_to_run``. The instructions to run it are provided below:
39
+
40
+
::
41
+
42
+
$ cd examples_to_run
43
+
44
+
$ python examples.py
45
+
46
+
Run the Interactive Example in Visual Studios Code (VScode)
This interactive example (``interactive_examples.py``) is located here ``<YOUR_FILE_PATH>/python_github_tutorial/examples_to_run``.
50
+
51
+
This is the same example but running it as an interactive job (i.e., like a Jupyter notebook). The example is located here 'examples_to_run/interactive_examples.py'.
52
+
53
+
When using Visual Studios Code (VScode), the '# %%' above each section makes it a cell, which can be run individually by holding shift and pressing enter.
54
+
55
+
18
56
Building the HTML documenation files (GitHub)
19
57
---------------------------------------------
20
58
21
-
Building these HTML files locally via sphinx, which will allow you to access them with your
22
-
local internet browsing application or HTML viewer (chrome, safari, VScode, etc.).
23
-
The HTML files will be located in the ``docs/_build/html`` directory after they are built.
59
+
Building these HTML files locally via sphinx, which will allow you to access them with your
60
+
local internet browsing application or HTML viewer (chrome, safari, VScode, etc.).
24
61
25
62
The python_github_tutorial utilizes `sphinx <https://www.sphinx-doc.org/en/master/index.html>`_ to construct the documentation.
26
-
The user can build the documentation locally by executing the following command from the ``docs`` directory::
63
+
64
+
The user can build the documentation locally by executing the following command from the ``docs`` directory.
65
+
To perform the documents (docs) build for the python_github_tutorial package, please run the following commands from the ``<YOUR_FILE_PATH>/python_github_tutorial/docs`` directory:
66
+
67
+
::
27
68
28
69
$ conda activate python_github_tutorial
29
70
71
+
$ cd docs
72
+
30
73
$ make html
31
74
32
75
76
+
After the files are built, the HTML files will be located in the ``<YOUR_FILE_PATH>/python_github_tutorial/docs/_build/html`` directory after they are built.
77
+
78
+
You can find the docs `html` build here -> `docs/_build/html`. When in the `docs/_build/html` directory, click on any `html` file and it will open the full docs.
79
+
80
+
33
81
Testing the software installation
34
82
----------------------------------
35
83
36
84
The python_github_tutorial software tests the installation using `pytest <https://docs.pytest.org/en/stable/>`_.
37
85
The unit tests via ``pytest`` ensure that the code is build properly, running correctly and producing
38
86
accurate results.
39
87
40
-
To perform these tests (unit tests) for the python_github_tutorial package, please run the following commands
41
-
from the ``python_github_tutorial/tests`` directory::
88
+
To perform these tests (unit tests) for the python_github_tutorial package, please run the following commands
89
+
from the ``<YOUR_FILE_PATH>/python_github_tutorial/python_github_tutorial/tests`` directory:
0 commit comments