Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add scaffolding for testcontainers docs system #624

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
mkdocs = "==1.5.3"
mkdocs-codeinclude-plugin = "==0.2.1"
mkdocs-include-markdown-plugin = "==6.0.4"
mkdocs-material = "==9.5.18"
mkdocs-markdownextradata-plugin = "==0.2.5"

[requires]
python_version = "3.8"
609 changes: 609 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/search/search_index.json
Access-Control-Allow-Origin: *
1 change: 1 addition & 0 deletions docs/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Each redirect rule must be listed on a separate line, with the original path followed by the new path or URL.
50 changes: 50 additions & 0 deletions docs/bounty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Testcontainers issue bounty policy

## General

We want to use issue bounties to encourage contributions in areas that are important to our sponsors, or tricky to solve.
This includes bug fixes and new features.
We hope that this will provide incentives to tackle issues, and gives sponsors a way to influence where development time is expended.
We also want to reward our contributors, some of whom make huge efforts to improve Testcontainers and help their fellow developers!

!!! note
It's early days for our use of sponsorship, so we expect to evolve this policy over time, possibly without notice. In the event of any ambiguity or dispute, the [Testcontainers org core maintainers](#organisation-core-maintainers) have the final say.

If you'd like to suggest an improvement to this policy, we'd be grateful for your input - please raise a pull request!

## For Sponsors

Sponsors will be able to create a number of 'bounties' per month, varying according to sponsorship tier.

As a sponsor, the process for creating a bounty is as follows:

* Raise an issue, or find an existing issue that describes the bug or feature.
* Start a discussion with the [Testcontainers org core maintainers](#organisation-core-maintainers) to agree that the issue is suitable for a bounty, and how much the reward amount should be.
* Once agreed, we will assign a label to the issue so that interested developers can find it.

Sponsors can create up to 1 or 3 bounties (according to tier) _per calendar month_ - i.e. the counter resets on the 1st of each month.
If a sponsor does not use their full quota of bounty credits in a calendar month, they cannot be rolled over to the next month.

Bounties will expire 90 days after creation - after this time, if they have not been resolved we will close them.

## For Contributors

As a contributor, the process for working on an issue with a bounty attached is:

* Find an issue with a bounty attached to it and no assignee, clarify the requirements if necessary, and consider how you would approach working on it.
* Start a discussion with the [Testcontainers org core maintainers](#organisation-core-maintainers) and the bounty owner. To avoid unpleasant surprises at review time, we'll try to confirm that we're happy with your proposed solution.
* If we're happy with your proposed solution, we will assign the ticket to you.
* Once work is complete, we will go through the PR process as usual and merge the work when finished.
* To receive the bounty reward, [raise an invoice](https://opencollective.com/testcontainers/expenses/new) on Open Collective, following the expenses policy on that page.

Note that a 20% cut of the bounty amount will normally be assigned to project maintainers for PR review work.
We believe this reflects that PR review can often be a significant amount of work for some issues - and also gives maintainers an incentive to complete the review and unlock the bounty reward!
Some pull requests are so well done that very little review is necessary. If that happens, the maintainers may choose not to take a cut of the bounty, and instead release the full amount to the contributor.

## Organisation core maintainers

The organisation core maintainers are:

* Richard North (@rnorth)
* Sergei Egorov (@bsideup)
* Kevin Wittek (@kiview)
22 changes: 22 additions & 0 deletions docs/contributing_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Contributing to documentation

The Testcontainers for Rust documentation is a static site built with [MkDocs](https://www.mkdocs.org/).
We use the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme, which offers a number of useful extensions to MkDocs.

In addition we use a [custom plugin](https://github.com/rnorth/mkdocs-codeinclude-plugin) for inclusion of code snippets.

We publish our documentation using Netlify.

## Previewing rendered content

### Using Python locally

* Ensure that you have Python 3.8.0 or higher.
* Create a Python virtualenv. E.g. `python3 -m venv tc-venv`.
* Activate the virtualenv. E.g. `source tc-venv/bin/activate`.
* Run `pip3 install -r requirements.txt && ./tc-venv/bin/mkdocs serve` from the `testcontainers-rs` root directory. It will start a local auto-updating MkDocs server.

### PR Preview deployments

Note that documentation for pull requests will automatically be published by Netlify as 'deploy previews'.
These deployment previews can be accessed via the `deploy/netlify` check that appears for each pull request.
128 changes: 128 additions & 0 deletions docs/css/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
h1, h2, h3, h4, h5, h6 {
font-family: 'Rubik', sans-serif;
}

[data-md-color-scheme="testcontainers"] {
--md-primary-fg-color: #00bac2;
--md-accent-fg-color: #361E5B;
--md-typeset-a-color: #0C94AA;
--md-primary-fg-color--dark: #291A3F;
--md-default-fg-color--lightest: #F2F4FE;
--md-footer-fg-color: #361E5B;
--md-footer-fg-color--light: #746C8F;
--md-footer-fg-color--lighter: #C3BEDE;
--md-footer-bg-color: #F7F9FD;
--md-footer-bg-color--dark: #F7F9FD;
}

.card-grid {
display: grid;
gap: 10px;
}

.tc-version {
font-size: 1.1em;
text-align: center;
margin: 0;
}

@media (min-width: 680px) {
.card-grid {
grid-template-columns: repeat(3, 1fr);
}
}

body .card-grid-item {
display: flex;
align-items: center;
gap: 20px;
border: 1px solid #C3BEDE;
border-radius: 6px;
padding: 16px;
font-weight: 600;
color: #9991B5;
background: #F2F4FE;
}

body .card-grid-item:hover,
body .card-grid-item:focus {
color: #9991B5;
}

.card-grid-item[href] {
color: var(--md-primary-fg-color--dark);
background: transparent;
}

.card-grid-item[href]:hover,
.card-grid-item[href]:focus {
background: #F2F4FE;
color: var(--md-primary-fg-color--dark);
}

.community-callout-wrapper {
padding: 30px 10px 0 10px;
}

.community-callout {
color: #F2F4FE;
background: linear-gradient(10.88deg, rgba(102, 56, 242, 0.4) 9.56%, #6638F2 100%), #291A3F;
box-shadow: 0px 20px 45px rgba(#9991B5, 0.75);
border-radius: 10px;
padding: 20px;
}

.community-callout h2 {
font-size: 1.15em;
margin: 0 0 20px 0;
color: #F2F4FE;
text-align: center;
}

.community-callout ul {
list-style: none;
padding: 0;
display: flex;
justify-content: space-between;
gap: 10px;
margin-top: 20px;
margin-bottom: 0;
}

.community-callout a {
transition: opacity 0.2s ease;
}

.community-callout a:hover {
opacity: 0.5;
}

.community-callout a img {
height: 1.75em;
width: auto;
aspect-ratio: 1;
}

@media (min-width: 1220px) {
.community-callout-wrapper {
padding: 40px 0 0;
}

.community-callout h2 {
font-size: 1.25em;
}

.community-callout a img {
height: 2em;
}
}

@media (min-width: 1600px) {
.community-callout h2 {
font-size: 1.15em;
}

.community-callout a img {
height: 1.75em;
}
}
Loading
Loading