GithubHelp home page GithubHelp logo

madeinoz67 / maker-hub Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 3.0 2.52 MB

Open Source Personal Hub for makers: Manage Parts, projects, ideas, documentation, parts and footprints etc

Home Page: https://madeinoz67.github.io/maker-hub/

License: MIT License

Shell 0.38% Dockerfile 2.24% Python 94.21% HTML 1.41% Makefile 1.67% CSS 0.10%
makers inventory-management kicad-footprints kicad mkdocs project-management maker-hub docker sqllite-database fastapi

maker-hub's Introduction

maker-hub

Personal Hub for makers, document, blog, track projects, ideas, documentation, parts and footprints etc

See the Project Documentation for more details.

Features

Our hit list of features:

  • Parts Database (under development)
  • Part Data Sheets
  • Part Images
  • Manage Projects
  • Project Documentation
  • Manage Storage Locations
  • Order tracking
  • OctoPart Integration
  • KiCAD footprints
  • KiCAD 3D Models
  • Runs in Docker container
  • Runs on Raspberry Pi

About

Maker Hub is being build on FastAPI https://fastapi.tiangolo.com/ and aims to be an open source platform for makers to manage their parts and projects at home.

Status

This project is only in the very early stages of Development and any help would be greatly appreciated.

Getting Started

To read the documentation

make install       # install project dependencies for the first time
make docs-serve    # make and view documentation

Open your browser: http://localhost:8000

Docker

currently this image is not available on docker hub due to the project status, however can be build locally.

  1. docker must be installed on the local machine
  2. clone this repo and make install dependencies (or make update if you already have a clone of the repo).
  3. docker compose up to build and run. will be available on http://localhost:8080/ try docker compose build --no-cache first if it is caching the local build
  4. docker compose down to stop.

Note: no volume mappings have been configured for the sqlite db this will be added shortly after database is operational.

maker-hub's People

Contributors

dependabot[bot] avatar jubbp avatar madeinoz67 avatar parkview avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

maker-hub's Issues

add local help

Serve up the mkdocs site as part of the local docker image

Changes that would be required:

  • build location would need to be moved to apps dir mkdocs.yml under apps/docs
  • /docs route would need to be added as static in main.py
  • docs icon and link to static pages needs to be added to the navbar template
  • mkdocs build will need to be added to DockerFile
  • github build-docs action / workflow may need to be updated with new location so pages sites gets updated

Add logging

Is your feature request related to a problem? Please describe.
Application needs logging to aid debugging and troubleshooting

Describe the solution you'd like
logging to standard sysout as well as optionally enabling log to an external logfile that could be submitted in a bug ticket

These settings are managed via a .env file

Look at using HTMX on frontend

HTMX is a lightweight dynamic frontend framework https://htmx.org/ that will fit the majority of our UI needs without the complexity of other frontend frameworks.

We should be able to utilise this instead of having to implement data tables and associated api as raised in issues #54 and #55

This can be implemented in the current templates without having backend data finished, i.e. use dummy data data from the service layer

When using ContextVars for db dependency injection all related tests are failing.

Describe the bug
When using dependency injection instead of passing the db dependency down through all the layers, a ContextVars is being used. Passing the db sessions via ContextVar over function parameters is working with no problems with the application and results in a cleaner solution.

However with testing, a context is setup in a fixture and is not being propagated to the underlying test, resulting in the underlying function not finding the required context and failing.

This issue is documented pytest-dev/pytest-asyncio#127 and a PR pytest-dev/pytest-asyncio#161

Expected behaviour
the test fixture should be propagating the ContextVar down to the test function so it available to the function under test

Screenshots

LookupError: <ContextVar name='db_session_context' at 0x1120f29a0>
tests/test_services/test_part_service.py:23: in test_part_get
    item: PartModel = await part_service.create_part(obj_in)  # noqa:
app/services/part_service.py:103: in create_part
    db_session: AsyncSession = db_session_context.get()
E   LookupError: <ContextVar name='db_session_context' at 0x1120f29a0>

--------------------------------- Captured Log ---------------------------------

--------------------------------- Captured Out ---------------------------------


--------------------------------- Captured Err ---------------------------------
INFO  [alembic.env] DETECTED aiosqlite driver, stripping from DATABASE_URL for migration
INFO  [alembic.env] Database URL: sqlite:///./tests/files/test.db
INFO  [alembic.env] Running migrations online
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> 9905971ce75e, Adds Parts Table
INFO  [alembic.env] DETECTED aiosqlite driver, stripping from DATABASE_URL for migration
INFO  [alembic.env] Database URL: sqlite:///./tests/files/test.db
INFO  [alembic.env] Running migrations online
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running downgrade 9905971ce75e -> , Adds Parts Table

Additional context
Should be resolved by this PR pytest-dev/pytest-asyncio#161

Update Application INFO Page with correct data

We need to look at displaying version information of packages in the running app to aid in bug reporting and troubleshooting.

At a minimium:
application version number
python version
fastapi version
sqllite driver version

Implement a Build Number

Is your feature request related to a problem? Please describe.
Currently there is no webpage that lists the current build that is running. While the CHANGELOG does list git tags of the repo, it's not visible via the make-hub webpage menu

Describe the solution you'd like
Investigate how to hook into a github action, to automate the generation of a build number. This number or token could then be be incorporated into the CHANGELOG file and into the help.pt template.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Ideally clicking on the maker-hub ? (help) menu icon (http://localhost:8080/help), will display the build number of what is running. There should be a link to the github maker-hub project page that displays the current build. This way people can see if they need to update the locally installed project

Ideally, (maybe should be lodged as another issue?), the local maker-hub should check the github maker-hub repo to see if a newer version have been released.

Write up and test how to install the project on a Raspberry Pi 4.

There are no current instructions on how to install and use this on a fresh Raspberry Pi platform.

Describe the solution you'd like

  1. how to install Docker, and install project via a Docker container
  2. how to install and user via a virtual environment and Poetry Shell

Ideally there might be a script (or two), that would complete either of the two installs.

Enable importation of a LCSC.com BOM purchase export

Describe the solution you'd like
I would like to be able to import a list of parts that have been purchased from lcsc.com

lcsc, allows you to export the a filled out BOM list of an order. It would really be handy to eventually be able to suck these in.

these might have to be placed in a temporary location, as they might not have arrived yet, or a location has yet to be designated.

Additional context
Here is an example of the downloaded CSV:
lcsc-com_order_export-example

LCSC_Exported_20210514_SE.xlsx

[FEATURE] - Add favicon to Docs site

Describe the solution you'd like
have the project icon appear as the favicon on the mkdocs built /Docs site

Additional context
icon already exists in the: static/img/favicon.ico of apps.

Consolidate CI workflows and actions

Is your feature request related to a problem? Please describe.
Currently there are a lot of individual workflows that do not wait on others to complete so contention can be experienced, e.g. docs build and deploy before change is updated

Describe the solution you'd like
A main CI workflow with sections e.g. linting, testing build etc that for a sequential workflow

Additional context
have a look at Pydantic project workflow as is exactly what' required

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.