Repository: Parsl/parsl

Issue:
Outreachy: getting familiar with the development environment
This issue is targeted at potential applications for Parsl's participation in Outreachy. The tasks in this issue can be performed by any number of applicants. Talk to @benclifford on Slack if you are interested.

The point of the tasks in this issue are to walk you through getting a development environment set up, making a trivial change to the code, seeing how our tooling tests things, deliberately introducing a problem, and then fixing that problem. By the end you should have a trivial 1-byte change to submit to parsl as a PR, to try out the PR process.

There are lots of steps because I have tried to make each step small.

If you get stuck or don't understand any of these steps - you can ask @benclifford on Slack or write publicly in the #parsl-hackers channel on  Slack.

1. Get a Python environment - parsl is supported on Python versions 3.8 - 3.12.
2. Sign up for a GitHub account
3. Go to the parsl repository at https://github.com/Parsl/parsl and near the top right, click "Forks / create a new fork". This will make a fork of parsl in your own github account.
5. Install parsl - follow the instructions in the "For developers" section of the Parsl README at https://github.com/Parsl/parsl - but when asked to run the command `git clone https://github.com/parsl/parsl`, instead use the address of your fork created in the previous step.
6. You can run some local tests by running `make local_thread_test`, and some more advanced tests with `make htex_local_alternate_test`
7. You can test our code linting by running `make flake8' which checks all of our Python code to see if it matches the Python style rules in [PEP-8](https://peps.python.org/pep-0008/)
8. We have configuration to let us break the style rules sometimes. This lives in the file called `.flake8`. You can open that file and make a change to move us towards proper PEP-8 compliance: find the line that says `max-line-length = 158` and make it 1 smaller. (PEP-8 says the max line length should be 80... but we can't change it all at once)
9. Run `make flake8` again - you should see that you can an error: flake8 should have found a line that is now too long.
10. Edit that line - you'll have to figure out how to make it shorter, perhaps by splitting it into two valid lines of Python
11. Run `make flake8` again and you should see that flake8 passes again
12. Now you can make a git commit: type `git commit -a -m "Reduce flake8 max-line-length`. Don't worry if you don't understand what git is doing: you can learn more about that during the internship.
13. Now push that commit up to github: type `git push`
14. Visit your repository on github in your web browser - you should see your commit there now.
15. Click "Pull request" to make a pull request to the main Parsl repository.
16. Fill out the template - you don't need to write too much
17. Sit back and wait for someone to review your pull request - that might happen within minutes, or it might take many hours, depending on who is working/awake/etc. Don't panic if you haven't heard after a few hours!
18. You might get some feedback and need to make some changes - the reviewer will help you with that
19. or... they might merge your change, in which case Congratulations! you've made a tiny contribution to Parsl, and our code base is now a tiny bit cleaner!


Discussion:
My application got approved in outreachy, I will take this and create a pr
@Harichandra-Prasath ok great! This specific issue #3105 isn't limited to one applicant: it's a basic exercise for everyone to get a development environment going, so other people reading this shoudn't be put off trying this out too.
I am very interested in this project, sir. May I know how to get started and do quality contributions. 
@Harichandra-Prasath work your way through this issue #3105 and get a pull request merged from a working dev environment, to get started - when that is all working, we can pick out some other issues that are good for you to work on.


Resolving patch:
diff --git a/parsl/dataflow/dflow.py b/parsl/dataflow/dflow.py
--- a/parsl/dataflow/dflow.py
+++ b/parsl/dataflow/dflow.py
@@ -730,7 +730,8 @@ def launch_task(self, task_record: TaskRecord) -> Future:
 
         return exec_fu
 
-    def _add_input_deps(self, executor: str, args: Sequence[Any], kwargs: Dict[str, Any], func: Callable) -> Tuple[Sequence[Any], Dict[str, Any], Callable]:
+    def _add_input_deps(self, executor: str, args: Sequence[Any], kwargs: Dict[str, Any], func: Callable) -> Tuple[Sequence[Any], Dict[str, Any],
+                                                                                                                   Callable]:
         """Look for inputs of the app that are files. Give the data manager
         the opportunity to replace a file with a data future for that file,
         for example wrapping the result of a staging action.
diff --git a/parsl/executors/high_throughput/process_worker_pool.py b/parsl/executors/high_throughput/process_worker_pool.py
--- a/parsl/executors/high_throughput/process_worker_pool.py
+++ b/parsl/executors/high_throughput/process_worker_pool.py
@@ -413,7 +413,9 @@ def worker_watchdog(self, kill_event: threading.Event):
                             raise WorkerLost(worker_id, platform.node())
                         except Exception:
                             logger.info("Putting exception for executor task {} in the pending result queue".format(task['task_id']))
-                            result_package = {'type': 'result', 'task_id': task['task_id'], 'exception': serialize(RemoteExceptionWrapper(*sys.exc_info()))}
+                            result_package = {'type': 'result',
+                                              'task_id': task['task_id'],
+                                              'exception': serialize(RemoteExceptionWrapper(*sys.exc_info()))}
                             pkl_package = pickle.dumps(result_package)
                             self.pending_result_queue.put(pkl_package)
                     except KeyError:


Test patch: