Skip to content

Commit

Permalink
- Upgraded to Vite
Browse files Browse the repository at this point in the history
- Improved README
- Updated various npm libraries
- Removed obsolete npm libraries
- Added beautifying
  • Loading branch information
PavlosIsaris committed May 28, 2024
1 parent 22b4d90 commit 2add933
Show file tree
Hide file tree
Showing 35 changed files with 5,326 additions and 18,111 deletions.
30 changes: 8 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -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"],
};
2 changes: 1 addition & 1 deletion .github/workflows/vue-deploy-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v20
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
node_modules
src/assets/*.png
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 120,
"trailingComma": "all",
"singleQuote": false,
"proseWrap": "always",
"tabWidth": 4,
"useTabs": true,
"bracketSpacing": true,
"semi": true
}
6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
93 changes: 93 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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/
78 changes: 68 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,55 @@
[![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.

A demo (in English and Greek) can be found [here](https://go.scify.gr/teach-thalis-the-robot).

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/).

<div>Icons made by <a href="https://www.flaticon.com/authors/mavadee" title="mavadee">mavadee</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>

## 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
Expand All @@ -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 <branch_name>`.
4. Make your changes and commit them: `git commit -m '<commit_message>'`
5. Push to the original branch: `git push origin <project_name>/<location>`
6. Create the pull request.


## Changelog

./deploy.sh
```
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
presets: [ [ "@vue/app", { useBuiltIns: "entry" } ] ]
};
4 changes: 2 additions & 2 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="/favicon.ico">
<title>Machine Learning</title>
<link rel="canonical" href="https://ai.scify.org/courses/decision-trees/"/>
<meta name="title" content="Θαλής - Εισαγωγή στα δένδρα απόφασης">
Expand Down Expand Up @@ -35,7 +35,7 @@
content="ai, machine-learning, decision-trees, ml, artificial-intelligence">

<meta name="language" content="el-GR">
 
<script type="module" src="/src/main.js"></script>
</head>
<body>
<noscript>
Expand Down
Loading

0 comments on commit 2add933

Please sign in to comment.