From 29adcd4b66196b3e0b2e0159f75ad21e15e35b1a Mon Sep 17 00:00:00 2001 From: LittleSong2025 <142714722+LittleSong2025@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:49:33 +0800 Subject: [PATCH 1/2] Add workflow to build core module --- .github/workflows/build-core-module.yml | 120 ++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .github/workflows/build-core-module.yml diff --git a/.github/workflows/build-core-module.yml b/.github/workflows/build-core-module.yml new file mode 100644 index 0000000..543cf99 --- /dev/null +++ b/.github/workflows/build-core-module.yml @@ -0,0 +1,120 @@ +name: Build Core Module + +on: + push: + branches: + - release/core-module-* + workflow_dispatch: + +jobs: + build-core-module: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12.4' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install hatch + + - name: Build core module + run: | + # Create a temporary directory for the core module + mkdir -p temp_core_module/src/hydrogenlib + + # Copy core module files + cp -r src/hydrogenlib/_hycore temp_core_module/src/hydrogenlib/ + cp -r src/hydrogenlib/_hyctypes temp_core_module/src/hydrogenlib/ + cp -r src/hydrogenlib/_hynet_structure temp_core_module/src/hydrogenlib/ + cp src/hydrogenlib/hycore.py temp_core_module/src/hydrogenlib/ + cp src/hydrogenlib/hyctypes.py temp_core_module/src/hydrogenlib/ + cp src/hydrogenlib/hynet_structure.py temp_core_module/src/hydrogenlib/ + cp src/hydrogenlib/__init__.py temp_core_module/src/hydrogenlib/ + cp src/hydrogenlib/__about__.py temp_core_module/src/hydrogenlib/ + + # Create pyproject.toml for core module + cat > temp_core_module/pyproject.toml << 'EOF' +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "HydrogenLib-Core" +dynamic = ["version"] +description = 'Core module of HydrogenLib' +readme = "README.md" +requires-python = ">=3.7.0" +keywords = [] +authors = [ + { name = "LittleSong2024", email = "LittleSong2024@outlook.com" }, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", +] +dependencies = [ + "jsonpickle >= 3.3.0", + "pyaes >= 1.6.0", + "rsa >= 4.9", + "psutil >= 6.0.0", + "rich >= 13.6.0", + "ping3 >= 4.0.0", + "bitarray", + "natsort", +] + +[project.urls] +Documentation = "https://github.com/LittleSong2024/HydrogenLib#readme" +Issues = "https://github.com/LittleSong2024/HydrogenLib/issues" +Source = "https://github.com/LittleSong2024/HydrogenLib" + +[tool.hatch.version] +path = "src/hydrogenlib/__about__.py" + +[tool.hatch.build] +target = "wheel" + +[tool.hatch.build.targets.wheel] +packages = ['src/hydrogenlib'] +EOF + + # Create README.md for core module + cat > temp_core_module/README.md << 'EOF' +# HydrogenLib Core Module + +This is the core module of HydrogenLib, containing essential components for basic operations. + +## Included Modules + +- `_hycore`: Core functionality +- `_hyctypes`: C types support +- `_hynet_structure`: Network structure utilities +- `hycore.py`: Core module interface +- `hyctypes.py`: C types interface +- `hynet_structure.py`: Network structure interface + +EOF + + # Build the core module + cd temp_core_module + hatch build + + # Upload artifacts + cd .. + mkdir -p artifacts + cp temp_core_module/dist/* artifacts/ + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: core-module + path: artifacts/* From e568d4e9e345ef6a02b21e92940c453fd7e43427 Mon Sep 17 00:00:00 2001 From: LittleSong2025 <142714722+LittleSong2025@users.noreply.github.com> Date: Sat, 4 Oct 2025 14:49:41 +0800 Subject: [PATCH 2/2] Add release notes for core module --- RELEASE.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..d823fcc --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,38 @@ +# HydrogenLib Core Module v0.2.1a1 Release + +This release contains the core module of HydrogenLib which includes essential components for basic operations. + +## Included Modules + +- `_hycore`: Core functionality +- `_hyctypes`: C types support +- `_hynet_structure`: Network structure utilities +- `hycore.py`: Core module interface +- `hyctypes.py`: C types interface +- `hynet_structure.py`: Network structure interface + +## Version Information + +- Version: v0.2.1a1 +- Type: Alpha release +- Branch: release/core-module-v0.2.1a1 + +## How to Use + +To use this core module, you can directly import the required components from the hydrogenlib package: + +```python +from hydrogenlib.hycore import SomeCoreClass +from hydrogenlib.hyctypes import SomeCType +from hydrogenlib.hynet_structure import SomeNetworkStructure +``` + +## Build Process + +This release was built using the GitHub Actions workflow defined in `.github/workflows/build-core-module.yml`. + +## Changelog + +- Initial release of the core module +- Extracted essential components from the main library +- Prepared for independent distribution \ No newline at end of file