OtoroLin commited on
Commit
f53d9a5
·
1 Parent(s): 597bd24

Update the contributor_README.md

Browse files
Files changed (1) hide show
  1. contributor_README.md +27 -12
contributor_README.md CHANGED
@@ -41,14 +41,27 @@ This will decompress `HyperForensics-plus-plus/data/ADMM-ADAM/config0/config0.ta
41
  ```
42
  This will recursively decompress all `tar.gz` file in the `HyperForensics-plus-plus/data` and automatically put the decompressed files under hirarchy of the local dataset directory.
43
 
44
- ## 3. Create a pull request
45
  The pull requests on Hugging Face do not use forks and branches, but instead custom “branches” called `refs` that are stored directly on the source repo.
46
 
47
  The advantage of using custom `refs` (like `refs/pr/42` for instance) instead of branches is that they’re not fetched (by default) by people cloning the repo, but they can still be fetched on demand.
48
- ### .1 [Create a new PR on the hugging face](https://huggingface.co/docs/hub/repositories-pull-requests-discussions#pull-requests-advanced-usage)
 
49
 
 
 
50
 
51
- ## 3. Modify or Generate Data
 
 
 
 
 
 
 
 
 
 
52
  Make changes or generate new data in the extracted directory. Ensure the data follows the required structure:
53
  ```
54
  local_data/
@@ -65,7 +78,7 @@ local_data/
65
  HyperForensics-plus-plus/
66
  |-data/
67
  ```
68
- ## 4. Zip the Directory
69
  After modifying or generating data, zip the directory into `.tar.gz` files and place it in the repository.
70
  You can utilize the provided `zipping.sh` script. First, modify the `ROOT_DIR` variable to the `local_data` path
71
  ```bash
@@ -79,7 +92,7 @@ sudo apt install pigz
79
  # If you are using miniconda
80
  conda install pigz
81
  ```
82
- ### 4.1 Compressing the specify method and configuration:
83
  ```bash
84
  ./zipping.sh --method <method name> --config <config name>
85
  ```
@@ -89,7 +102,7 @@ For instance, if I want to zip the images under `ADMM-ADAM` forgery method, `con
89
  ./zipping.sh --method ADMM-ADAM --config 0
90
  ```
91
  This will compress `/path/to/local/ADMM-ADAM/config0/*` to `HyperForensics-plus-plus/data/ADMM-ADAM/config0/config0.tar.gz`.
92
- ### 4.2 Compressing the specify direcotry
93
  ```bash
94
  ./zipping.sh --dir-path <path/to/directory>
95
  ```
@@ -99,20 +112,22 @@ For instance,
99
  ./zipping.sh --dir-path /path/to/local/ADMM-ADAM/config0
