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
@@ -52,14 +54,16 @@ If you want to write code, a good way to get started is by looking at the issues
52
54
### pre-commit Hooks
53
55
To ensure that **code formatters _(isort and black)_**, **linters _(flake8 and pylint)_**, and **unit tests** are always run against your code on **every commit** set up the **pre-commit hooks**.
54
56
55
-
* Install development dependencies
57
+
> :warning:_pyRACF uses Poetry as it's **build backend** and for **dependency management**. After installing Poetry, ensure that the install location of Poetry is added to the `$PATH`**environment variable** if it is not already._
> :warning:_If your workstation cannot find `pre-commit`, ensure that the **Python package**`bin` directory location is added to the `$PATH`**environment variable**._
61
65
```shell
62
-
pre-commit install -f
66
+
poetry run pre-commit install -f
63
67
```
64
68
65
69
### Adding New Functionality
@@ -70,6 +74,12 @@ If you have a new functionality that can be added to the package, open a GitHub
70
74
71
75
The main way to test pyRACF is to write **unit tests** in the [`tests`](tests) folder which **mock** the real **IRRSMO00 API** to enable **XML generation** and **XML parsing** logic to be validated in a **fast** and **automated** way. The unit test suite can be run by just executing [`test_runner.py`](tests/test_runner.py). It is also recommended to do manual tests on a **z/OS system** for **new functionality** and **bug fixes** to test the real calls to **IRRSMO00**.
72
76
77
+
Since pyRACF uses Poetry as it's **build backend** and for **dependency management**, the pyRACF unit test suite should be executed as follows:
78
+
79
+
```shell
80
+
poetry run coverage run tests/test_runner.py
81
+
```
82
+
73
83
***Unit Tests:**
74
84
75
85
> :bulb:_See the Python [`unittest`](https://docs.python.org/3/library/unittest.html) and [`unittest.mock`](https://docs.python.org/3/library/unittest.mock.html) documentation for more details on writing test cases._
@@ -88,13 +98,22 @@ If you fix a bug, open a GitHub pull request against the `dev` branch with the f
88
98
89
99
If any updates need to be made to the pyRACF documentation, open a GitHub pull request against the `gh-pages-dev` branch with your changes. This may include updates to document new functionality or updates to correct errors or mistakes in the existing documentation.
90
100
101
+
### Branch Naming Conventions
102
+
103
+
Code branches should use the following naming conventions:
104
+
105
+
*`wip/name`*(Work in progress branch that likely won't be finished soon)*
106
+
*`feat/name`*(Branch where new functionality or enhancements are being developed)*
107
+
*`bug/name`*(Branch where one or more bugs are being fixed)*
108
+
*`junk/name`*(Throwaway branch created for experimentation)*
109
+
91
110
## Style Guidelines
92
111
93
112
:bulb:_These steps can be done automatically using the [pre-commit Hooks](#pre-commit-hooks)._
94
113
95
114
* When adding code to pyRACF, follow the PEP8 style guide for Python
96
-
* The use of Flake8, Black, and pydocstyle as helpers is recommended
97
-
*It is strongly recommended that you perform a pylint check on your code. We expect it to have a pylint score greater than 9
115
+
* The use of `pylint`, `flake8`, `black`, and `isort`is required.
116
+
*We expect all contributions to pass `flake8` and to have a `pylint` score of **10**.
98
117
99
118
## Contribution checklist
100
119
@@ -106,8 +125,8 @@ When contributing to pyRACF, think about the following:
106
125
* Add any available test cases to `/tests`.
107
126
* Verify `__init__.py` files are updated properly.
108
127
* Ensure that you have __pre-commit Hooks__ setup to ensure that **isort**, **black**, **flake8**, and **pylint** are run against the code for every commit you make.
109
-
* Run unit test suite by executing `python3 tests/test_runner.py`.
110
-
* Install pyRACF on a z/OS system and do a smoke test to make sure no regressions have been introduced with the C code that interfaces with IRRSOM00.
128
+
* Run unit test suite by executing `poetry run coverage run tests/test_runner.py`.
129
+
* Install pyRACF on a z/OS system and do a smoke test to make sure no regressions have been introduced with the C code that interfaces with IRRSOM00.[`function_test.py`](tests/function_test/function_test.py) can be used for this smoke test.
0 commit comments