Skip to content

Commit

Permalink
Merge branch 'template' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	Cargo.toml
#	README.md
#	src/lib.rs
  • Loading branch information
Tamschi committed Oct 1, 2021
2 parents 1eaec47 + 90a38ac commit 6d10375
Show file tree
Hide file tree
Showing 13 changed files with 345 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.md text eol=lf
*.rs text eol=lf
*.toml text eol=lf
*.txt text eol=lf
*.yml text eol=lf

.editorconfig text eol=lf
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug Report
about: Create a report to help this project improve
title: ''
labels: bug
labels: 'type: bug'
assignees: ''

---
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
blank_issues_enabled: false
contact_links:
- name: Discuss anything else
url: https://github.com/Tamschi/TODO_CRATE_NAME/discussions
url: https://github.com/Tamschi/taml/discussions
about: For questions, ideas or general discussion, please use the Discussions tab linked here.
- name: Show me your project
url: https://github.com/Tamschi/TODO_CRATE_NAME/discussions/categories/show-and-tell
url: https://github.com/Tamschi/taml/discussions/categories/show-and-tell
about: I'd love to hear about your projects using this crate here!
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: enhancement
labels: 'type: feature'
assignees: ''

---
Expand Down
12 changes: 8 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ updates:
directory: "/"
schedule:
interval: "daily"
# versioning-strategy: "increase-if-necessary" # Not yet supported. See <https://github.com/dependabot/dependabot-core/issues/4009>.
assignees:
- "Tamschi"
reviewers:
- "Tamschi"
labels:
- "type: upkeep"
- "domain: Rust"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
assignees:
- "Tamschi"
reviewers:
- "Tamschi"
labels:
- "type: upkeep"
- "domain: GitHub Actions"
6 changes: 3 additions & 3 deletions .github/workflows/deny_warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
profile: minimal
components: clippy
- run: cat CI.toml >> Cargo.toml
- run: cargo clippy --workspace --locked --no-default-features -- -D warnings
- run: cargo clippy --workspace --locked -- -D warnings
- run: cargo clippy --workspace --locked --all-features -- -D warnings
- run: cargo clippy --workspace --locked --all-targets --no-default-features -- -D warnings
- run: cargo clippy --workspace --locked --all-targets -- -D warnings
- run: cargo clippy --workspace --locked --all-targets --all-features -- -D warnings
23 changes: 23 additions & 0 deletions .github/workflows/update_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# labels.json adapted from <https://raw.githubusercontent.com/seantrane/github-label-presets/master/labels.json>.
# See also <https://seantrane.com/posts/logical-colorful-github-labels-18230/>.

name: Update Labels
on:
push:
branches: [develop]

jobs:
deny-warnings:
name: Update Labels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm # I'm not entirely sure this is correct.
key: ${{ runner.os }}-npm
- run: npx github-label-sync
--access-token ${{ secrets.GITHUB_TOKEN }}
--labels labels.json
--allow-added-labels
${{ github.repository }}
2 changes: 1 addition & 1 deletion .rust-template.version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9
14
90 changes: 86 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,31 @@ Please keep your code human-readable.

While there are no formal style requirements, here are some suggestions that might help new code fit in with with the existing:

* Don't use abbreviations unless they are established terms.
- Don't use abbreviations unless they are established terms.

They usually make it harder for me to read the code fluently. You also don't need to worry about alignment; I use a proportional font and likely wouldn't notice.

* Try to keep it simple.
- Try to keep it simple.

I can't properly review code I don't understand, so straightforward implementations are usually preferred.

It's usually fine to use a library to avoid boilerplate, if there's enough documentation so I could replicate it from scratch.

If you do something custom that's tricky, a link to an explanation of the technique would be nice. I'll just ask if this becomes an issue, though.

* If you use macros, put them nearby.
- If you use macros, put them nearby.

I normally place one-off macros directly above the item I need them for.
I normally place one-off macros directly above the item I need them for.

- When writing comments and documentation, try to break lines semantically.

It's more readable than breaking purely by line width this way, in my eyes.

Just after commas tends to be a good place for this, of course,
but please try to also take sentence flow into account when there are none.
If there are multiple sentences in a paragraph, you may want to put them in separate lines.

Please do not manually break lines in the rendered documentation (trailing double-space), unless this strongly improved legibility.

### Meta data

