Skip to content

Commit

Permalink
Update contributing guidelines to highlight maintenance cost
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyley committed Aug 25, 2024
1 parent 8fc63db commit a229584
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 12 deletions.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/new-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Description

### Maintenance cost vs benefit

<!--
As the project maintainer, I have to carefully balance new features with the limited time available for maintenance.
While we highly value contributions, new features grow the codebase and increase the ongoing maintenance burden - so
consider benefit vs maintenance cost - see https://github.com/scanamo/scanamo/blob/main/CONTRIBUTING.md#new-features
for more details.
-->

* **Benefit**: <!-- eg, adds the capability to do X, better (in what ways?) than directly using the AWS SDK -->
* **Cost**: <!-- eg, adds this much extra implementation code, modifies this many files, breaks compatibility, etc -->

### Tests

<!--
Any new functionality should have at least one test, both to check correctness, and to
demonstrate API use.
-->

### See also
<!-- GitHub Issues, PRs (including Scanamo PRs that have previously touched this area), AWS documentation, etc -->
51 changes: 39 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
If you have a question about Scanamo there is a
[Gitter channel](https://gitter.im/guardian/scanamo) to try and
answer it. Suggestions on how to improve the documentation are very
welcome.
## Issues & Questions

Feel free to open an issue if you notice a bug or have an idea for a
feature.
If you've found what looks like a bug, please check [issues on GitHub](https://github.com/scanamo/scanamo/issues),
and create a new issue if necessary.

Pull requests are gladly accepted. Scanamo follows a standard
[fork and pull](https://help.github.com/articles/using-pull-requests/)
model for contributions via GitHub pull requests.
If you just have a general question, or there's something you don't understand, ask on
[stackoverflow.com](http://stackoverflow.com/questions/ask) (tag it with [`scanamo`](http://stackoverflow.com/questions/tagged/scanamo)
so we can see it) - there are many more people who can answer that sort of question on Stackoverflow,
you stand a good chance of getting your question answered quicker!

Building and testing Scanamo
----------------------------
There _was_ a [Gitter channel](https://gitter.im/guardian/scanamo) for discussion/questions around Scanamo, but
it's not a preferred channel for the current maintenance team, and isn't checked very often.

## Pull requests

### Documentation

Suggestions on how to improve the documentation are very welcome!

### New features

New features inevitably grow the Scanamo codebase, unfortunately increasing its ongoing
maintenance burden. As maintenance time is precious and in short supply, new features need
to justify themselves in terms of benefit-to-users versus cost-in-maintenance - maintenance
cost can be roughly correlated to how much implementation code is added, as an example, see
[PR #1801](https://github.com/scanamo/scanamo/pull/1801#pullrequestreview-2258441456).

New features that don't significantly improve on just-directly-using-the-AWS-SDK stand an increased
risk of being rejected. Of the ~60 operations supported by the [DynamoDB API](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Operations_Amazon_DynamoDB.html),
only 9 are directly supported by Scanamo - for each supported operation, the benefits are
usually _more_ than one from this list:

* **conciseness** - accomplishing tasks with less code than directly using the AWS SDK
* **preventing the construction of invalid requests** (eg, `expressionAttributeNames` & `expressionAttributeValues` correctly set, avoiding reserved words, etc)
* **facilitating mapping** - between Scala/Java data types/classes and the DynamoDB item attributes model

Scanamo's maintainers have little opportunity to see how others use Scanamo - it may
help maintainers understand benefit if you can describe a specific example of how you intend to use
the feature (the best example would be linking to a draft public PR that uses the feature!).

## Building and testing Scanamo

Scanamo uses a standard [SBT](https://www.scala-sbt.org/) build. If you
have SBT installed, you should first run `startDynamodbLocal` task from the SBT prompt to start a local dynamodb instance and afterwards run the `test` command to compile Scanamo and run its tests.
Expand All @@ -33,7 +60,7 @@ scalafmtCheck
scalafmtSbtCheck
```

# Publishing a new release
## Publishing a new release

This repo uses [`gha-scala-library-release-workflow`](https://github.com/guardian/gha-scala-library-release-workflow)
to automate publishing releases (both full & preview releases) - see
Expand Down

0 comments on commit a229584

Please sign in to comment.