This document contains information for developers working on the BAS CPU Affinity Manager project, including build instructions, release procedures, and development workflows.
To work on this project, you'll need the following tools installed on your system:
- Python: Version 3.10 or newer
- Install from python.org
- Ensure you add Python to your PATH during installation
- Poetry: For dependency management and packaging
- Install using the official installer:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - - Or via pip:
pip install poetry
- Install using the official installer:
- Make: For running development commands
- Install using GnuWin32
- Or via Chocolatey:
choco install make
- Git: For version control, install from git-scm.com or
via Chocolatey
- Or via Chocolatey:
choco install git
- Or via Chocolatey:
- Windows OS: This project is designed to work only on Windows systems
# Clone the repository
git clone git@github.com:sergerdn/bas-set-cpu-affinity.git
cd bas-set-cpu-affinity
# Install dependencies
poetry installThe project uses several tools to maintain code quality:
# Check code for style issues without fixing them
make lint
# Automatically fix code style issues
make lint_fix# Build the Python package (creates wheel and source distribution)
make build# Build a standalone executable
make build_executableThe executable will be created in the dist directory.
This project uses Commitizen for versioning and changelog generation.
We follow the Conventional Commits specification for commit messages:
<type>(<scope>): <subject>
<body>
<footer>
Types include:
feat: A new featurefix: A bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or fixing testsbuild: Changes to a build system or dependenciesci: Changes to CI configurationchore: Other changes that don't modify src or test files
-
Make sure all your changes are committed
-
Bump the version and update the changelog:
make bump_version
This will:
- Determine the next version based on commit messages
- Update version in all configured files
- Update the CHANGELOG.md file
- Create a git tag
-
Push the changes and tag:
git push git push --tags
-
Prepare the release files:
make prepare_release
This will:
- Clean the build artifacts
- Run linting checks
- Build the executable
-
Create a GitHub release:
- Go to the GitHub repository's Releases page
- Create a new release from the tag
- Upload the executable from the
distdirectory - Add release notes (you can copy from the CHANGELOG.md file)
make build: Build the packagemake install: Install the packagemake run: Run the tool with default parametersmake build_executable: Build a standalone executablemake clean: Clean build artifactsmake lint: Check code for style issues without fixing themmake lint_fix: Automatically fix code style issuesmake prepare_release: Prepare files for GitHub release (cleans, lints, and builds executable)make bump_version: Bump version and update changelogmake bump_version_major: Bump major versionmake bump_version_minor: Bump minor versionmake bump_version_patch: Bump patch version