Feature board for ERPNext

Overview

ERPNext Feature Board

Feature board for ERPNext

Development Prerequisites

Install K3d Cluster

# export K3D_FIX_CGROUPV2=1 # use in case of cgroup2, Arch Linux or latest kernels
k3d cluster create devcluster \
  --registry-config ./cluster/k3d-registries.yaml \
  --api-port 127.0.0.1:6443 \
  -p 80:80@loadbalancer \
  -p 443:443@loadbalancer \
  --k3s-server-arg "--no-deploy=traefik"

Install Docker Registry

docker volume create local_registry
docker container run -d \
  --name registry.localhost \
  -e "REGISTRY_STORAGE_DELETE_ENABLED=true" \
  -p 5000:5000 \
  -v local_registry:/var/lib/registry \
  --restart always \
  registry:2
docker network connect k3d-devcluster registry.localhost
docker login registry.localhost:5000 -u admin -p password

Add Helm Repo

helm repo add fluxcd https://charts.fluxcd.io
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

Install MariaDB

kubectl create ns mariadb
helm install mariadb -n mariadb bitnami/mariadb -f ./cluster/mariadb-values.yaml

Install NFS

kubectl create ns nfs
kubectl create -f ./cluster/nfs-server-provisioner/statefulset.dev.yaml
kubectl create -f ./cluster/nfs-server-provisioner/rbac.yaml
kubectl create -f ./cluster/nfs-server-provisioner/class.yaml

Install Redis

kubectl create ns redis
helm install redis -n redis bitnami/redis \
  --set auth.enabled=false \
  --set auth.sentinal=false \
  --set architecture=standalone \
  --set master.persistence.enabled=false

Install Helm Operator (Flux Helm Operator)

kubectl apply -f https://raw.githubusercontent.com/fluxcd/helm-operator/1.2.0/deploy/crds.yaml
kubectl create ns flux
helm upgrade -i helm-operator fluxcd/helm-operator \
  --namespace flux \
  --set helm.versions=v3

Create Namespace for application

kubectl create ns efb

Note: set kubernetes_namespace in site_config.json to use any other namespace.

Install Ingress Controller (Optional)

Follow this step to try out created sites locally on port 80 and 443.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.46.0/deploy/static/provider/cloud/deploy.yaml

Bench start

Install this app on a site and bench start, we'll call this site efb.localhost

Initialize Site

  • Add Github Repository, add the url and github personal access token
  • Sync Github Repository

License

MIT

Comments
  • migration error with whoosh

    migration error with whoosh

    Migrating board.castlecraft.co.in
    Updating DocTypes for frappe        : [========================================] 100%
    Updating DocTypes for erpnext_feature_board: [========================================] 100%
    Updating Dashboard for frappe
    Updating Dashboard for erpnext_feature_board
    Building search index for board.castlecraft.co.in
    Retrieving Routes                   : [==                                      ] 5%
    Traceback (most recent call last):
      File "/home/frappe/frappe-bench/commands/migrate.py", line 51, in <module>
        main()
      File "/home/frappe/frappe-bench/commands/migrate.py", line 44, in main
        migrate_sites()
      File "/home/frappe/frappe-bench/commands/migrate.py", line 35, in migrate_sites
        migrate()
      File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 95, in migrate
        build_index_for_all_routes()
      File "/home/frappe/frappe-bench/apps/frappe/frappe/search/website_search.py", line 128, in build_index_for_all_routes
        return ws.build()
      File "/home/frappe/frappe-bench/apps/frappe/frappe/search/full_text_search.py", line 37, in build
        self.build_index()
      File "/home/frappe/frappe-bench/apps/frappe/frappe/search/full_text_search.py", line 96, in build_index
        writer = ix.writer()
      File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/whoosh/index.py", line 464, in writer
        return SegmentWriter(self, **kwargs)
      File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/whoosh/writing.py", line 515, in __init__
        raise LockError
    whoosh.index.LockError
    

    Seems to be during migration from containers.

    opened by revant 1
  • Add a webview and user interactions for improvements

    Add a webview and user interactions for improvements

    • Web view (also allowed for Guest users)

      • show paginated Improvement list
      • on Improvement Form show PR url, status, and site name.
      • add a form/popup to initiate a "Moderation Request" referencing Improvement
      • keep track of "Moderation Request" by user on the form view
    • Webhooks

      • Required for automation after github PR is updated and developer fixes code after user review
      • Webhooks also adds "Moderation Request", to upgrade
      • Open PR and PR with active sites only, add "Moderation Request" on change of PR (commits, force-push)
    • "Moderation Request" Types

      • Initiate site for improvement
      • Upgrade site for improvement
      • Delete site for improvement
      • Add user (and set roles) in site for Improvement (use admin password)
    • Moderators can:

      • Respond to "Moderation Request", "act" on it or "deny/close"
      • Add user and set roles for the sites generated for PR
      • Trigger builds for PR
      • Trigger updated after PR is updated
      • Trigger tear down, if site generation results in Error, or PR is merged.
      • check error logs and report
    • Add moderator on invite

      • share invitation link, expires in configurable time
      • Filter by Domain
      • Access Improvements by domain

    Rename "Moderation Request" to something more meaningful.

    opened by Alchez 1
  • FileNotFoundError: [Errno 2] No such file or directory: './assets/js/item-dashboard.min.js'

    FileNotFoundError: [Errno 2] No such file or directory: './assets/js/item-dashboard.min.js'

    Check if it is error with setup or error with PR

    https://discuss.erpnext.com/t/how-to-improve-user-involvement-in-development-of-erpnext/75708/76?u=revant_one

    opened by revant 1
  • Not able to sync PR

    Not able to sync PR

    Error Log

    Traceback (most recent call last):
      File "/home/revant/frappe-bench/apps/frappe/frappe/model/base_document.py", line 363, in db_insert
        ), list(d.values()))
      File "/home/revant/frappe-bench/apps/frappe/frappe/database/database.py", line 146, in sql
        self._cursor.execute(query, values)
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py", line 148, in execute
        result = self._query(query)
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/cursors.py", line 310, in _query
        conn.query(q)
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 548, in query
        self._affected_rows = self._read_query_result(unbuffered=unbuffered)
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 775, in _read_query_result
        result.read()
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 1156, in read
        first_packet = self.connection._read_packet()
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 725, in _read_packet
        packet.raise_for_error()
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py", line 221, in raise_for_error
        err.raise_mysql_exception(self._data)
      File "/home/revant/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
        raise errorclass(errno, errval)
    pymysql.err.IntegrityError: (1062, "Duplicate entry 'feat-tax-deduction-against-advance-payments' for key 'PRIMARY'")
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/revant/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
        method(**kwargs)
      File "/home/revant/frappe-bench/apps/erpnext_feature_board/erpnext_feature_board/erpnext_feature_board/doctype/github_repository/github_repository.py", line 66, in create_repository_improvements
        update_improvement(pull, repository)
      File "/home/revant/frappe-bench/apps/erpnext_feature_board/erpnext_feature_board/erpnext_feature_board/doctype/github_repository/github_repository.py", line 87, in update_improvement
        improvement_doc.save()
      File "/home/revant/frappe-bench/apps/frappe/frappe/model/document.py", line 284, in save
        return self._save(*args, **kwargs)
      File "/home/revant/frappe-bench/apps/frappe/frappe/model/document.py", line 306, in _save
        self.insert()
      File "/home/revant/frappe-bench/apps/frappe/frappe/model/document.py", line 252, in insert
        raise e
      File "/home/revant/frappe-bench/apps/frappe/frappe/model/document.py", line 249, in insert
        self.db_insert()
      File "/home/revant/frappe-bench/apps/frappe/frappe/model/base_document.py", line 376, in db_insert
        raise frappe.DuplicateEntryError(self.doctype, self.name, e)
    frappe.exceptions.DuplicateEntryError: ('Improvement', 'feat-tax-deduction-against-advance-payments', IntegrityError(1062, "Duplicate entry 'feat-tax-deduction-against-advance-payments' for key 'PRIMARY'"))
    
    opened by revant 1
  • Architecture

    Architecture

    • This app will run in Kubernetes cluster
    • Cluster will host
    • kaniko will build and push the docker images
    • Install the builds with helm chart (helm operator), use custom values
    • wildcard subdomain ingress to a domain. (cert-manager+letsencrypt+dns01)
    opened by revant 1
  • refactored args for kaniko

    refactored args for kaniko

    --context=git://github.com/frappe/frappe_docker.git
    --context-sub-path=images/worker
    --build-arg=FRAPPE_REPO=https://github.com/frappe/frappe
    --build-arg=ERPNEXT_REPO=https://github.com/frappe/erpnext
    --build-arg=BENCH_REPO=https://github.com/frappe/bench
    --build-arg=FRAPPE_VERSION=v13.25.0
    --build-arg=ERPNEXT_VERSION=v13.25.1
    --build-arg=PYTHON_VERSION=3.9
    --target=erpnext
    
    opened by revant 0
  • Review Requests Logic

    Review Requests Logic

    • [x] Only allow Add test user for "Ready" improvements self.validate()
    • [x] Schedule Cron to delete Approved "Build", "Delete", "Upgrade"
    • [x] On "Build", "Delete", "Upgrade" Review Request for selected Improvement, Once the Improvement state is changed, change the state of all other same requests of same type on same improvement.
    • [x] Delete and Upgrade only allowed for Ready
    • [x] Build only allowed for No Deployment Status On improvement
    opened by revant 0
  • Create PR site user on request

    Create PR site user on request

    import requests
    import json
    
    s = requests.Session()
    s.post(f"{i.site_url}/api/method/login", data=json.dumps({"usr":"Administator","pwd":f"{i.site_admin_password}"}))
    user = {"email":"[email protected]", "first_name":"User", "new_password":"hello@123", "send_welcome_email":0, "roles":[{"role":"System Manager"}]}
    s.post(f"{i.site_url}/api/resource/User", data=json.dumps(user)).json()
    
    opened by revant 0
  • Add UI to trigger Build, Upgrade, Delete of PR site

    Add UI to trigger Build, Upgrade, Delete of PR site

    • No ui available to trigger the builds.
    • for initial testing bench console was used. and there are whitelisted functions in improvement.py that need to be called from frontend.
    opened by revant 0
  • Add fields to Improvement

    Add fields to Improvement

    • site_url: data
    • site_admin_password: data (needs to be visible)
    • deployment_status: select
      • Ready
      • Build Queued
      • Build Queue Failed
      • Building
      • Build Complete
      • Build Error
      • Release Queued
      • Release Queued Failed
      • Release Error
      • Upgrade Queued
      • Upgrade Queued Failed
      • Rebuilding
      • Rebuild Error
      • Rebuild Complete
      • Upgrading
      • Upgrading Failed
      • Upgrade Error
      • Delete Queued
      • Delete Queue Failed
    opened by revant 0
  • State based queue to schedule build, setup and teardown

    State based queue to schedule build, setup and teardown

    States of improvement:

    Ready: Set when Improvement is added

    Build Queued

    • Set by using whitelisted function.
    • Picked up by process_build_queue_improvements

    Build Queue Failed

    • process_build_queue_improvements sets "Build Queue" Improvements to "Build Queue Failed" if calling the create_build_image_job throws exception
    • Save Error Log

    Building

    • process_build_queue_improvements sets "Build Queue" Improvements to "Building" if create_build_image_job response is successful.

    Build Complete

    • process_building_improvements sets "Building" Improvements to "Build Complete" if get_job_status() returns job is complete.

    Build Error

    • process_building_improvements sets "Building" Improvements to "Build Error" if get_job_status() returns exception.

    Release Queued

    • process_build_complete_improvements sets "Build Complete" Improvements to "Release Queued" if create_helm_release() returns success.
    • set site credentials on Improvement

    Release Queued Failed

    • process_build_complete_improvements sets "Build Complete" Improvements to "Release Queued Failed" if create_helm_release() returns exception.

    Release Error

    • process_release_queued_improvements sets "Release Queued" to "Release Error" if get_helm_release_status() returns exception

    Ready

    • process_release_queued_improvements sets "Release Queued" to "Ready" if get_helm_release_status() returns exception

    Upgrade Queued

    • Set by user by whitelisted function call, allow only if Improvement has "site credential data"

    Upgrade Queued Failed

    • process_upgrade_queued_improvements sets "Upgrade Queued" to "Upgrade Queue Failed" if create_build_image_job() returns exception

    Rebuilding

    • process_upgrade_queued_improvements sets "Upgrade Queued" to "Rebuilding" if create_build_image_job() returns success

    Rebuild Error

    • process_rebuilding_improvements sets "Rebuilding" to "Rebuild Error" if get_job_status() returns failure

    Rebuild Complete

    • process_rebuilding_improvements sets "Rebuilding" to "Rebuild Complete" if get_job_status() returns success

    Upgrading

    • process_rebuild_complete_improvements sets "Rebuild Complete" to "Upgrading" if update_helm_release() returns success

    Upgrading Failed

    • process_rebuild_complete_improvements sets "Rebuild Complete" to "Upgrading Failed" if update_helm_release() returns error

    Upgrade Error

    • process_upgrading_improvements sets "Upgrading" to "Upgrade Error" if get_helm_release_status() returns failure

    Ready

    • process_upgrading_improvements sets "Upgrading" to "Ready" if get_helm_release_status() returns success

    Delete Queued

    • Set by user through whitelisted function

    Delete Queue Failed

    • process_delete_queued_improvements sets "Delete Queued" to "Delete Queue Failed" if tear_down_improvement_site_resources returns error

    [doc.remove]

    • process_delete_queued_improvements deletes "Delete Queued" if tear_down_improvement_site_resources returns error

    On error options:

    • contact admin
    • reset button, cleanup and teardown.

    List of cron functions to add

    • process_build_queue_improvements
    • process_building_improvements
    • process_build_complete_improvements
    • process_release_queued_improvements
    • process_upgrade_queued_improvements
    • process_rebuilding_improvements
    • process_rebuild_complete_improvements
    • process_upgrading_improvements
    • process_delete_queued_improvements
    opened by revant 0
