Skip to content

Commit

Permalink
Scaffold with broth
Browse files Browse the repository at this point in the history
  • Loading branch information
olih committed Nov 20, 2024
1 parent 76bca17 commit 7374834
Show file tree
Hide file tree
Showing 16 changed files with 645 additions and 82 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels:
- bug
- triage
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Please tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: A bug happened!
validations:
required: true
- type: textarea
id: version
attributes:
label: Version
description: What version of the library are you running?
placeholder: 0.0.0
validations:
required: true
- type: dropdown
id: platform
attributes:
label: On which platform(s) do you have the issue ?
multiple: true
options:
- Any
- Dart
- Flutter
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Linux
- Windows
- MacOs
- Other
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be
automatically formatted into code, so no need for back ticks.
render: shell
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature]: "
labels:
- feature
- triage
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: textarea
id: problem
attributes:
label: Describe the problem
description: Is your feature request related to a problem? Please describe.
placeholder: Describe the problem you would like to solve
value: My problem
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution
description: A clear and concise description of what you want to happen.
placeholder: Tell us what you would like to see!
value: My solution
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
placeholder: A context
value: The context
validations:
required: true
- type: checkboxes
id: suitability
attributes:
label: Is this new feature a good fit ?
description: Should this new feature really be part of this project
options:
- label: "__Needed__: an existing user is going to need this in the short term"
required: true
- label: "__Specific__: the problem is clearly understood and defined"
required: true
- label: "__Small change__: This new feature represents a reasonably small change"
required: true
- label: "__Same scope__: this new feature does not change significantly the scope
of this project"
required: true
- label: "__Long term maintenance__: moving this to a new project would make long
term maintenance harder"
required: true
36 changes: 36 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Summary of the change

Fixes: # (issue)

## Code check

- [x] `npx baldrick-broth@latest release ready` does not show any
concerning issues

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)

- [ ] Safe refactoring (non-breaking change which improves the code or
documentation)

- [ ] New feature (non-breaking change which adds functionality)

- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## Motivation and context

- [ ] improve user experience
- [ ] improve consistency
- [ ] improve security
- [ ] improve documentation
- [ ] improve code
- [ ] reduce risk for unfamiliar tasks
- [ ] automate repetitive tasks

## How Has This Been Tested

- [x] Unit tests
- [ ] Automated browser tests
- [ ] Manual tests
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
sdk:
- 3.1
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart test
6 changes: 6 additions & 0 deletions .remarkrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
settings:
bullet: "*"
plugins:
- remark-preset-lint-consistent
- remark-preset-lint-recommended
- remark-preset-lint-markdown-style-guide
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"makefile.extensionOutputFolder": "./.vscode",
"yaml.schemas": {
"./script/schema/project.schema.json": "script/data/project.yaml"
}
}
82 changes: 82 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project
and our community a harassment-free experience for everyone, regardless of
age, body size, disability, ethnicity, gender identity and expression, level
of experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual
attention or advances

- Trolling, insulting/derogatory comments, and personal or political
attacks

- Public or private harassment

- Publishing others' private information, such as a physical or
electronic address, without explicit permission

- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair corrective
action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an
appointed representative at an online or offline event. Representation of a
project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [](https://github.com/). The
project team will review and investigate all complaints, and will respond in
a way that it deems appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org

[version]: http://contributor-covenant.org/version/1/4/
98 changes: 98 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Contributing

Welcome ! and many thanks for taking the time to contribute !

First, you should have a look at the [Technical design
documentation](TECHNICAL_DESIGN.md) to get an understanding of the design
behind this project.

From there, there are a few options depending of which kind of contributions
you have in mind: bug fix, documentation improvement, translation, testing,
...

Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it
in all your interactions with the project.

## Build the project locally

The following commands should get you started:

Setup an alias:

```
alias broth='npx baldrick-broth'
```

or if you prefer to always use the latest version:

```
alias broth='npx baldrick-broth@latest'
```

Install the `dart` dependencies:

```bash
dart pub get
```

Run the unit tests:

```bash
broth test unit
```

A list of [most used commands](MAINTENANCE.md) is available:

```bash
broth
```

Please keep an eye on test coverage, bundle size and documentation.
When you are ready for a pull request:

```bash
broth release ready
```

You will probably want to update the documentation:

```bash
broth doc api
```

You can also simulate [Github actions](https://docs.github.com/en/actions)
locally with [act](https://github.com/nektos/act).
You will need to setup `.actrc` with the node.js docker image `-P
ubuntu-latest=node:16-buster`

To run the pipeline:

```bash
broth github act
```

## Pull Request Process

1. Make sure that an issue describing the intended code change exists and
that this issue has been accepted.

When you are about to do a pull-request:

```bash
broth release ready -pr
```

Then you can create the pull-request:

```bash
broth release pr
```

## Publishing the library

This would be done by the main maintainers of the project. Locally for now as
updates are pretty infrequent, and some of tests have to be done manually.

```bash
broth release publish
```
11 changes: 11 additions & 0 deletions DECISIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Architecture decision records

An [architecture
decision](https://cloud.google.com/architecture/architecture-decision-records)
is a software design choice that evaluates:

- a functional requirement (features).
- a non-functional requirement (technologies, methodologies, libraries).

The purpose is to understand the reasons behind the current architecture, so
they can be carried-on or re-visited in the future.
Loading

0 comments on commit 7374834

Please sign in to comment.