Expand All @@ -58,3 +68,75 @@ Please add yourself to each copyright holders list of [LICENSE-APACHE](LICENSE-A
Nicknames and entries without email addresses are fine, too.

For substantial contributions (basically anything more than typo or grammar fixes), feel free to add yourself to the `authors` list in `Cargo.toml`. This explicitly includes documentation changes, testing and bug fixes that just happen to be not much code.

## Labels

Don't worry about these too much.

You're encouraged to add any that seem applicable where possible,
but I'll otherwise just take care of it.

(Don't undo changes I make to labels without immediate reason.)

See <https://github.com/Tamschi/taml/issues/labels> for details on individual labels.

### Categories

- Assorted

Labels without prefix like [`breaking`](https://github.com/Tamschi/taml/labels/breaking),
[`good first issue`](https://github.com/Tamschi/taml/labels/good%20first%20issue) or
[`help wanted`](https://github.com/Tamschi/taml/labels/help%20wanted).

- `domain:`

Categorises changes by domain. Mostly not necessary.

- `effort:`

Relative effort required. There's no specific unit of measurement.

- `priority:`

Vaguely informs my schedule, **cross-respository**.

You're welcome to let me know that (and ideally why) you'd like to see a specific change and I'll take that into account.

If you *need* a feature that you're not planning to implement yourself, strongly consider paying me for it.

> This is, of course, subject to side-job restrictions I may be under.
<!---->

> If you'd like to pay me directly, contact me first and we'll figure out how to do this as industry-standard contract work.
>
> Alternatively:
>
> For crowdfunding and escrow, [Bountysource](https://www.bountysource.com/) seems reasonably trustworthy. This also has the advantage of letting someone else work on it, since I'm usually pretty swamped with projects.
>
> Use fiat bounties. Cryptoscam "currencies" are a scourge.
>
> Posting a bounty won't guarantee I'll actually implement a solution, but I'll try to speedily triage relevant issues at least.
>
> I'll try to set up something that automatically announces bounties,
> but if that doesn't happen within a few hours, **do** post a comment about it!
- `state:`

General scheduling categories. See label descriptions for details!

Rarely, more than one may be applicable.

- `type:`

General problem or change domain categories.

Only one of these should be used at a time.

- `work:`

These are inspired by the [Cynefin framework](https://en.wikipedia.org/wiki/Cynefin_framework) to categorise the type of work done or required.

I adjusted the labels to be a bit friendlier and more expressive. See the label descriptions for details.

The unknown category at the centre is not labelled explicitly.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
[![GitHub](https://img.shields.io/static/v1?logo=GitHub&label=&message=%20&color=grey)](https://github.com/Tamschi/taml)
[![open issues](https://img.shields.io/github/issues-raw/Tamschi/taml)](https://github.com/Tamschi/taml/issues)
[![open pull requests](https://img.shields.io/github/issues-pr-raw/Tamschi/taml)](https://github.com/Tamschi/taml/pulls)
[![good first issues](https://img.shields.io/github/issues-raw/Tamschi/taml/good%20first%20issue?label=good+first+issues)](https://github.com/Tamschi/taml/contribute)

[![crev reviews](https://web.crev.dev/rust-reviews/badge/crev_count/taml.svg)](https://web.crev.dev/rust-reviews/crate/taml/)

TAML is a configuration file format combining some aspects of Markdown, CSV, TOML, YAML and Rust.
Expand Down Expand Up @@ -63,6 +65,8 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

See [CONTRIBUTING](CONTRIBUTING.md) for more information.

## [Code of Conduct](CODE_OF_CONDUCT.md)

## [Changelog](CHANGELOG.md)
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Faulty versions are [yanked](https://doc.rust-lang.org/cargo/commands/cargo-yank.html), where possible after a Semver-compatible update is made available, and added to the table above as unsupported.
They are also marked with an additional `v….….…-yanked` tag in Git to make them easily recognisable, but original release tags are not removed.

Security advisories are published through [the respective section on this repository here](https://github.com/Tamschi/TODO_CRATE_NAME/security/advisories) and [RustSec/advisory-db](https://github.com/RustSec/advisory-db).
Security advisories are published through [the respective section on this repository here](https://github.com/Tamschi/taml/security/advisories) and [RustSec/advisory-db](https://github.com/RustSec/advisory-db).

## Reporting a Vulnerability

Expand All @@ -33,6 +33,6 @@ To be notified automatically, either subscribe to releases through the repositor
To check only for vulnerabilities, use [cargo-audit](https://github.com/RustSec/rustsec/tree/main/cargo-audit#readme) instead, which is available as a GitHub Action as [actions-rs/audit-check](https://github.com/actions-rs/audit-check#readme).

Once a version becomes yanked/unsupported, please update or upgrade to a supported version in a timely manner.
I'll try to make this as painless as possible where manual changes are required, but a simple [`cargo update -p TODO_CRATE_NAME`](https://doc.rust-lang.org/cargo/commands/cargo-update.html) should do the trick in most cases.
I'll try to make this as painless as possible where manual changes are required, but a simple [`cargo update -p taml`](https://doc.rust-lang.org/cargo/commands/cargo-update.html) should do the trick in most cases.

[Dependabot]: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically
Loading

0 comments on commit 6d10375

Please sign in to comment.