Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Step 1, 2, 3 done" #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

"Step 1, 2, 3 done" #1

wants to merge 10 commits into from

Conversation

hudi-hub
Copy link

  1. Both functions in the object_analysis module have a problem.
  • abundant function problem:
    for o in objects:
    if o['type'] == 'frb':
    sum_supernovae += 1
  • farthest function problem:
    o["redshift"] < highest_redshift
  1. Write a test for each function that demonstrates the problem.
  2. Fix the function and ensure the test passes.
  • correct function aboundant:
    for o in objects:
    if o['type'] == 'frb':
    sum_frbs += 1 # replace sum_supernovae by sum_frbs

  • correct farthest function:
    o["redshift"] > highest_redshift # replace < by >

@hudi-hub
Copy link
Author

Done steps 1, 2, 3

hudi-hub and others added 2 commits July 23, 2022 13:51
- Reduce the for loops, logical conditions, using modules and build-in functions.
@hudi-hub
Copy link
Author

"Performance improvement
"

@hudi-hub
Copy link
Author

update readme.md

@hudi-hub
Copy link
Author

Description added

@hudi-hub
Copy link
Author

Improve readability

@hudi-hub
Copy link
Author

auto test after each push

@hudi-hub
Copy link
Author

done final check, emailed back up code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant