fixes #82: added setuptools_scm to fix the issue #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #82 :
To resolve this issue, setuptools_scm is added to the test-optional dependencies in the pyproject.toml file. This ensures that setuptools_scm is installed when the test dependencies are installed, allowing the tests to run without errors.
Changes Made
The pyproject.toml file is updated to include setuptools_scm in the test-optional dependencies:
[project.optional-dependencies]
test = [
"setuptools_scm", # Added to resolve ModuleNotFoundError
"pytest",
# Other test dependencies
]
Why This Works
setuptools_scm: This package is used for version control and is required by the test environment to access specific files or functionality.
Test Dependencies: Adding setuptools_scm to the test-optional dependencies is automatically installed when running pip install -e ".[test]", ensuring that the test environment has all the necessary packages.
Steps to Verify
Install the project and test dependencies:
Commands: pip install -e .
pip install -e ".[test]"
Run the tests:
command: pytest
Confirm that the tests pass without any ModuleNotFoundError related to setuptools_scm.
Impact
Tests: Tests will now run successfully without requiring manual installation of setuptools_scm.
CI/CD: The CI/CD pipeline will also work correctly, as the test environment will have all the required dependencies.
Future Considerations
Ensure that all required dependencies are explicitly listed in pyproject.toml to avoid similar issues in the future.
Regularly update the dependencies to their latest compatible versions to maintain compatibility and security.
This solution ensures that the test environment is properly configured and that the issue is resolved both locally and in the CI/CD pipeline.