diff --git a/.eslintrc.js b/.eslintrc.js index 250a13b..8ed42a4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,32 +1,18 @@ module.exports = { root: true, env: { - node: true + node: true, + es2022: true, }, rules: { "no-console": process.env.NODE_ENV === "production" ? "error" : "off", "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", - "indent": [ - "error", - 4 - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ] + indent: ["error", 4], + "linebreak-style": ["error", "unix"], + quotes: ["error", "double"], + semi: ["error", "always"], + "vue/multi-word-component-names": "off", }, parser: "vue-eslint-parser", - extends: [ - "plugin:vue/essential", - 'eslint:recommended', - "prettier" - ], + extends: ["plugin:vue/essential", "eslint:recommended", "prettier"], }; diff --git a/.github/workflows/vue-deploy-github-pages.yml b/.github/workflows/vue-deploy-github-pages.yml index e6581df..429096f 100644 --- a/.github/workflows/vue-deploy-github-pages.yml +++ b/.github/workflows/vue-deploy-github-pages.yml @@ -33,7 +33,7 @@ jobs: - name: Set up the NodeJS environment uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 20 # Runs a single command using the runners shell - name: Intro diff --git a/.nvmrc b/.nvmrc index 958b5a3..9a2a0e2 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v14 +v20 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..fa83adb --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +dist +node_modules +src/assets/*.png \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..dee7705 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 120, + "trailingComma": "all", + "singleQuote": false, + "proseWrap": "always", + "tabWidth": 4, + "useTabs": true, + "bracketSpacing": true, + "semi": true +} \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 3cd85f9..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "trailingComma": "es5", - "tabWidth": 4, - "semi": true, - "singleQuote": false -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9a4d9f1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to `myeic-common-lib` will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + +## v3.0.1 - Upgrade to Vite - 2024-05-28 + +- The project now uses Vite as the build tool. This will allow for faster builds and better performance. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..82531f4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,93 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## 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 [INSERT EMAIL ADDRESS]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and 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/ diff --git a/README.md b/README.md index fdcb7bd..f5a81e1 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,24 @@ [![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://GitHub.com/scify) [![Vue Deploy to GitHub Pages](https://github.com/scify/Machine-Learning-Decision-Trees-Robot/actions/workflows/vue-deploy-github-pages.yml/badge.svg?branch=master&event=push)](https://github.com/scify/Machine-Learning-Decision-Trees-Robot/actions/workflows/vue-deploy-github-pages.yml) +## Table of Contents + +- [About](#about) +- [Pre-setup steps](#pre-setup-steps) +- [Project setup](#project-setup) +- [Compile and hot-reload for development](#compile-and-hot-reload-for-development) +- [Compile and minify for production](#compile-and-minify-for-production) +- [Run your tests](#run-your-tests) +- [Lints and fixes files](#lints-and-fixes-files) +- [Beautify files](#beautify-files) +- [Deploy to GitHub Pages](#deploy-to-github-pages) +- [License](#license) +- [Acknowledgements](#acknowledgements) +- [Contributing](#contributing) +- [Changelog](#changelog) + +## About + This is a playground for Machine Learning. It visualises a simple example in which the user is prompted to enrich the training set of a Decision Tree algorithm. @@ -14,27 +32,30 @@ A demo (in English and Greek) can be found [here](https://go.scify.gr/teach-thal This project uses the [decision-tree-js](https://github.com/lagodiuk/decision-tree-js) library. -All dataset images are royalty-free and were taken from [Pexels](https://www.pexels.com/) and [Unsplash](https://unsplash.com/). +All dataset images are royalty-free and were taken from [Pexels](https://www.pexels.com/) +and [Unsplash](https://unsplash.com/).
Icons made by mavadee from www.flaticon.com is licensed by CC 3.0 BY
## Pre-setup steps -It is very easy to install multiple versions of nodejs and npm, by using [Node Version Manager (nvm)](https://github.com/creationix/nvm). +It is very easy to install multiple versions of `NodeJS` and `npm`, by +using [Node Version Manager (nvm)](https://github.com/creationix/nvm). -Make sure the right NodeJS and npm versions are installed: +Make sure the right `NodeJS` and `npm` versions are installed: ```bash nvm install lts/fermium # (or nvm install v14.21.1) node -v -v14.21.1 +v20.13.1 npm -v -6.14.17 +10.17.0 ``` -Alternatively, if you are using [`nvm`](https://github.com/nvm-sh/nvm), run this command in order to sync to the correct NodeJS version for the project: +Alternatively, if you are using [`nvm`](https://github.com/nvm-sh/nvm), run this command in order to sync to the +correct `NodeJS` version for the project: ```bash nvm use @@ -55,29 +76,66 @@ cp .env.example .env ``` ## Compile and hot-reload for development + ```bash npm run serve ``` ## Compile and minify for production + ```bash npm run build ``` ## Run your tests + ```bash npm run test ``` ## Lints and fixes files + ```bash npm run lint ``` -## Deploy to GitHub Pages +## Beautify files ```bash -chmod +x deploy.sh +npm run format +``` + +## Deploy to GitHub Pages + +This application is deployed to GitHub Pages using the Deploy to GitHub Pages GitHub Action. + +This action is triggered by a push to the `master` branch, and is defined in +the `.github/workflows/vue-deploy-github-pages.yml` file. + +## License + +This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details. + +## Acknowledgements + +- [decision-tree-js](https://github.com/lagodiuk/decision-tree-js) +- [Pexels](https://www.pexels.com/) +- [Unsplash](https://unsplash.com/) +- [Flaticon](https://www.flaticon.com/) +- [Vue.js](https://vuejs.org/) + +## Contributing + +To contribute to this application, follow these steps: + +1. Fork this repository. +2. Read the [CONTRIBUTING](CONTRIBUTING.md) file. +3. Create a branch: `git checkout -b `. +4. Make your changes and commit them: `git commit -m ''` +5. Push to the original branch: `git push origin /` +6. Create the pull request. + + +## Changelog -./deploy.sh -``` \ No newline at end of file +Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. \ No newline at end of file diff --git a/babel.config.js b/babel.config.js index 727402e..806425e 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ] + presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ] }; diff --git a/public/index.html b/index.html similarity index 96% rename from public/index.html rename to index.html index ad4c6bf..010e3a0 100644 --- a/public/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + Machine Learning @@ -35,7 +35,7 @@ content="ai, machine-learning, decision-trees, ml, artificial-intelligence"> -   +