Skip to content

Conversation

@aob93
Copy link

@aob93 aob93 commented Feb 28, 2020

No description provided.

@leej3
Copy link

leej3 commented Mar 19, 2020

have a think about how to handle two people on the same project. There are details to using git in conjunction with another that can be tricky. It's a useful skill and well worth learning but will slow you down lots. Duplicating efforts across two repositories is not especially desirable either though. If you do choose to both use the same repo I can walk you through how to handle merge conflicts etc.

@leej3
Copy link

leej3 commented Mar 19, 2020

@hsowards

@leej3
Copy link

leej3 commented May 6, 2020

Do you have code written? If so, please push it to GitHub so that we can help out.

@aob93
Copy link
Author

aob93 commented May 6, 2020 via email

@leej3
Copy link

leej3 commented May 6, 2020 via email

@aob93
Copy link
Author

aob93 commented May 6, 2020 via email

@emilyyaklich
Copy link

Hi Aidan,

I just created a pull request of possible updates to your project repository. I have created a setup.py file (in order to package your code) which you should look at and fill out the necessary information. Additionally I changed your "code" directory to "project_code" and your "annotation.plot.py" file to "annotation_plot.py".

I have also added an example test file (tests.py) to your tests directory to help start you start writing tests for you code. The example test just confirms that the "header" that you read in is a list. If you type in

pytest tests.py

in your terminal you should be able to see that the test passes.

These are just suggestions to help you start testing your code as well as package it.

Let me know if you have any questions!

@aob93
Copy link
Author

aob93 commented May 7, 2020 via email

@emilyyaklich
Copy link

HI Aidan,

One more suggestion, I think it may be easier to write unit tests for you code if divide your code up into multiple functions, instead of the one main function.

Also, now that I think about it, it may be best to create a ''test_data" folder within your test directory (I basically just copied your data files over but it would be clearer to see a test directory with all of the data files) in order to organize your code. You can then read in the data from the directory as is currently done in the test. Also, I think a better test statement for the example test that I wrote is:

assert header[0] == 'Chr'

because this would actually test that you are reading in what you think you are reading in from the datafile.

@aob93
Copy link
Author

aob93 commented May 7, 2020 via email

@emilyyaklich
Copy link

Yes, basically, you want to test that your code is doing what you think it is doing with the tests.

@emilyyaklich
Copy link

I have a few more comments that may be useful:

I think you also need to remove the 'sample_tests.py' from your test directory as there is a failing test in this script so it is causing issues.

Additionally, filling out your package details in the 'setup.py' script (name, email, package name, etc.) will also be useful for you.

@aob93
Copy link
Author

aob93 commented May 8, 2020 via email

@emilyyaklich
Copy link

emilyyaklich commented May 9, 2020

Hi Aidan,

Well done on the project. You show a good understanding of Python and the use of NumPy and Pandas is nice as well as the creation of a plot using matplotlib. In the future, I would suggest modularizing your code into multiple functions which will then make it easier to debug as you think about writing tests. Also, I suggest adding files like .ipynb_checkpoints to your .gitignore file. Overall, the project is great, good work!

Cheers,

Emily

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.

3 participants