Owner
Revant Nandgaonkar
Revant Nandgaonkar
Erpnext app for make employee salary on payroll entry based on one or more project with percentage for all project equal 100 %

Project Payroll this app for make payroll for employee based on projects like project on 30 % and project 2 70 % as account dimension it makes genral

Ibrahim Morghim 8 Jan 2, 2023
The Agriculture Domain of ERPNext comes with features to record crops and land

Agriculture The Agriculture Domain of ERPNext comes with features to record crops and land, track plant, soil, water, weather analytics, and even trac

Frappe 21 Jan 2, 2023
Python implementation of Lightning-rod Agent, the Stack4Things board-side probe

Iotronic Lightning-rod Agent Python implementation of Lightning-rod Agent, the Stack4Things board-side probe. Free software: Apache 2.0 license Websit

null 2 May 19, 2022
Automates Machine Learning Pipeline with Feature Engineering and Hyper-Parameters Tuning :rocket:

MLJAR Automated Machine Learning Documentation: https://supervised.mljar.com/ Source Code: https://github.com/mljar/mljar-supervised Table of Contents

MLJAR 2.4k Dec 31, 2022
RTS3D: Real-time Stereo 3D Detection from 4D Feature-Consistency Embedding Space for Autonomous Driving

RTS3D: Real-time Stereo 3D Detection from 4D Feature-Consistency Embedding Space for Autonomous Driving (AAAI2021). RTS3D is efficiency and accuracy s

null 71 Nov 29, 2022
PyTorch code for the paper: FeatMatch: Feature-Based Augmentation for Semi-Supervised Learning

FeatMatch: Feature-Based Augmentation for Semi-Supervised Learning This is the PyTorch implementation of our paper: FeatMatch: Feature-Based Augmentat

null 43 Nov 19, 2022
CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Detection in Remote Sensing Images

CFC-Net This project hosts the official implementation for the paper: CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Dete

ming71 55 Dec 12, 2022
Learning RGB-D Feature Embeddings for Unseen Object Instance Segmentation

Unseen Object Clustering: Learning RGB-D Feature Embeddings for Unseen Object Instance Segmentation Introduction In this work, we propose a new method

NVIDIA Research Projects 132 Dec 13, 2022
Genetic feature selection module for scikit-learn

sklearn-genetic Genetic feature selection module for scikit-learn Genetic algorithms mimic the process of natural selection to search for optimal valu

Manuel Calzolari 260 Dec 14, 2022
Feature extraction made simple with torchextractor

torchextractor: PyTorch Intermediate Feature Extraction Introduction Too many times some model definitions get remorselessly copy-pasted just because

Antoine Broyelle 89 Oct 31, 2022
Back to the Feature: Learning Robust Camera Localization from Pixels to Pose (CVPR 2021)

