You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lastly, we'll add the fork as the preferred repo to push to
33
33
34
34
# From the root directory of your locally cloned repo
35
35
git config --global push.default fork
36
36
37
-
This will give you an easy develoment cycle for updating your copy:
37
+
This will give you an easy development cycle for updating your copy:
38
38
39
39
git co main # co is a common shortcut for `checkout`
40
40
git pull # Get all the new commits from the upstream
41
41
42
42
If you are a git expert, you likely know of other ways to set this up, to your preference!
43
43
44
44
## Branch locally and develop!
45
-
First, make a branch in your cloned fork.
45
+
First, make a branch in your cloned fork.
46
46
47
47
git co -b <MY_COOL_FEATURE_BRANCH_NAME>
48
48
49
49
We suggest naming the branch by feature name
50
50
or “issue_XX” where XX is the issue number the branch is associated with. Make
51
-
your changes in your branch and test thoroughly.
51
+
your changes in your branch and test thoroughly.
52
52
53
53
git commit -am "[hma] Made cool changes to hasher-matcher-actioner"
54
54
git push # Pushes to your fork if you followed the setup!
55
55
56
-
If this is a large feature you can push your branch to your fork often to save your work.
56
+
If this is a large feature you can push your branch to your fork often to save your work.
57
57
When making commits to your branch, make sure you write [well-formed][wf] commit
58
58
messages and update documentation accordingly (see the next section).
59
59
@@ -65,10 +65,10 @@ If your change will add a new API, new functionality, or refactor a large sectio
65
65
it's best to socialize your intent first and get some feedback. Maintainers can let you know
66
66
if there are some concerns about the change (e.g. some projects deliberately minimize the number
67
67
of dependencies - if you are planning on pulling Node.js into a project, it's unlikely to be
68
-
accepted!
68
+
accepted!
69
69
70
70
This is also a place where maintainers can give you pointers on what they'll be looking for in
71
-
testing.
71
+
testing.
72
72
73
73
Don't let this step dissuade you, we want to work with you to help you figure out the best
74
74
solution. If we ultimately don't believe we can support it in the main repo, you are welcome
@@ -104,7 +104,7 @@ in the directory you are working with, or in smaller projects, a top-level `test
104
104
folder that contains all the tests.
105
105
106
106
For changes that aren't easy to unittest, we still want to know you are sure your
107
-
change does the right thing. Make sure to include the testing steps you used.
107
+
change does the right thing. Make sure to include the testing steps you used.
108
108
If you add more testing steps (e.g. as a result of review feedback)
109
109
110
110
### Submit a PR
@@ -122,21 +122,21 @@ Make sure to include a summary of changes (especially the "why" or problem you a
122
122
Make sure to link the issue if it's for an issue!
123
123
124
124
#### Draft Reviews and RFC
125
-
If you are not sure about a potential change, and want to get feedback on a review, you can still submit a PR as a draft PR, or clearly label the PR with "[RFC]" (request for comment).
125
+
If you are not sure about a potential change, and want to get feedback on a review, you can still submit a PR as a draft PR, or clearly label the PR with "[RFC]" (request for comment).
126
126
Reviewers will know not to merge your changes but may still send you an Accept if they would merge it without changes (or use "Request Changes" to indicate the same thing, just that they want you to convert from draft).
127
127
128
128
### Continuous Integration
129
-
If you are a new contributor, the continuous integration (CI) won't run until it's triggered by a maintainer of the repo.
129
+
If you are a new contributor, the continuous integration (CI) won't run until it's triggered by a maintainer of the repo.
130
130
If there is CI failure, we usually won't merge the change!
131
131
132
132
### Review
133
133
Once you’ve submitted a PR you're waiting on us for review. We aim to check the repo every business day, but sometimes we are slow, especially if there aren't new changes.
134
-
We aim to try and get you a full review every business day (e.g. resulting in either "request changes" or merge), but we can't always do this.
134
+
We aim to try and get you a full review every business day (e.g. resulting in either "request changes" or merge), but we can't always do this.
135
135
We don't expect it takes longer than 5 business days to get a first review.
136
136
137
137
To make changes on your code for review, checkout your branch again
138
138
139
-
git checkout <MY_COOL_FEATURE_BRANCH_NAME>
139
+
git checkout <MY_COOL_FEATURE_BRANCH_NAME>
140
140
141
141
Make your changes as new commits (don't amend your previous commits as they break history and make it harder to review)
142
142
@@ -145,7 +145,7 @@ Make your changes as new commits (don't amend your previous commits as they brea
145
145
Then push your changes to your fork again - they'll automatically update your PR!
146
146
147
147
git push # assumes you set up the default push target to your fork
148
-
148
+
149
149
Here are some things to expect from review:
150
150
1. If your summary isn't detailed and we aren't sure what the change is aiming to do, we might request changes without reviewing much of the code.
151
151
2. If you don't have a test plan or your change is missing updates for unittesting, we will likely request changes.
@@ -156,7 +156,7 @@ Here are some things to expect from review:
156
156
4.`alt/code golf:` The reviewer is providing an alternative implementation that might be shorter or have a stylistic difference. Implicitly `ignorable:`
157
157
158
158
#### Resolving Conversations
159
-
Standard practice is to let the commentor who created a comment thread, or another reviewer "resolve conversations" after you’ve responded to or addressed the issue. Reviewers may un-resolve conversations they think still need discussion.
159
+
Standard practice is to let the commentor who created a comment thread, or another reviewer "resolve conversations" after you’ve responded to or addressed the issue. Reviewers may un-resolve conversations they think still need discussion.
160
160
161
161
#### Clearing Reviews After Response
162
162
Sometimes Github will still show "Changes Requested" even if you have responded to all changes (or interactions with conversation resolution). Please [dismiss reviews with changes requested](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review) that are stuck in "Requested Changes" once you think you have addressed everything.
@@ -165,9 +165,9 @@ Sometimes Github will still show "Changes Requested" even if you have responded
165
165
### Merging
166
166
Once your code is accepted, we usually merge it right away! If you don't want us to do this, please note it in the summary. You can always do followups as another PR!
167
167
168
-
### PR Sizes & Landing-and-iterating
168
+
### PR Sizes & Landing-and-iterating
169
169
We generally prefer smaller changes (<100-500 lines of functional py code, not including unittests), and so if you have a larger feature, consider opening an issue to explain your full plans, and then doing a series of PRs all linking to that issue.
170
-
We understand that everyone contributing is essentially volunteering time, and so want to make the best use of your time as well. If you have run out of time to donate, and have already done a few passes of review, please let us know as a comment.
171
-
A maintainer might be willing to finish your PR, or merge it as is, and make an issue to clean it up after.
170
+
We understand that everyone contributing is essentially volunteering time, and so want to make the best use of your time as well. If you have run out of time to donate, and have already done a few passes of review, please let us know as a comment.
171
+
A maintainer might be willing to finish your PR, or merge it as is, and make an issue to clean it up after.
172
172
If you have contributed multiple PRs, we'll generally give you more slack in this department, since we have seen you come back!
HMA is a ready-to-deploy content moderation project for AWS, containing many submodules. It allows you to maintain lists of known content to scan for, which you can either curate yourself or connect to other hash exchange programs to share and recieve lists. More can be found [at the wiki](https://github.com/facebook/ThreatExchange/wiki).
19
+
HMA is a ready-to-deploy content moderation project for AWS, containing many submodules. It allows you to maintain lists of known content to scan for, which you can either curate yourself or connect to other hash exchange programs to share and receive lists. More can be found [at the wiki](https://github.com/facebook/ThreatExchange/wiki).
20
20
21
21
A second version of this project, called "[Open Media Match](https://github.com/facebook/ThreatExchange/tree/main/open-media-match)" is under construction, which uses a cloud-agnostic docker-based deployment.
Copy file name to clipboardExpand all lines: hasher-matcher-actioner/CONTRIBUTING.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Although you can remove the need for this by setting the "black" extension as yo
118
118
cd /workspace
119
119
mypy src/OpenMediaMatch
120
120
```
121
-
If you don't run it in this directory, mypyp won't be able to find its settings folder and you'll get different results than the CI.
121
+
If you don't run it in this directory, mypy won't be able to find its settings folder and you'll get different results than the CI.
122
122
123
123
## Save Keystrokes on Common commands
124
124
Add these to your ~/.bashrc file and then reload with `. ~/.bashrc`
@@ -129,7 +129,7 @@ alias t='(cd /workspace/src/OpenMediaMatch && py.test)'
129
129
alias myt='my && t'
130
130
```
131
131
132
-
## Recover from mysterious errors during sever startup?
132
+
## Recover from mysterious errors during server startup?
133
133
If you had a syntax error in your code when you opened vscode, the automatic flask run that is created for you may fail. You can easily manually run it!
134
134
135
135
Create a new terminal window, and then run:
@@ -143,9 +143,9 @@ This is the same command that automatic window runs. Keep fixing errors until it
143
143
### It's worse than that!
144
144
When you create your devcontainer, data inside is persisted. However, if dependencies to the devcontainer are changed, or a bad database migration appears, you may end up in a strange state that cannot be recovered from. To reset fresh, you will want to rebuild your devcontainer, which you can do from within vscode.
145
145
146
-
From the menu, go to "View" > "Command Pallet", and in the window that appears, complete to "Devcontainers: Rebuild container".
146
+
From the menu, go to "View" > "Command Palette", and in the window that appears, complete to "Devcontainers: Rebuild container".
147
147
148
-
This will shutdown your container and rebuild it from scratch.
148
+
This will shutdown your container and rebuild it from scratch.
149
149
150
150
## Reset my database?
151
151
If your database has gotten into a funky state, run
Copy file name to clipboardExpand all lines: hasher-matcher-actioner/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ The name "hasher, matcher, actioner" refers to the technical process by which ne
18
18
19
19
## Configurability
20
20
21
-
There is no one-size-fits all solution to make platforms safe, and even in the narrow scope of hashing and matching technology, there are many possible solutions. HMA is designed to be highly configurable, such that new algorithms, hash exchanges, or other capabilities could be integrated later. If you want to use a custom or proprietary hashing algorithm with HMA, you simple need to follow the interfaces defined in [python-threatexchange ](../python-threatexchange) to add new capabilities.
21
+
There is no one-size-fits all solution to make platforms safe, and even in the narrow scope of hashing and matching technology, there are many possible solutions. HMA is designed to be highly configurable, such that new algorithms, hash exchanges, or other capabilities could be integrated later. If you want to use a custom or proprietary hashing algorithm with HMA, you simple need to follow the interfaces defined in [python-threatexchange ](../python-threatexchange) to add new capabilities. A full list of known available algorithms and compatible exchanges can be found at [the python-threatexchange/extensions README](https://github.com/facebook/ThreatExchange/tree/main/python-threatexchange/threatexchange/extensions/README.md).
22
22
23
23
You can find an example on expanding the base image to include the Clip tx extension [here](https://github.com/juanmrad/HMA-CLIP-demo)
0 commit comments