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/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
@@ -371,7 +371,8 @@ def push_results(self, kill_event):
                 logger.exception("Got an exception: {}".format(e))
 
             if time.time() > last_result_beat + self.heartbeat_period:
-                logger.info(f"Sending heartbeat via results connection: last_result_beat={last_result_beat} heartbeat_period={self.heartbeat_period} seconds")
+                heartbeat_message = f"last_result_beat={last_result_beat} heartbeat_period={self.heartbeat_period} seconds"
+                logger.info(f"Sending heartbeat via results connection: {heartbeat_message}")
                 last_result_beat = time.time()
                 items.append(pickle.dumps({'type': 'heartbeat'}))
 
diff --git a/parsl/executors/workqueue/executor.py b/parsl/executors/workqueue/executor.py
--- a/parsl/executors/workqueue/executor.py
+++ b/parsl/executors/workqueue/executor.py
@@ -61,8 +61,11 @@
 
 
 # Support structure to communicate parsl tasks to the work queue submit thread.
-ParslTaskToWq = namedtuple('ParslTaskToWq',
-                           'id category cores memory disk gpus priority running_time_min env_pkg map_file function_file result_file input_files output_files')
+ParslTaskToWq = namedtuple(
+                        'ParslTaskToWq',
+                        'id '
+                        'category '
+                        'cores memory disk gpus priority running_time_min env_pkg map_file function_file result_file input_files output_files')
 
 # Support structure to communicate final status of work queue tasks to parsl
 # if result_received is True:


Test patch: