Giter Club home page Giter Club logo

yorg-ai's Introduction

YORG AI

A brief description of the project.

How to install

  1. Clone the repository.

  2. Install the required dependencies using pip:

    pip install -r requirements.txt

Pre-Commit Hooks

The pre-commit git hooks consists on run some checks before confirm or commit your staged changes on the local repo, the .pre-commit-config.yml file contains the checks.
https://pre-commit.com/
https://pypi.org/project/pre-commit/

To set it up, you need to run this command on the root folder of the project

(venv)$ pre-commit install

It runs each time you try to commit your changes, or you can just run it manually

(venv)$ pre-commit run --all-files

The following local checks are implemented:

  • Linting with PyLint
(venv)$ pylint *

Usage

Start the application using the following command:

docker-compose up --build

If it fails: "set: illegal option -"

Try this: sed -i 's/\r$//' entrypoint.sh

Then, open your web browser and navigate to: http://localhost:8000/docs

Debug

VSCode

Debug Simple Node/Assignment

  1. Add debug configuration in .vscode/launch.json

    {
        "version": "0.2.0",
        "configurations": [
            {
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "port": 5678,
            "host": "localhost",
            "pathMappings": [
                {
                "localRoot": "${workspaceFolder}",
                "remoteRoot": "/app"
                }
            ]
            }
        ]
    }
  2. Add some breakpoints.

  3. Start the application using the following command:

    docker-compose -f docker-compose.debug.yml up
    
  4. Click Python: Remote Attach buttom in Run And Debug sidebar.

Debug startup.py

  1. Add debug configuration in .vscode/launch.json

    {
        "version": "0.2.0",
        "configurations": [
            {
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "port": 5678,
            "host": "localhost",
            "pathMappings": [
                {
                "localRoot": "${workspaceFolder}",
                "remoteRoot": "/app"
                }
            ]
            }
        ]
    }
  2. Run docker-compose up --build

  3. Run debug_startup.sh

  4. Click Python: Remote Attach buttom in Run And Debug sidebar.

Debug Jupyter YKernel

  1. Add debug configuration in .vscode/launch.json

    {
        "version": "0.2.0",
        "configurations": [
            {
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "port": 5678,
            "host": "localhost",
            "pathMappings": [
                {
                "localRoot": "${workspaceFolder}",
                "remoteRoot": "/app"
                }
            ]
            }
        ]
    }
  2. Modify kernel.json

{
    "argv": [
        "python",
        "-m",
        "debugpy",
        "--wait-for-client",
        "--listen",
        "0.0.0.0:5678",
        "-m",
        "src.service.ykernel.ykernel",
        "-f",
        "{connection_file}"
    ],
    "display_name": "YKernel"
}
  1. Run docker-compose up --build

  2. Click Python: Remote Attach buttom in Run And Debug sidebar.

Testing

To run the tests, execute the following command:

docker-compose exec fastapi python -m pytest -s src/tests

Contributing

  1. Fork the repository.

  2. Create a new branch:

    git checkout -b my-new-feature
  3. Make changes and commit them:

    git commit -am 'Add some feature'
  4. Push to the branch:

    git push origin my-new-feature
  5. Submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

yorg-ai's People

Contributors

etck avatar junkopf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.