From 05e2cc8bec8c35c194a62e794f8cb8260d9f9258 Mon Sep 17 00:00:00 2001 From: Thomas Lambert <dev@tlambert.be> Date: Tue, 29 Nov 2022 23:27:48 +0100 Subject: [PATCH] feat(doc, ci): initial doc and checks --- .gitignore | 6 ++++++ .pre-commit-config.yaml | 30 ++++++++++++++++++++++++++++++ CHANGELOG.md | 21 +++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 41 +++++++++++++++++++++++++++++++++++++++++ miss_hit.cfg | 34 ++++++++++++++++++++++++++++++++++ requirements.txt | 7 +++++++ 7 files changed, 160 insertions(+) create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 miss_hit.cfg create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a9bdde --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Files to ignore + +# Folders to ignore +wtFiles/ +arduinoFiles/ + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..609eb54 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +--- +# These hooks run the three MISS_HIT checks to ensure good code quality before +# each commit. + +repos: + - repo: local + hooks: + # MISS_HIT code style check + - id: mh_style + entry: mh_style + name: mh_style + args: [--process-slx, --fix] + files: ^(.*\.(m|slx))$ + language: python + additional_dependencies: [miss_hit_core] + # MISS_HIT code metric check + - id: mh_metric + name: mh_metric + entry: mh_metric + args: [--ci] + files: ^(.*\.(m|slx))$ + language: python + additional_dependencies: [miss_hit_core] + # MISS_HIT code linting check + - id: mh_lint + name: mh_lint + entry: mh_lint + files: ^(.*\.(m|slx))$ + language: python + additional_dependencies: [miss_hit] diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..cbc5741 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog][keep_chglog], and this project adheres +to [Semantic Versioning][sem_ver]. + +## [Unreleased] + +### Added + +### Changed + +### Deprecated + +### Removed + +### Fixed + +[sem_ver]:<https://semver.org/spec/v2.0.0.html> +[keep_chglog]: <https://keepachangelog.com/en/1.0.0/> diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d0bc773 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 University of Liege + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Softwareâ€), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS ISâ€, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ecf8c8 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# MechaRaptor - Experimental data analysis + +This repository contains the script used to parse, clean and analyze the raw +experimental data for the MechaRaptor. + +## MechaRaptor + +A tandem flapping wing system. + +## Data + +The data come from three different sources: + +1. Wind tunnel itself (`<YYYY>-Serie<X>-Identification.csv`) + - airspeed + - atmospheric pressure + - the temperature +2. Wind tunnel load sensors (`wtFiles/`): + - Measure of forces and moments in three axes +3. Arduino acquisition (`arduinoFiles/`): + - Measure of wing angles + - Measure of electrical power (tension and current) + - Input values + +## Scripts + +### process_wt.m + +Analyse multiple WT data sets and compare them or plot their evolution. + +### process_arduino.m + +Analyse multiple arduino data sets and compare them or plot their evolution. + +### process_all.m + +Process both data together + +## License + +The Rotare Software is provided under the [MIT license](LICENSE). diff --git a/miss_hit.cfg b/miss_hit.cfg new file mode 100644 index 0000000..2747995 --- /dev/null +++ b/miss_hit.cfg @@ -0,0 +1,34 @@ +# miss_hit style checker +# (https://florianschanda.github.io/miss_hit/style_checker.html) +# +project_root + +# Ensure copyright notice is everywhere +copyright_primary_entity: "University of Liege" +copyright_entity: "Thomas Lambert <t.lambert@uliege.be>" +copyright_entity: "The Octave Project Developers" + +# Enable miss_hit on the whole repo +enable: 1 +enforce_encoding: "utf8" + +# Layout +line_length: 100 +tab_width: 4 + +# Regex to enforce naming convention +regex_script_name: "[a-z](_?[a-z0-9]+)*" +regex_function_name: "[a-z](_?[a-z0-9]+)*" +regex_nested_name: "[a-z](_?[a-z0-9]+)*" +regex_parameter_name: "[a-zA-Z](_?[a-zA-Z0-9]+)*" +regex_class_name: "[A-Z]([a-zA-Z0-9]+)*" +regex_method_name: "[a-z](_?[a-zA-Z0-9]+)*" + +# metrics limit for the code quality +# (https://florianschanda.github.io/miss_hit/metrics.html) +metric "cnest": limit 5 +metric "file_length": limit 800 +metric "cyc": limit 15 +metric "parameters": limit 10 +metric "globals": limit 0 +metric "persistent": limit 3 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..44bebfe --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +# Python requirements. +# THIS IS NOT NEEDED FOR SIMPLE USE OF THE SOFTWARE. +# These requirements are for managing automated testing and good code quality +# during the development. + +miss_hit # Matlab static code analysis +pre-commit # Easy setup of pre-commit hooks -- GitLab