osdc-2023-assignment7
Tags: git, osdc
Published: 2023-03-06 21:16:03

---
series: osdc
---

__Contributing to open projects__

__assignment 7__

1. Contribute to pydigger:
I decided to contribute an author name for 
[pydigger](https://pydigger.com/)

I found this [repo](https://github.com/danijar/dreamerv3), without an author name.

This is what I wrote in my pull request:
"Hi. I am taking an open source project course https://github.com/OSDC-Code-Maven/osdc-2023-01-public 
and try to contribute to projects without an author name. to be added here: https://pydigger.com/."

my [pull request](https://github.com/danijar/dreamerv3/pull/21)

Waiting for a reply!

update: My pull request was excepted and merged! (-:

2. __Running R tests locally__

This is my next task...
I work with a package in R called [CrispRVariants](
https://github.com/markrobinsonuzh/CrispRVariants).

I cloned it to my server and activated an R conda environment I have there.
Now I could do:
```
Rscript testthat.R

```
I received the following message:

Loading required package: CrispRVariants
Loading required package: ggplot2

[ FAIL 0 | WARN 2 | SKIP 0 | PASS 20 ]

[ FAIL 0 | WARN 2 | SKIP 0 | PASS 20 ]

seems that something worked.
Also I found that there is a package to test coverage similar to python in (here)[https://github.com/IainMcl/R-Unit-Testing]

```
install.packages(covr)
library(covr)
report()
```
I need to test this.
_________________________

Lesson notes:

__Example on how to write an issue__
Problem in dev.to:
in dev.to if you do save changes your are out of the editor. how can this be fixed? maybe add an automated saving, or save and keep on editing.
If we go down on GitHub page there is a link to Forem. Going to forem and link to github. one repo is forem. 
Forem/forem issues - search for autosave 
shuly suggested an issue to add autosave here but got no reply.

__another example: zarr-python__
First search the issues - maybe someone else had a similar problem?

__codecove__ - which lines were running during the test
this can show absence of tests
this can show us if a code was not tested after a change.
but if a test was not written, a piece of code will not be tested. high coverage doesn't mean good code but low coverage will show that not all the code is being tested.

__You can try to promote a pull request__

__What if it doesn't work and you don't want to wait?__
you can fix the issue locally and put in pypl with shaw - not recommended. 
or you can make a fork and accept the pull request. 

__how?__
dr  - a basic docker file with alias in basrc for Gabor called dr.
Gabor has it in GitHub.

```
git clone ...
git fetch origin (default name) pull/1357/head
git checkout -b b1357 FETCH_HEAD
git lg
git show HEAD
git checkout main
git checkout -b szabgab
git merge 1357
gitk --all
```
now you can use this repo.
better that he would do rebase...

Now we can add another PR:
```
git checkout -b b1299 FETCH_HEAD
```
but this time there is a conflict.

__a conflict__
If you make a change in a different line - no problem to merge branch and main. changes to the same line- merge has a conflict. The change is in the text itself, not the raw number.
Now you can manually edit the new file and add it after that.

You can cancel the commit like this:
```
git merge --abort
```
_______________________________________

__how to find projects in R?__

explore/topics 'r'
add languages : R
recently updated better than more stars.

wcgenesummary
add contribution, find tests that can be run locally. this is the best practice for running the test.

ggplots - open issue how to run a test?
testhat? maybe this is very simple to run.

to do
how to run  a test, open a pull request. how to make test coverage? send a pull requst. what test is missing, write it.
good way - run the test case and compare to the output. make this as a test.