Back to the Feature with PixLoc We introduce PixLoc, a neural network for end-to-end learning of camera localization from an image and a 3D model via

Computer Vision and Geometry Lab 610 Jan 5, 2023
You Only Look One-level Feature (YOLOF), CVPR2021, Detectron2

You Only Look One-level Feature (YOLOF), CVPR2021 A simple, fast, and efficient object detector without FPN. This repo provides a neat implementation

qiang chen 273 Jan 3, 2023
[CIKM 2019] Code and dataset for "Fi-GNN: Modeling Feature Interactions via Graph Neural Networks for CTR Prediction"

FiGNN for CTR prediction The code and data for our paper in CIKM2019: Fi-GNN: Modeling Feature Interactions via Graph Neural Networks for CTR Predicti

Big Data and Multi-modal Computing Group, CRIPAC 75 Dec 30, 2022
Implementation of our paper 'RESA: Recurrent Feature-Shift Aggregator for Lane Detection' in AAAI2021.

RESA PyTorch implementation of the paper "RESA: Recurrent Feature-Shift Aggregator for Lane Detection". Our paper has been accepted by AAAI2021. Intro

null 137 Jan 2, 2023
Official implementation for (Refine Myself by Teaching Myself : Feature Refinement via Self-Knowledge Distillation, CVPR-2021)

FRSKD Official implementation for Refine Myself by Teaching Myself : Feature Refinement via Self-Knowledge Distillation (CVPR-2021) Requirements Pytho

null 75 Dec 28, 2022
Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021

LoFTR: Detector-Free Local Feature Matching with Transformers Project Page | Paper LoFTR: Detector-Free Local Feature Matching with Transformers Jiami

ZJU3DV 1.4k Jan 4, 2023
Joint deep network for feature line detection and description

SOLDĀ² - Self-supervised Occlusion-aware Line Description and Detection This repository contains the implementation of the paper: SOLDĀ² : Self-supervis

Computer Vision and Geometry Lab 427 Dec 27, 2022
Neural Reprojection Error: Merging Feature Learning and Camera Pose Estimation

Neural Reprojection Error: Merging Feature Learning and Camera Pose Estimation This is the official repository for our paper Neural Reprojection Error

Hugo Germain 78 Dec 1, 2022
CondenseNet V2: Sparse Feature Reactivation for Deep Networks

CondenseNetV2 This repository is the official Pytorch implementation for "CondenseNet V2: Sparse Feature Reactivation for Deep Networks" paper by Le Y

Haojun Jiang 74 Dec 12, 2022