Development
This section provides guidelines for those who want to contribute to the Alt-Ctrl-Proj library.
Setting Up Development Environment
Clone the repository:
git clone https://github.com/osama-ata/Alt-Ctrl-Proj.git cd Alt-Ctrl-Proj
Create and activate a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On Unix or MacOS source venv/bin/activate
Install development dependencies:
pip install -e ".[dev]"
Project Structure
The repository is organized as follows:
xer_parser/: Main package directory -model/: Contains data models for XER entitiesclasses/: Individual entity classes (Task, Resource, etc.)
dcma14/: DCMA 14-point schedule assessment implementationreader.py: Core functionality for parsing XER fileswrite.py: Functionality for writing to XER format
tests/: Test suite -fixtures/: Test data including sample XER files -test_*.py: Test modulesdocs/: Documentation
Development Workflow
Create a feature branch:
git checkout -b feature/your-feature-name
Make your changes, following coding standards.
Add tests for your changes in the
tests/directory.Run the test suite:
pytest
Check code quality:
mypy xer_parser ruff check xer_parser
Update documentation if necessary.
Submit a pull request.
Coding Standards
Follow PEP 8 style guidelines.
Add type hints to all functions and methods.
Write NumPy-style docstrings for all modules, classes, functions, and methods.
Write tests for new functionality.
Example NumPy-style Docstring
def example_function(param1: int, param2: str) -> bool:
"""
Brief description of the function.
Extended description with more details about what
the function does, how it works, etc.
Parameters
----------
param1 : int
Description of param1
param2 : str
Description of param2
Returns
-------
bool
Description of return value
Raises
------
ValueError
When param1 is negative
Examples
--------
>>> example_function(1, "test")
True
"""
# Function implementation here
Documentation
Documentation is built using Sphinx with the Napoleon extension for NumPy-style docstrings.
To build the documentation:
cd docs
make html
The generated HTML documentation will be in docs/build/html/.
Release Process
Update the version number in
pyproject.toml.Update
CHANGELOG.mdfollowing the Keep a Changelog format.Create a new Git tag:
git tag -a v1.x.x -m "Version 1.x.x" git push origin v1.x.x
Build and upload the package to PyPI:
python -m build python -m twine upload dist/*