|
| 1 | +<div align="center"> |
| 2 | + <picture> |
| 3 | + <source media="(prefers-color-scheme: dark)" srcset="../readme_files/swanlab-logo-single-dark.svg"> |
| 4 | + <source media="(prefers-color-scheme: light)" srcset="../readme_files/swanlab-logo-single.svg"> |
| 5 | + <img alt="SwanLab" src="../readme_files/swanlab-logo-single.svg" width="70" height="70"> |
| 6 | + </picture> |
| 7 | +</div> |
| 8 | + |
| 9 | +# swanlab-core: A new backend for SwanLab SDK |
| 10 | + |
| 11 | +To address the challenges posed by Python's asynchronous programming, we introduced swanlab-core, a brand-new, Go-based backend for metric uploading. |
| 12 | + |
| 13 | + |
| 14 | +## IDE & Development Setup |
| 15 | + |
| 16 | +In this part, we will guide you through the process of setting up your IDE and development environment for SwanLab SDK. |
| 17 | +We will use: |
| 18 | +1. [GoLand](https://www.jetbrains.com/go/) as the IDE. |
| 19 | +2. [Go](https://go.dev/) as the programming language. |
| 20 | +3. [golangci-lint](https://golangci-lint.run/) as the linter. |
| 21 | + |
| 22 | +## IDE |
| 23 | + |
| 24 | +We request using GoLand as the IDE for swanlab-core development. |
| 25 | +It provides a rich set of features for Go development, including code completion, debugging, and integration with version control systems. |
| 26 | + |
| 27 | +There is the code template for Go file in GoLand: |
| 28 | + |
| 29 | +```text |
| 30 | +package ${GO_PACKAGE_NAME} |
| 31 | +
|
| 32 | +// @Title ${FILE_NAME} |
| 33 | +// @Description |
| 34 | +// @Create cunyue ${DATE} ${TIME} |
| 35 | +``` |
| 36 | + |
| 37 | +## Linter |
| 38 | + |
| 39 | +We use [golangci-lint](https://golangci-lint.run/) as the linter for swanlab-core development. |
| 40 | +Since SwanLab is a Python project, some developers may not be very familiar with the Go language. |
| 41 | +Therefore, golangci-lint is not mandatory and will only trigger this CI when changes are made to the core part. |
| 42 | + |
| 43 | +If you plan to develop swanlab-core, configure the golangci-lint integration in GoLand, which can be found under Go -> Linter settings. |
| 44 | + |
| 45 | +## Env |
| 46 | + |
| 47 | +TODO |
| 48 | + |
0 commit comments