Skip to content

Commit b89c421

Browse files
authored
Add contributing guide (#5)
1 parent 940ddd7 commit b89c421

File tree

2 files changed

+75
-5
lines changed

2 files changed

+75
-5
lines changed

CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributing
2+
3+
Contributions are welcomed!
4+
5+
When contributing to this repository, please first discuss the change you wish to make via GitHub issue before making a change. This saves everyone from wasted effort in the event that the proposed changes need some adjustment before they are ready for submission.
6+
7+
## Pull Request Process
8+
9+
1. Fork the repo, push your commits to a branch of your fork, open the PR.
10+
2. Make sure you update the README.md where relevant.
11+
3. Project maintainers will squash-merge Pull Requests once they are happy. There may be one or more cycles of feedback on the PR before they are satisfied.
12+
13+
## Build and run tests locally
14+
15+
The software is written in [Scala](https://scala-lang.org/) and is built with [SBT](http://www.scala-sbt.org/).
16+
17+
The project is built and released for Scala versions 2.13 and 3. To compile and test both versions run `sbt +test; project it; +test` to run both unit and integration tests.
18+
19+
## Performing a release (for project maintainers)
20+
21+
### Snapshot release
22+
23+
1. Merging a PR to master will trigger the `release` step of the [travis workflow](./.travis.yml) and create a snapshot release in the [Sonatype snapshot repository](https://s01.oss.sonatype.org/content/repositories/snapshots/uk/sky/).
24+
25+
>**Note**
26+
>
27+
> `sbt-ci-release` determines the Snapshot version using [`sbt-dynver`](https://github.com/dwijnand/sbt-dynver).
28+
29+
### Stable release
30+
31+
1. Create a GitHub release with the new version and tag following [semver.org](https://semver.org/).
32+
2. Update the release notes according to recent changes. You can click 'Auto-generate release notes' when creating the release.
33+
3. Publish the release. This will trigger the `release` stage of the [travis workflow](./.travis.yml) and push the image to the [Sonatype release repository](https://s01.oss.sonatype.org/content/repositories/releases/uk/sky/).
34+
35+
>**Warning**
36+
>
37+
> The release tag **must** start with a `v` followed by the version, e.g. `v1.0.0` for sbt-ci-release to work
38+
39+
## Contributor Code of Conduct
40+
41+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
42+
43+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
44+
45+
Examples of unacceptable behavior by participants include:
46+
47+
- The use of sexualized language or imagery
48+
- Personal attacks
49+
- Trolling or insulting/derogatory comments
50+
- Public or private harassment
51+
- Publishing other's private information, such as physical or electronic addresses, without explicit permission
52+
- Other unethical or unprofessional conduct.
53+
54+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
55+
56+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
57+
58+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
59+
60+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# fs2-kafka-topic-loader
22

3-
Reads the contents of provided Kafka topics, in one of two ways:
4-
- reads the topics in their entirety
5-
- reads up to the last consumer group's committed Offset
6-
This is determined by the `LoadTopicStrategy`.
3+
Reads the contents of provided Kafka topics determined by the `LoadTopicStrategy`.
4+
5+
- `LoadAll` - reads the topics in their entirety
6+
- `LoadCommitted` - reads up to the configured consumer-group's last committed Offset
7+
8+
This library is aimed for usage in applications that want a deterministic stream of Kafka messages that completes once
9+
the last message (determined above) has been read. This is useful if an application shouldn't respond to new events
10+
before it has processed all previously seen messages, or if Kafka is being used as a data store and the entire contents
11+
of a topic needs to be reloaded on an application restart.
12+
13+
## Usage
714

815
Add the following to your `build.sbt`:
916

@@ -24,10 +31,13 @@ object Main extends IOApp.Simple {
2431
}
2532
```
2633

27-
See [LoadExample.scala](./it/src/main/scala/load/LoadExample.scala) for a more detailed example.
34+
See [`LoadExample.scala`](./it/src/main/scala/load/LoadExample.scala) for a more detailed example.
2835

2936
## Configuration
3037

3138
Configuration from the Topic Loader is done via the `ConsumerSettings`. The group id of the Topic Loader should match
3239
the group id of your application.
3340

41+
## Contributing
42+
43+
Contributions are welcomed! For contributions see [here](./CONTRIBUTING.md) for more information.

0 commit comments

Comments
 (0)