Thank you for investing your time in contributing to our project!
Before you start contributing, we're presuming you've gone through all the architecture-decisions & had a discussion with the maintainers.
We plan to release Goose 1.0.0 on February 1st, 2025, marking API stability and ensuring backward-compatibility, with no downtime during upgrades.
We welcome feedback from current and new users, especially if you’d like to request features or suggest changes to the API or implementation before the 1.0.0 release. Please share your thoughts via GitHub Issues or the Clojurians Slack.
- Clojure v1.11+
- Infra dependencies (note: for easy testing, use the docker compose manifest)
- Use
:repl
profile when starting REPL in your IDE
The test suite is mostly integration tests, so use docker-compose to get the containerized Redis and RabbitMQ images for testing purposes.
$ docker-compose up -d # Sets up infra required for tests.
$ clj -X:test :nses '[goose.specs-test]' # Testing only 1 namespace.
$ clj -X:test # Running all tests.
$ docker-compose down # ...when you're done.
- Goose adheres to the weavejester/cljfmt library to maintain consistent code formatting.
- Install the appropriate plugin for your IDE to ensure compliance.
$ clj -M:cljfmt fix # Automatically fix formatting issues.
$ clj -M:cljfmt check # Check any formatting inconsistencies.
- Install clj-kondo v2022.10.05
$ clj-kondo --lint src # Linting src dir.
$ clj-kondo --lint test # Linting test dir.
- Goose uses
epoch
in milliseconds
These aren't exhaustive, but majorly inspired from The Clojure Style Guide
defn
- Add args in same line if function is a 1-liner
- Add args after a linebreak if function has a docstring or is longer than 1 line,
- Use Idiomatic Namespace Aliases
- Prefer anonymous functions over partial
- In specs, use
set
as a predicate for equality/contains functionality - Use compact metadata notation for flags
- Follow comments & docstrings guidelines
- Every new feature should have an ADR, well-formatted docstrings & a Wiki Page.
- ADRs (Architecture Decision Records) should be added to this folder.
- Docstrings serve 3 purposes:
- Record the How and What of an external function
- Document usage of a function and meaning of its args
- Beautify documentation of Goose APIs on cljdoc, a documentation website for Clojure community
- When writing docstrings, follow these guidelines:
- Put code logic/reasoning in code-comments & only cover usage of a function in docstrings.
- Format docstrings in markdown for parsing by Cljdoc.
- Capitalize the first line.
- Use double backslashes (
\\
) for line break when a new line isn't feasible. - Wrap positional args with backtick (example:
:broker
). - Link to other functions/data in Goose using API Wikilinks syntax (example:
[[goose.retry/default-opts]]
).- In API Wikilinks, use fully-qualified namespaces and avoid alias or relative paths for namespaces.
After feature-completion or bug-fix, we release a new version by marking a tag on Github, and publishing the new package to Clojars. Follow below steps when making a release:
- Compare code-changes between previous release and HEAD branch main by following this link.
- Choose a new release version based on semantic versioning guidelines.
- Commit new release version to README.md, CHANGELOG and pom.xml.
- Draft a new release by going to this link
- While choosing a tag, enter the release number to be created on publish.
- Click on
Generate release notes
, and review the generated notes. - Click on
Publish release
, and track the status of new package publishing in CI. - Verify Goose is released on Clojars and docs are updated on cljdoc.org.