Skip to content

Commit

Permalink
Merge pull request #129 from orgua/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
orgua committed Jul 9, 2023
2 parents 04068ca + ff07e6f commit 6416020
Show file tree
Hide file tree
Showing 99 changed files with 3,740 additions and 2,647 deletions.
12 changes: 12 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[bumpversion]
current_version = 3.0.0 # major.minor.patch
commit = False
tag = False

[bumpversion:file:doc/source/conf.py]

[bumpversion:file:docs/source/help_me_help_you.md]

[bumpversion:file:library.json]

[bumpversion:file:library.properties]
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: AcrossEmptyLinesAndComments
AlignConsecutiveAssignments: AcrossComments
# Enabled: true # TODO: pyClangFormat fails with this style
# AcrossEmptyLines: true
# AcrossComments: true
# AlignCompound: true
AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveMacros: AcrossComments
AlignTrailingComments: true
AlignOperands: Align
AllowAllArgumentsOnNextLine: false
Expand Down
5 changes: 3 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[codespell]
#skip =
#skip =

builtin = clear,rare,informal,usage,code,en-GB_to_en-US

ignore-words-list = master,masters,slave,slaves,usera,thre,OD
ignore-words-list = od,usera,thre,usere,master
# note: use lower-case!

# options without argument
check-filenames =
Expand Down
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''
---

**IMPORTANT READ FIRST**
Please make sure to read through help-section of [readme](https://github.com/orgua/OneWireHub/blob/main/README.md#help---what-to-do-if-things-dont-work-as-expected) and try to help yourself first.
Please make sure to read through help-section of [readme](https://orgua.github.io/OneWireHub/help_me_help_you.html) and try to help yourself first.

**Describe the bug**
A clear and concise description of what the bug is.
Expand All @@ -24,10 +24,11 @@ If applicable, add screenshots to help explain your problem.

**Dev-Environment:**
Give some information about your setup, like:
- microcontroller used for the hub
- onewire-host to talk to the hub
- software and version used to compile
- which device is emulated, what works, what doesn't
- microcontroller and board used for running the hub
- onewire-host used to talk to the hub
- software and version used to compile (OS, Arduino or other toolchain)
- which device is emulated, what works, what doesn't
- please be precise

**Additional context**
Add any other context about the problem here.
6 changes: 6 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
- uno
example:
- ./examples/BAE910_device/BAE910_device.ino
# - ./examples/debug/attiny85-4devices/attiny85-4devices.ino
# - ./examples/debug/calibrate_by_bus_timing/calibrate_by_bus_timing.ino
# - ./examples/debug/CRC-Comparison/CRC-Comparison.ino
# - ./examples/debug/irq-driven-playground/irq-driven-playground.ino
# - ./examples/debug/optimize_pinAccess/optimize_pinAccess.ino
# - ./examples/debug/programsize_documentation/programsize_documentation.ino
# - ./examples/DS18B20_asInterface/DS18B20_asInterface.ino # needs I2C
- ./examples/DS18B20_thermometer/DS18B20_thermometer.ino
- ./examples/DS2401_serial/DS2401_serial.ino
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/sphinx_to_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Generate Docs
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Set up Python 🐍
uses: actions/setup-python@v4
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo

# - name: Run Pre-Commit Tests 🧪
# uses: pre-commit/[email protected]

- name: Install dependencies 🔧
run: pip3 install sphinx sphinxawesome-theme sphinx-sitemap myst-parser

- name: Build Documentation 🧱
uses: sphinx-notes/pages@v3
with:
checkout: false
publish: false
documentation_path: "./docs/source"

- name: Push changes 📌
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: pages
force: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.xml
*.iml
cmake-build-debug/
build/
21 changes: 12 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# install pip3 install pre-commit
# sudo apt install cppcheck
# run pre-commit run --all-files
# run pre-commit run -a
# update pre-commit autoupdate

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -22,16 +22,15 @@ repos:
- id: fix-byte-order-marker

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.1"
rev: "v2.2.5"
hooks:
- id: codespell

# - repo: https://github.com/pre-commit/mirrors-clang-format
# rev: 'v14.0.6'
# hooks:
# - id: clang-format
# types_or: [c++, c]
# TODO: activate later
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v15.0.7'
hooks:
- id: clang-format
#types_or: [c++, c]

# cpp-check comes last! fails if uninstalled
- repo: https://github.com/pocc/pre-commit-hooks
Expand All @@ -41,8 +40,12 @@ repos:
args:
- "--enable=all"
- "--std=c++11"
- "--language=c++"
- "--platform=unix32"
- "--verbose"
- "-q"
- "--max-ctu-depth=10"
- "--suppress=unusedFunction"
- "--force"
- "-I./src"
- "--check-config"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ set(SOURCE_FILES
src/platform.cpp
) # TODO: this does not have to be manual

add_executable(OneWireHub ${SOURCE_FILES})
add_executable(OneWireHub ${SOURCE_FILES})
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,5 @@ https://www.contributor-covenant.org/translations.
## Example Onewire - naming scheme to use (WIP)

- primary: controller, host
- secondary: hub-device, periphery
- secondary: hub-device, periphery, peripheral device
- microcontroller running the hub: device-emulator
87 changes: 87 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Welcome to OnewireHubs contributing guide <!-- omit in toc -->

Thank you for investing your time in contributing to our project!

Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable.

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.


## New contributor guide

To get an overview of the project, read the [README](README.md). Here are some resources to help you get started with open source contributions:

- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)


## Getting started

To navigate our codebase with confidence, see [the introduction to working in the docs repository](/contributing/working-in-docs-repository.md) :confetti_ball:. For more information on how we write our markdown files, see [the GitHub Markdown reference](contributing/content-markup-reference.md).

Check to see what [types of contributions](/contributing/types-of-contributions.md) we accept before making changes. Some of them don't even require writing a single line of code :sparkles:.

### Issues

#### Create a new issue

If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/github/docs/issues/new/choose).

