Skip to content

Commit 7dbe280

Browse files
authored
Release infrastructure (#81)
* style(imports): fix import formatting Fix import formatting via script. Also add script for import fixes and release log * docs(CHANGELOG): add changelog, contributing Add the changelog and a contributing guidelines doc
1 parent 9ff2ade commit 7dbe280

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+631
-163
lines changed

CHANGELOG.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# go-graphsync changelog
2+
3+
# go-graphysnc 0.0.1-filecoin
4+
5+
Initial tagged release for early version of filecoin
6+
7+
### Changelog
8+
9+
Initial feature set including parallel requests, selectors, basic architecture,
10+
etc. -- changelog not tracked due to lack of go.mod
11+
12+
# go-graphsync 0.0.2
13+
14+
Bug fix release. Fix message sizes to not overflow limits.
15+
16+
### Changelog
17+
18+
- github.com/ipfs/go-graphsync:
19+
- Limit Response Size ([ipfs/go-graphsync#37](https://github.com/ipfs/go-graphsync/pull/37))
20+
21+
### Contributors
22+
23+
| Contributor | Commits | Lines ± | Files Changed |
24+
|-------------|---------|---------|---------------|
25+
| hannahhoward | 2 | +295/-52 | 5 |
26+
27+
# go-graphsync 0.0.3
28+
29+
Bug fix release. Fix issues issues with message queue.
30+
31+
### Changelog
32+
33+
- github.com/ipfs/go-graphsync:
34+
- fix(messagequeue): no retry after queue shutdown ([ipfs/go-graphsync#38](https://github.com/ipfs/go-graphsync/pull/38))
35+
36+
### Contributors
37+
38+
| Contributor | Commits | Lines ± | Files Changed |
39+
|-------------|---------|---------|---------------|
40+
| hannahhoward | 1 | +70/-1 | 2 |
41+
42+
# go-graphsync 0.0.4
43+
44+
Initial release to incorporate into go-data-transfer module.
45+
46+
Implements request authorization, request hooks, default valdiation policy, etc
47+
48+
### Changelog
49+
50+
- github.com/ipfs/go-graphsync:
51+
- Add DAG Protobuf Support ([ipfs/go-graphsync#51](https://github.com/ipfs/go-graphsync/pull/51))
52+
- Add response hooks ([ipfs/go-graphsync#50](https://github.com/ipfs/go-graphsync/pull/50))
53+
- Request hooks ([ipfs/go-graphsync#49](https://github.com/ipfs/go-graphsync/pull/49))
54+
- Add a default validation policy ([ipfs/go-graphsync#48](https://github.com/ipfs/go-graphsync/pull/48))
55+
- Send user extensions in request ([ipfs/go-graphsync#47](https://github.com/ipfs/go-graphsync/pull/47))
56+
- Revert "Merge pull request #44 from ipfs/chore/update-peertaskqueue"
57+
- Update peertaskqueue ([ipfs/go-graphsync#44](https://github.com/ipfs/go-graphsync/pull/44))
58+
- Refactor file organization ([ipfs/go-graphsync#43](https://github.com/ipfs/go-graphsync/pull/43))
59+
- feat(graphsync): support extension protocol ([ipfs/go-graphsync#42](https://github.com/ipfs/go-graphsync/pull/42))
60+
- Bump go-ipld-prime to 092ea9a7696d ([ipfs/go-graphsync#41](https://github.com/ipfs/go-graphsync/pull/41))
61+
- Fix some typo ([ipfs/go-graphsync#40](https://github.com/ipfs/go-graphsync/pull/40))
62+
63+
### Contributors
64+
65+
| Contributor | Commits | Lines ± | Files Changed |
66+
|-------------|---------|---------|---------------|
67+
| hannahhoward | 12 | +3040/-1516 | 103 |
68+
| Hannah Howard | 2 | +253/-321 | 3 |
69+
| Dirk McCormick | 1 | +47/-33 | 4 |
70+
| Edgar Lee | 1 | +36/-20 | 8 |
71+
| Alexey | 1 | +15/-15 | 1 |
72+
73+
# go-graphsync v0.0.5
74+
75+
Minor release -- update task queue and add some documentation
76+
77+
### Changelog
78+
79+
- github.com/ipfs/go-graphsync:
80+
- feat: update the peer task queue ([ipfs/go-graphsync#54](https://github.com/ipfs/go-graphsync/pull/54))
81+
- docs(readme): document the storeutil package in the readme ([ipfs/go-graphsync#52](https://github.com/ipfs/go-graphsync/pull/52))
82+
83+
### Contributors
84+
85+
| Contributor | Commits | Lines ± | Files Changed |
86+
|-------------|---------|---------|---------------|
87+
| Steven Allen | 2 | +68/-49 | 5 |
88+
89+
### 🙌🏽 Want to contribute?
90+
91+
Would you like to contribute to this repo and don’t know how? Here are a few places you can get started:
92+
93+
- Check out the [Contributing Guidelines](https://github.com/ipfs/go-graphsync/blob/master/CONTRIBUTING.md)
94+
- Look for issues with the `good-first-issue` label in [go-graphsync](https://github.com/ipfs/go-graphsync/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22e-good-first-issue%22+)

CONTRIBUTING.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Contributing to this repo
2+
3+
First, thank you for your interest in contributing to this project! Before you pick up your first issue and start
4+
changing code, please:
5+
6+
1. Review all documentation for the module you're interested in.
7+
1. Look through the [issues for this repo](https://github.com/ipfs/go-graphsync/issues) for relevant discussions.
8+
1. If you have questions about an issue, post a comment in the issue.
9+
1. If you want to submit changes that aren't covered by an issue, file a new one with your proposal, outlining what problem you found/feature you want to implement, and how you intend to implement a solution.
10+
11+
For best results, before submitting a PR, make sure:
12+
1. It has met all acceptance criteria for the issue.
13+
1. It addresses only the one issue and does not make other, irrelevant changes.
14+
1. Your code conforms to our coding style guide.
15+
1. You have adequate test coverage (this should be indicated by CI results anyway).
16+
1. If you like, check out [current PRs](https://github.com/ipfs/go-graphsync/pulls) to see how others do it.
17+
18+
Special Note:
19+
If editing README.md, please conform to the [standard readme specification](https://github.com/RichardLitt/standard-readme/blob/master/spec.md).
20+
21+
### PR Process
22+
23+
Active development of `go-graphsync` occurs on the `master` branch. All PRs should be made to the `master` branch, which is the default branch on Github.
24+
25+
Before a PR can be merged to `master`, it must:
26+
1. Pass continuous integration.
27+
1. Be rebased and up to date with the `master` branch
28+
1. Be approved by at least one maintainer
29+
30+
When merging normal PRs to `master`, always use squash and merge to maintain a linear commit history.
31+
32+
### Release Process
33+
34+
When creating a new full release, branch off master with a branch named release/*version-number*, where *version-number* is the ultimate tag you intend to create.
35+
36+
Continue to develop on master and merge commits to your release branch as neccesary till the release is ready.
37+
38+
When the release is ready, tag it, then merge the branch back into master so that it is part of the version history of master. Delete the release branch.
39+
40+
### Hotfix Process
41+
42+
Hot-fixes operate just like release branches, except they are branched off an existing tag and should be named hotfix/*version-number*. When ready, they receive their own tag and then are merged back to master, then deleted.
43+
44+
For external reference, his git flow and release process is essentially the [OneFlow git workflow](https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow)
45+
46+
Following the release of Filecoin Mainnet, this library will following a semantic versioning scheme for tagged releases.
47+
48+
### Testing
49+
50+
- All new code should be accompanied by unit tests. Prefer focused unit tests to integration tests for thorough validation of behaviour. Existing code is not necessarily a good model, here.
51+
52+
### Conventions and Style
53+
54+
#### Imports
55+
We use the following import ordering.
56+
```
57+
import (
58+
[stdlib packages, alpha-sorted]
59+
<single, empty line>
60+
[external packages]
61+
<single, empty line>
62+
[go-graphsync packages]
63+
)
64+
```
65+
66+
Where a package name does not match its directory name, an explicit alias is expected (`goimports` will add this for you).
67+
68+
Example:
69+
70+
```go
71+
import (
72+
"context"
73+
"testing"
74+
75+
cmds "github.com/ipfs/go-ipfs-cmds"
76+
cid "github.com/ipfs/go-cid"
77+
ipld "github.com/ipfs/go-ipld-format"
78+
"github.com/stretchr/testify/assert"
79+
80+
datatransfer "github.com/filecoin-project/go-data-transfer"
81+
82+
"github.com/filecoin-project/go-fil-markets/filestore/file"
83+
)
84+
```
85+
86+
You can run `script/fiximports` to put all your code in the desired format
87+
88+
#### Comments
89+
90+
Comments are a communication to other developers (including your future self) to help them understand and maintain code. Good comments describe the _intent_ of the code, without repeating the procedures directly.
91+
92+
- A `TODO:` comment describes a change that is desired but could not be immediately implemented. It must include a reference to a GitHub issue outlining whatever prevents the thing being done now (which could just be a matter of priority).
93+
- A `NOTE:` comment indicates an aside, some background info, or ideas for future improvement, rather than the intent of the current code. It's often fine to document such ideas alongside the code rather than an issue (at the loss of a space for discussion).
94+
- `FIXME`, `HACK`, `XXX` and similar tags indicating that some code is to be avoided in favour of `TODO`, `NOTE` or some straight prose.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ PRs are welcome!
225225

226226
Before doing anything heavy, checkout the [Graphsync Architecture](docs/architecture.md)
227227

228-
Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
228+
See our [Contributing Guidelines](https://github.com/ipfs/go-graphsync/blob/master/CONTRIBUTING.md) for more info.
229229

230230
## License
231231

cidset/cidset.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import (
44
"errors"
55

66
"github.com/ipfs/go-cid"
7-
"github.com/ipfs/go-graphsync/ipldutil"
87
"github.com/ipld/go-ipld-prime/fluent"
98
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
109
basicnode "github.com/ipld/go-ipld-prime/node/basic"
10+
11+
"github.com/ipfs/go-graphsync/ipldutil"
1112
)
1213

1314
// EncodeCidSet encodes a cid set into bytes for the do-no-send-cids extension

cidset/cidset_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"testing"
55

66
"github.com/ipfs/go-cid"
7-
"github.com/ipfs/go-graphsync/testutil"
87
"github.com/stretchr/testify/require"
8+
9+
"github.com/ipfs/go-graphsync/testutil"
910
)
1011

1112
func TestDecodeEncodeCidSet(t *testing.T) {

impl/graphsync.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ package graphsync
33
import (
44
"context"
55

6+
logging "github.com/ipfs/go-log"
7+
"github.com/ipfs/go-peertaskqueue"
8+
ipld "github.com/ipld/go-ipld-prime"
9+
"github.com/libp2p/go-libp2p-core/peer"
10+
611
"github.com/ipfs/go-graphsync"
712
gsmsg "github.com/ipfs/go-graphsync/message"
813
"github.com/ipfs/go-graphsync/messagequeue"
@@ -16,10 +21,6 @@ import (
1621
"github.com/ipfs/go-graphsync/responsemanager/peerresponsemanager"
1722
"github.com/ipfs/go-graphsync/responsemanager/persistenceoptions"
1823
"github.com/ipfs/go-graphsync/selectorvalidator"
19-
logging "github.com/ipfs/go-log"
20-
"github.com/ipfs/go-peertaskqueue"
21-
ipld "github.com/ipld/go-ipld-prime"
22-
"github.com/libp2p/go-libp2p-core/peer"
2324
)
2425

2526
var log = logging.Logger("graphsync")

impl/graphsync_test.go

+10-13
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ import (
1414
"testing"
1515
"time"
1616

17-
basicnode "github.com/ipld/go-ipld-prime/node/basic"
18-
"github.com/stretchr/testify/require"
19-
20-
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
21-
2217
blocks "github.com/ipfs/go-block-format"
2318
"github.com/ipfs/go-blockservice"
2419
"github.com/ipfs/go-cid"
@@ -33,21 +28,23 @@ import (
3328
unixfile "github.com/ipfs/go-unixfs/file"
3429
"github.com/ipfs/go-unixfs/importer/balanced"
3530
ihelper "github.com/ipfs/go-unixfs/importer/helpers"
36-
37-
"github.com/ipfs/go-graphsync"
38-
39-
"github.com/ipfs/go-graphsync/cidset"
40-
"github.com/ipfs/go-graphsync/ipldutil"
41-
gsmsg "github.com/ipfs/go-graphsync/message"
42-
gsnet "github.com/ipfs/go-graphsync/network"
43-
"github.com/ipfs/go-graphsync/testutil"
4431
ipld "github.com/ipld/go-ipld-prime"
32+
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
33+
basicnode "github.com/ipld/go-ipld-prime/node/basic"
4534
"github.com/ipld/go-ipld-prime/traversal/selector"
4635
ipldselector "github.com/ipld/go-ipld-prime/traversal/selector"
4736
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
4837
"github.com/libp2p/go-libp2p-core/host"
4938
"github.com/libp2p/go-libp2p-core/peer"
5039
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
40+
"github.com/stretchr/testify/require"
41+
42+
"github.com/ipfs/go-graphsync"
43+
"github.com/ipfs/go-graphsync/cidset"
44+
"github.com/ipfs/go-graphsync/ipldutil"
45+
gsmsg "github.com/ipfs/go-graphsync/message"
46+
gsnet "github.com/ipfs/go-graphsync/network"
47+
"github.com/ipfs/go-graphsync/testutil"
5148
)
5249

5350
func TestMakeRequestToNetwork(t *testing.T) {

ipldutil/traverser_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ import (
66
"testing"
77

88
blocks "github.com/ipfs/go-block-format"
9-
"github.com/ipfs/go-graphsync"
10-
"github.com/ipfs/go-graphsync/testutil"
119
ipld "github.com/ipld/go-ipld-prime"
1210
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
1311
basicnode "github.com/ipld/go-ipld-prime/node/basic"
1412
"github.com/ipld/go-ipld-prime/traversal"
1513
"github.com/ipld/go-ipld-prime/traversal/selector"
1614
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
1715
"github.com/stretchr/testify/require"
16+
17+
"github.com/ipfs/go-graphsync"
18+
"github.com/ipfs/go-graphsync/testutil"
1819
)
1920

2021
func TestTraverser(t *testing.T) {

linktracker/linktracker.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package linktracker
22

33
import (
4-
"github.com/ipfs/go-graphsync"
54
"github.com/ipld/go-ipld-prime"
5+
6+
"github.com/ipfs/go-graphsync"
67
)
78

89
// LinkTracker records links being traversed to determine useful information

linktracker/linktracker_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import (
44
"math/rand"
55
"testing"
66

7-
"github.com/ipfs/go-graphsync"
8-
"github.com/ipfs/go-graphsync/testutil"
97
"github.com/ipld/go-ipld-prime"
108
"github.com/stretchr/testify/require"
9+
10+
"github.com/ipfs/go-graphsync"
11+
"github.com/ipfs/go-graphsync/testutil"
1112
)
1213

1314
type request struct {

message/message.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import (
44
"fmt"
55
"io"
66

7+
ggio "github.com/gogo/protobuf/io"
78
blocks "github.com/ipfs/go-block-format"
8-
"github.com/ipfs/go-graphsync"
9+
cid "github.com/ipfs/go-cid"
910
"github.com/ipld/go-ipld-prime"
11+
"github.com/libp2p/go-libp2p-core/network"
1012

11-
ggio "github.com/gogo/protobuf/io"
12-
cid "github.com/ipfs/go-cid"
13+
"github.com/ipfs/go-graphsync"
1314
"github.com/ipfs/go-graphsync/ipldutil"
1415
pb "github.com/ipfs/go-graphsync/message/pb"
15-
"github.com/libp2p/go-libp2p-core/network"
1616
)
1717

1818
// IsTerminalSuccessCode returns true if the response code indicates the

message/message_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import (
77
"testing"
88

99
blocks "github.com/ipfs/go-block-format"
10-
"github.com/ipfs/go-graphsync"
10+
cid "github.com/ipfs/go-cid"
1111
basicnode "github.com/ipld/go-ipld-prime/node/basic"
1212
"github.com/ipld/go-ipld-prime/traversal/selector/builder"
1313
"github.com/stretchr/testify/require"
1414

15-
cid "github.com/ipfs/go-cid"
15+
"github.com/ipfs/go-graphsync"
1616
"github.com/ipfs/go-graphsync/ipldutil"
1717
"github.com/ipfs/go-graphsync/testutil"
1818
)

message/pb/message.pb.go

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messagequeue/messagequeue.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
"time"
77

88
blocks "github.com/ipfs/go-block-format"
9+
logging "github.com/ipfs/go-log"
10+
"github.com/libp2p/go-libp2p-core/peer"
911

1012
gsmsg "github.com/ipfs/go-graphsync/message"
1113
gsnet "github.com/ipfs/go-graphsync/network"
12-
logging "github.com/ipfs/go-log"
13-
"github.com/libp2p/go-libp2p-core/peer"
1414
)
1515

1616
var log = logging.Logger("graphsync")

0 commit comments

Comments
 (0)