Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 2.83 KB

CONTRIBUTING.md

File metadata and controls

59 lines (46 loc) · 2.83 KB

Contributing to Crux

Crux is a modern, robust library for parsing HTML articles. With all the content on the Web out there, there is always lots of room for improvement. We will gladly accept your pull requests that make parsing more accurate, or add new features & metadata detection.

To maintain the integrity of the library, we have a few simple expectations from all code submitted.

  1. Crux follows the Google Java Style Guide. All new code must adhere to this guide. Please note rules around indentation (2 spaces, no tabs) and that braces are required around single-line clauses, e.g.:

        if (condition) {
          x = 0;  // Braces are required around this line.
        }
  2. Crux is fully unit-tested, and we want to keep it that way. All new code should include unit tests.

  3. For parsing improvements, Crux’s rich suite of integration tests should be updated to reflect the parsing changes. Authors may either choose to test their improvements within existing HTML test files, or add new ones, as appropriate.

  4. All current tests should continue to pass. Either update the tests in the same CL, or modify the new code, so that existing tests continue to pass.

  5. Changes should be self-contained, as far as possible. When implementing multiple independent improvements, each one should be in its own pull request.

Notes for Maintainers

Publishing a New Release

Repo

  1. Update version in build.gradle.
  2. Create a separate commit for the version number change, naming it Bump version to x.y.z.
  3. Push all pending commits to GitHub.
  4. Wait for CI to confirm green status.
  5. Tag that commit as a release at https://github.com/chimbori/crux/releases .

Publish to Maven Central

  1. Run ./gradlew uploadArchives; confirm that uploadArchives task completes successfully. If the ossrhUsername property cannot be found, then uploading will not be performed.
  2. Go to https://oss.sonatype.org/#stagingRepositories, login as chimbori.
  3. Select the comchimboricrux-xxxx repo, then click on Close from the top toolbar.
  4. Wait for the Close step to complete, then click on Release from the top toolbar.

Setting Up Key Signing on a New Machine

  1. Install GPG, e.g. brew install gpg on macOS.
  2. Locate stored credentials from private storage.
  3. Run restore-keys.sh from the stored credentials directory.
  4. Enter the password for chimbori when prompted. This password is different from the Sonatype/Nexus password.
  5. Rename gradle.properties-sample to gradle.properties in that same directory, and fill in missing redacted credentials.
  6. gradle.properties is configured to be .gitignored, but make sure it is never pushed to a public repo.
  7. The new machine is now ready and configured for pushing to Maven Central.