|
|
1 месяц назад | |
|---|---|---|
| .. | ||
| __mocks__ | 1 месяц назад | |
| apps | 1 месяц назад | |
| libs | 1 месяц назад | |
| tools | 1 месяц назад | |
| .editorconfig | 1 месяц назад | |
| .gitignore | 1 месяц назад | |
| .prettierignore | 1 месяц назад | |
| .prettierrc | 1 месяц назад | |
| .stylelintignore | 1 месяц назад | |
| .stylelintrc.json | 1 месяц назад | |
| README.md | 1 месяц назад | |
| babel.config.json | 1 месяц назад | |
| biome.json | 1 месяц назад | |
| components.json | 1 месяц назад | |
| design-tokens.json | 1 месяц назад | |
| feature_flags.json | 1 месяц назад | |
| jest.config.ts | 1 месяц назад | |
| jest.preset.js | 1 месяц назад | |
| learn.md | 1 месяц назад | |
| nx.json | 1 месяц назад | |
| package.json | 1 месяц назад | |
| postcss.config.js | 1 месяц назад | |
| pyproject.toml | 1 месяц назад | |
| release.js | 1 месяц назад | |
| tailwind.config.js | 1 месяц назад | |
| tsconfig.base.json | 1 месяц назад | |
| tsconfig.json | 1 месяц назад | |
| webpack.config.js | 1 месяц назад | |
| yarn.lock | 1 месяц назад | |
| 项目结构分析.md | 1 месяц назад | |
Label Studio is a complex, NX-managed project divided into three main components:
apps/labelstudio)This is the primary application that consolidates all frontend framework elements. It's the hub for integrating and managing the different libraries and functionalities of Label Studio.
libs/editor)Label Studio Frontend, developed with React and mobx-state-tree, is a robust frontend library tailored for data annotation. It's designed for seamless integration into your applications, providing a rich set of features for data handling and visualization. Customization and extensibility are core aspects, allowing for tailored annotation experiences.
libs/datamanager)Datamanager is an advanced tool specifically for data exploration within Label Studio. Key features include:
![]()
1 - Dependencies Installation:
yarn install --frozen-lockfile to install all necessary dependencies.2 - Environment Configuration (Optional for HMR):
.env file in the root Label Studio directory.FRONTEND_HMR=true: Enables Hot Module Replacement in Django.Optional configurations (defaults should work for most setups):
FRONTEND_HOSTNAME: HMR server address (default: http://localhost:8010).DJANGO_HOSTNAME: Django server address (default: http://localhost:8080).If using Docker Compose with HMR:
env_file: .env directive in docker-compose.override.yml under the app service.To start the development server with HMR:
web directory: Run yarn devmake frontend-dev.env.example file located in the DataManager directory and rename the copy to .env..env file. The key configurations to consider are:
NX_API_GATEWAY: Set this to your API root. For example, http://localhost:8080/api/dm.LS_ACCESS_TOKEN: This is the access token for Label Studio, which can be obtained from your Label Studio account page.yarn ls:dev: Build the main Label Studio app with Hot Module Reload for development.yarn ls:watch: Build the main Label Studio app continuously for development.yarn ls:e2e: Run end-to-end tests for the Label Studio app.yarn ls:unit: Run unit tests for the Label Studio app.yarn lsf:watch: Continuously build the frontend editor.yarn lsf:serve: Run the frontend editor standalone.yarn lsf:e2e: Run end-to-end tests for the frontend editor.yarn lsf:integration: Run integration tests for the frontend editor.yarn lsf:unit: Run unit tests for the frontend editor.yarn dm:watch: Continuously build Datamanager.yarn dm:unit: Run unit tests for Datamanager.yarn build: Build all apps and libraries in the project.yarn ui:serve: Serve the Storybook instance for the shared UI library.yarn test:e2e: Run end-to-end tests for all apps and libraries.yarn test:integration: Run integration tests for all apps and libraries.yarn test:unit: Run unit tests for all apps and libraries.yarn lint: Run biome linter across all files with autofix.yarn lint-scss: Run stylelint linter across all scss files with autofix.This project uses python pre-commit hooks to ensure code quality. To install the hooks, run make configure-hooks in the project root directory.
This will install the hooks and run them on every pre-push to ensure pull requests will be aligned with linting for both python and javascript/typescript code.
If for any reason you need to format or lint using the same pre-commit hooks directly, you can run make fmt or make fmt-check respectively from the project root directory.
| Project | Description | |----------------------------------|-| | label-studio | Server part, distributed as a pip package | | label-studio-frontend | Frontend part, written in JavaScript and React, can be embedded into your application | | label-studio-converter | Encode labels into the format of your favorite machine learning library | | label-studio-transformers | Transformers library connected and configured for use with label studio | | datamanager | Data exploration tool for Label Studio |
This software is licensed under the Apache 2.0 LICENSE © HumanSignal. 2020