#### Solve an issue

Scan through our [existing issues](https://github.com/github/docs/issues) to find one that interests you. You can narrow down the search using `labels` as filters. See [Labels](/contributing/how-to-use-labels.md) for more information. As a general rule, we don’t assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix.

### Make Changes

#### Make changes in the UI

Click **Make a contribution** at the bottom of any docs page to make small changes such as a typo, sentence fix, or a broken link. This takes you to the `.md` file where you can make your changes and [create a pull request](#pull-request) for a review.

<img src="./assets/images/contribution_cta.png" width="300" height="150" />

#### Make changes in a codespace

For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)."

#### Make changes locally

1. [Install Git LFS](https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage).

2. Fork the repository.
- Using GitHub Desktop:
- [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop.
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!

- Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

3. Install or update to **Node.js v16**. For more information, see [the development guide](contributing/development.md).

4. Create a working branch and start with your changes!

### Commit your update

Commit the changes once you are happy with them. See [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages) to know how to use emoji for commit messages.

Once your changes are ready, don't forget to [self-review](/contributing/self-review.md) to speed up the review process:zap:.

### Pull Request

When you're finished with the changes, create a pull request, also known as a PR.
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request for additional information.
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues.

### Your PR is merged!

Congratulations :tada::tada: The GitHub team thanks you :sparkles:.

Once your PR is merged, your contributions will be publicly visible on the [GitHub docs](https://docs.github.com/en).

Now that you are part of the GitHub docs community, see how else you can [contribute to the docs](/contributing/types-of-contributions.md).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,4 +618,4 @@ an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
17 changes: 17 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pre-commit = "*"
sphinx = "*"
sphinxawesome-theme = "*"
sphinx-sitemap = "*"
myst-parser = "*"
bump2version = "*"

[dev-packages]

[pipenv]
allow_prereleases = false
Loading

0 comments on commit 6416020

Please sign in to comment.