tomrtk / fish-code

Application to detect objects and show results via a web interface or export to CSV.
GNU General Public License v3.0
14 stars 4 forks source link

Enable auto publishing of new versions #600

Closed MindTooth closed 10 months ago

MindTooth commented 1 year ago

See if we can automate release of new versions.

Try something like https://github.com/nrkno/github-workflow-semantic-release which uses semantic-release.

tomrtk commented 1 year ago

how do this work compared to how it is today? a new release is made if we push a new version tag. I guess mostly with how change log is generated and auto tagging?

MindTooth commented 1 year ago

You know what, I forgot about the existing one. 🤣

semantic-release will auto tag based on conventional commits and automatically provide a changelog in the release. I can't seem to find that gh-release provides this?


It is a possibility to integrate git-cliff to create a changelog from which can be included in the release using the action above.

Example:

`git cliff --config pyproject.toml --tag 1.3.0 --unreleased`: ``` ## [1.3.0] - 2023-07-28 ### Build - Bump actions/setup-python from 3 to 4 - Bump wagoid/commitlint-github-action from 4.1.12 to 5.0.2 - Bump wagoid/commitlint-github-action from 5.0.2 to 5.2.0 - Bump wagoid/commitlint-github-action from 5.2.0 to 5.2.2 - Bump wagoid/commitlint-github-action from 5.2.2 to 5.3.0 - Bump minimatch from 3.0.4 to 3.0.8 in /src/ui - Bump wagoid/commitlint-github-action from 5.3.0 to 5.3.1 - Bump wagoid/commitlint-github-action from 5.3.1 to 5.4.1 - Bump the ui-deps group in /src/ui with 17 updates - Bump the ui-deps group in /src/ui with 2 updates (#596) - Bump wagoid/commitlint-github-action from 5.4.1 to 5.4.3 (#597) ### Chore - Disable mypy check for tests - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Update package.json deps version - Rebuild dist - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate (#530) - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Fix pre-commit - Remove makefile & references to it - Update pre-commit hooks - Pre-commit autoupdate (#559) - Pre-commit autoupdate - Pre-commit autoupdate - Cleanup & reorder pre-commit - Pyupgrade to versjon 3.9 - Pre-commit autoupdate - Add autoflake8 & reorder hooks - Change from flake8 to ruff - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Pre-commit autoupdate - Add back black and tweak ruff - Remove obsolete dev deps - Pre-commit autoupdate - Remove obsolete @types/datatables.net - Pre-commit autoupdate (#599) ### Ci - Support manual trigger - Cache torch hub downloads - Update release workflow - Test groups in dependabot - Add basic build and test workflow for ui (#591) ### Docs - Update readme - Update user manual - Add link to dataset and cite section to readme ### Feat - Convert to pyproject.yaml ### Fix - Fix coverage error - Remove dead code - Use single quote for jinja2 - Fix mutable arguments and abstract class - Update flask & uvicorn - Update yolov5 - Update torch(vision) - Update flask - Unblock ci test run - Run ruff --fix for comforming to ruff - Migrate pydantic to v2 - Shadow variable and missing docstring - Normalize path input for jstree tree (#598) ### Refactor - Remove LFS from ci - Core.repository to use Protocol ### Style - Pre-commit.ci auto fix - Tweak editorconfig - Pre-commit.ci auto fix - Pre-commit.ci auto fix - Apply changes from autoflakes - Pre-commit.ci auto fix - Pre-commit.ci auto fix - Apply latest changes to black and ruff ### Test - Fix tox config for windows - Bump tox to version 4 - Tweak platform conditial included tests - Use python 3.9 & 3.10 for testing - Integration tests fixture scope ```

With some tweaks to make it more pretty. A bit noicy with all pre-commit changes. Which I guess is also a reason to tag more often I guess. Using e.g. semantic release. 🤷🏻‍♂️


Anyhow, we need to create the pipeline to build the UI with each release. As it's now just a pre-bundled dist folder which does not get updated with NPM package upgrades. I'll see more into fixing this.

MindTooth commented 1 year ago

I've started the job on looking into how we can build the assets. Ended up in a rapid hole. 😅

Already located some stuff I want to change in preparation for changes related to this.

tomrtk commented 1 year ago

To build the assets, is there any more then what is done in build-ui action needed?

edit: I was also considering, we may want to test install the produced wheel in the release workflow

MindTooth commented 1 year ago

Simplistic terms, no.

However, current setup is made way back. I’ve been looking into trying to improve it. Also I noticed that e.g. postcss-url hasn’t been updated for ages. I’m trying to clean stuff up.

Currently dist/ isn’t safe to delete. Been looking into using pnpm instead which is a ton faster. Using ViteJS, or maybe more of esbuild. Looking at something.