feat: Initial commit#1
Conversation
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| strategy: | ||
| matrix: | ||
| include: | ||
| - name: python-version-3-10 | ||
| python_version: '3.10' | ||
| push_tag: false | ||
| upload_package: false | ||
| continue-on-error: true | ||
| - name: python-version-3-13 | ||
| python_version: '3.13' | ||
| push_tag: true | ||
| upload_package: true | ||
| continue-on-error: true | ||
| uses: ./.github/workflows/build_upload_whl.yml | ||
| secrets: | ||
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
| with: | ||
| REPOSITORY_NAME: ${{ github.repository }} | ||
| BRANCH_NAME: ${{ github.ref_name }} | ||
| PYTHON_VERSION: ${{ matrix.python_version }} | ||
| PUSH_TAG: ${{ matrix.push_tag }} | ||
| RELEASE_BUILD: true | ||
| UPLOAD_PACKAGE: ${{ matrix.upload_package }} | ||
| GIT_USER: 'mfd-intel-bot' | ||
| GIT_EMAIL: 'mfd_intel_bot@intel.com' | ||
| PROJECT_NAME: 'mfd-model' No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 year ago
To fix the issue, add a permissions block to the workflow to explicitly define the least privileges required for the tasks performed. Since the workflow involves pushing tags and uploading packages, the permissions should include contents: read and packages: write. This ensures that the GITHUB_TOKEN has only the necessary permissions.
The permissions block should be added at the root level of the workflow to apply to all jobs. Alternatively, it can be added to the specific job (build_upload_whl) if different jobs require different permissions.
| @@ -3,2 +3,5 @@ | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
Signed-off-by: Baczek, Arkadiusz <arkadiusz.baczek@intel.com>
|
We don't publish DEVs .whl. |
1 similar comment
|
We don't publish DEVs .whl. |
There was a problem hiding this comment.
Pull Request Overview
This PR establishes the initial structure of the mfd_model library by adding CI/CD workflows, documentation scaffolding, optional-dependency management, core Pydantic models for NVM and artifacts, configuration models, and selective unit tests for NVM and artifacts modules.
- Introduce reusable GitHub Actions workflows for build, release, PR checks, and CodeQL scanning
- Add documentation files (
README.md,AUTHORS.md, Sphinx placeholders, and contributing guidelines) - Create foundational code in
mfd_model/(NVM, artifacts manager, config) and add unit tests for NVM and artifacts models
Reviewed Changes
Copilot reviewed 36 out of 39 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/build_upload_whl.yml | Reusable workflow for building and uploading wheels |
| .github/workflows/manual_release.yml | Manual-release workflow calling reusable build |
| .github/workflows/pull_requests.yml | PR-triggered development build workflow |
| .github/workflows/codeql.yml | CodeQL security scanning workflow |
| AUTHORS.md | New contributors list |
| LICENSE.md | MIT license file |
| README.md | Project overview, subpackage instructions |
| CONTRIBUTING.md | Updated project name and license link |
| requirements-test.txt, requirements-docs.txt, etc. | Dependency files for tests, docs, dev |
| pyproject.toml | Project metadata, optional dependencies |
| mfd_model/nvm/models.py | NVM-related Pydantic models |
| mfd_model/artifacts_manager/models.py | Artifact manager Pydantic models |
| mfd_model/artifacts_manager/data_structures.py | Enums and literals for artifacts manager |
| mfd_model/config/models.py | Configuration Pydantic models |
| sphinx-doc/index.rst, py-modindex.rst, genindex.rst | Sphinx documentation placeholders |
| sphinx-doc/generate_docs.py, conf.py, Makefile, README.md | Sphinx build scripts and docs instructions |
| examples/simple_example.py | Basic usage example |
| tests/unit/test_mfd_model/_test_nvm/_test_models.py | Unit tests for NVM models |
| tests/unit/test_mfd_model/_test_artifacts_manager/_test_models.py | Unit tests for ArtifactRequest |
Comments suppressed due to low confidence (3)
mfd_model/config/models.py:1
- The new configuration models (e.g., InstantiateBaseModel, SchemaMetadata, IPModel, etc.) currently have no unit tests. Consider adding tests to verify key validation logic and schema behaviors in mfd_model/config/models.py.
# Copyright (C) 2025 Intel Corporation
mfd_model/artifacts_manager/models.py:19
- Several data models in artifacts_manager (ArtifactInfo, ContainerInfo, ArtifactVersionInfo, ReleaseInfo, ArtifactPathInfo, BuildDownloadInfo) lack dedicated tests. Adding unit tests for these structures will improve confidence in serialization and validation behavior.
class ArtifactInfo(BaseModel):
mfd_model/artifacts_manager/data_structures.py:15
- [nitpick] The enum member DOWNLOADING_FROM_SHARE uses spaces and an ellipsis in its string value, whereas other statuses are single words. For consistency, consider aligning its format (e.g., 'DOWNLOADING_FROM_SHARE...' or 'DOWNLOADING_FROM_SHARE').
DOWNLOADING_FROM_SHARE = "DOWNLOADING FROM SHARE..."
This pull request introduces several new workflows, updates documentation, and adds foundational code for the
mfd_modellibrary. The most significant changes include the addition of reusable GitHub Actions workflows for CI, manual releases, and pull request builds, as well as the creation of models and data structures for theartifacts_managermodule. Documentation updates include the addition of authorship information, licensing details, and improved README content.GitHub Actions Workflows:
.github/workflows/build_upload_whl.yml: Added a reusable workflow for building and uploading Python wheel files, including version bumping, testing, and optional PyPI publishing..github/workflows/manual_release.yml: Added a manual release workflow that utilizes the reusablebuild_upload_whl.ymlworkflow for release builds..github/workflows/pull_requests.yml: Added a workflow for building wheel files during pull requests, targeting development builds..github/workflows/codeql.yml: Added a CodeQL analysis workflow for security scanning across supported languages.Documentation Updates:
AUTHORS.md: Added a new file listing contributors to the project.LICENSE.md: Added the MIT license for the project.README.md: Enhanced project description, including installation instructions, subpackage details, and issue reporting guidelines.CONTRIBUTING.md: Updated license details to reflect the project's name and link to the license file.Code Additions for
mfd_model:mfd_model/artifacts_manager/models.py: Added models for handling artifact-related data, includingArtifactRequest,DownloadRequest, andBuildDownloadInfo. Incorporated Pydantic validators for data validation.mfd_model/artifacts_manager/data_structures.py: Defined enums and literals for artifact-related operations, such asDownloadStatusandSUPPORTED_EXTENSIONS.mfd_model/artifacts_manager/__init__.py: Set up module initialization and importedArtifactRequest.examples/simple_example.pyandmfd_model/__init__.py: Added copyright headers and basic module descriptions. [1] [2]