100
  ```
101
  This will compress `/path/to/local/ADMM-ADAM/config0/*` to `HyperForensics-plus-plus/config0.tar.gz`.
102
- ### 4.3 Compress the entire hirarchy
103
  ```bash
104
  ./zipping.sh --all
105
  ```
106
  This will compress the entire local data hirarchy seperately and automatically put the compressed files under hirarchy of the dataset repo.
107
  > **Note** that I did not imiplement the method/config-specified compressing for **Origin** since it seems unlikely people needs to compress/decompress it regularly. You can either do it manually or use the path-specified compressing method and put it in to hirarchy by hand.
108
- ## 5. Create a Pull Request
109
- Push your changes to create a pull request. Hugging Face uses `git push` to implement pull requests:
 
110
  ```bash
111
- git push origin pr/<pr index>:refs/pr/<pr index>
112
  ```
113
- Replace `<pr index>` with the pull request index.
 
114
  ## 6. Wait for merging the Pull Request
115
- Once the pull request is created, the repository maintainer will review and merge it.
116
 
117
  ---
118
  Thank you for contributing to the HyperForensics++ dataset!
 
41
  ```
42
  This will recursively decompress all `tar.gz` file in the `HyperForensics-plus-plus/data` and automatically put the decompressed files under hirarchy of the local dataset directory.
43
 
44
+ ## 3. [Create a pull request](https://huggingface.co/docs/hub/repositories-pull-requests-discussions#pull-requests-advanced-usage)
45
  The pull requests on Hugging Face do not use forks and branches, but instead custom “branches” called `refs` that are stored directly on the source repo.
46
 
47
  The advantage of using custom `refs` (like `refs/pr/42` for instance) instead of branches is that they’re not fetched (by default) by people cloning the repo, but they can still be fetched on demand.
48
+ ### 3.1 Create a new PR on the hugging face
49
+ Go to *community* $\to$ *New pull request* $\to$ *On your machine* $\to$ enter *Pull request title* $\to$ *Creat PR branch*
50
 
51
+ Then, you shall see a brand new PR page with the title of your PR on the top left. Make note of the index number next to the title `#{index}`.
52
+ > In this step, you actually create a new custom branch on **remote** under reference of `ref/pr/#{index}`.
53
 
54
+ The PR is still in **draft mode**, the maintainer can not merge the PR untill you publish the PR.
55
+ ### 3.2 Create a new PR branch on local
56
+ ```bash
57
+ git fetch origin refs/pr/<index>
58
+ git checkout pr/<index>
59
+ ```
60
+ Fetch the remote PR branch `ref/pr/<index>` to local PR branch. Then checkout to the newly created custom branch under references `pr/`, and just for unambiguity, using the PR index as the name of that reference. You can actually create a new branch locally here as usual.
61
+ ### 3.3 Push the PR branch
62
+ After you finish your modification, push the local PR branch to remote Hugging Face. Check it out [here at 6](#6-create-a-pull-request).
63
+
64
+ ## 4. Modify or Generate Data
65
  Make changes or generate new data in the extracted directory. Ensure the data follows the required structure:
66
  ```
67
  local_data/
 
78
  HyperForensics-plus-plus/
79
  |-data/
80
  ```
81
+ ## 5. Zip the Directory
82
  After modifying or generating data, zip the directory into `.tar.gz` files and place it in the repository.
83
  You can utilize the provided `zipping.sh` script. First, modify the `ROOT_DIR` variable to the `local_data` path
84
  ```bash
 
92
  # If you are using miniconda
93
  conda install pigz
94
  ```
95
+ ### 5.1 Compressing the specify method and configuration:
96
  ```bash
97
  ./zipping.sh --method <method name> --config <config name>
98
  ```
 
102
  ./zipping.sh --method ADMM-ADAM --config 0
103
  ```
104
  This will compress `/path/to/local/ADMM-ADAM/config0/*` to `HyperForensics-plus-plus/data/ADMM-ADAM/config0/config0.tar.gz`.
105
+ ### 5.2 Compressing the specify direcotry
106
  ```bash
107
  ./zipping.sh --dir-path <path/to/directory>
108
  ```
 
112
  ./zipping.sh --dir-path /path/to/local/ADMM-ADAM/config0
113
  ```
114
  This will compress `/path/to/local/ADMM-ADAM/config0/*` to `HyperForensics-plus-plus/config0.tar.gz`.
115
+ ### 5.3 Compress the entire hirarchy
116
  ```bash
117
  ./zipping.sh --all
118
  ```
119
  This will compress the entire local data hirarchy seperately and automatically put the compressed files under hirarchy of the dataset repo.
120
  > **Note** that I did not imiplement the method/config-specified compressing for **Origin** since it seems unlikely people needs to compress/decompress it regularly. You can either do it manually or use the path-specified compressing method and put it in to hirarchy by hand.
121
+
122
+ ## 6. Create a Pull Request
123
+ Push your changes to created PR:
124
  ```bash
125
+ git push origin pr/<index>:refs/pr/<index>
126
  ```
127
+ Replace `<index>` with the pull request index. And click the ***Publish*** button on the buttom of the page.
128
+ > You can aso leave comment for your PR to showcase where you have modified.
129
  ## 6. Wait for merging the Pull Request
130
+ Once the pull request is published, the repository maintainer will review and merge it.
131
 
132
  ---
133
  Thank you for contributing to the HyperForensics++ dataset!