Skip to content

Commit

Permalink
Add contributing guide (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcarter97 authored Jun 8, 2023
1 parent 940ddd7 commit b89c421
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 5 deletions.
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing

Contributions are welcomed!

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.

## Pull Request Process

1. Fork the repo, push your commits to a branch of your fork, open the PR.
2. Make sure you update the README.md where relevant.
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.

## Build and run tests locally

The software is written in [Scala](https://scala-lang.org/) and is built with [SBT](http://www.scala-sbt.org/).

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.

## Performing a release (for project maintainers)

### Snapshot release

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/).

>**Note**
>
> `sbt-ci-release` determines the Snapshot version using [`sbt-dynver`](https://github.com/dwijnand/sbt-dynver).
### Stable release

1. Create a GitHub release with the new version and tag following [semver.org](https://semver.org/).
2. Update the release notes according to recent changes. You can click 'Auto-generate release notes' when creating the release.
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/).

>**Warning**
>
> The release tag **must** start with a `v` followed by the version, e.g. `v1.0.0` for sbt-ci-release to work
## Contributor Code of Conduct

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.

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.

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery
- Personal attacks
- Trolling or insulting/derogatory comments
- Public or private harassment
- Publishing other's private information, such as physical or electronic addresses, without explicit permission
- Other unethical or unprofessional conduct.

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.

This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

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/)
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# fs2-kafka-topic-loader

Reads the contents of provided Kafka topics, in one of two ways:
- reads the topics in their entirety
- reads up to the last consumer group's committed Offset
This is determined by the `LoadTopicStrategy`.
Reads the contents of provided Kafka topics determined by the `LoadTopicStrategy`.

- `LoadAll` - reads the topics in their entirety
- `LoadCommitted` - reads up to the configured consumer-group's last committed Offset

This library is aimed for usage in applications that want a deterministic stream of Kafka messages that completes once
the last message (determined above) has been read. This is useful if an application shouldn't respond to new events
before it has processed all previously seen messages, or if Kafka is being used as a data store and the entire contents
of a topic needs to be reloaded on an application restart.

## Usage

Add the following to your `build.sbt`:

Expand All @@ -24,10 +31,13 @@ object Main extends IOApp.Simple {
}
```

See [LoadExample.scala](./it/src/main/scala/load/LoadExample.scala) for a more detailed example.
See [`LoadExample.scala`](./it/src/main/scala/load/LoadExample.scala) for a more detailed example.

## Configuration

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

## Contributing

Contributions are welcomed! For contributions see [here](./CONTRIBUTING.md) for more information.

0 comments on commit b89c421

Please sign in to comment.