If you are looking to get started or want to propose a change please start by checking current or filing a new issue.
-
clone your fork and enter the directory
$ git clone [email protected]:<your username>/pyttb.git $ cd pyttb
- setup your desired python environment as appropriate
-
install dependencies
$ pip install -e ".[dev]" $ make install_dev # shorthand for above
-
Checkout a branch and make your changes
git checkout -b my-new-feature-branch
-
Formatters and linting
- Run autoformatters from root of project (they will change your code)
$ isort . $ black .
- We optionally support pre-commit hooks for this
- Pylint and mypy coverage is work in progress (these only raise errors)
mypy pyttb/ pylint pyttb/file_name.py //Today only tensor is compliant
- Run autoformatters from root of project (they will change your code)
-
Run tests (at desired fidelity)
- Just doctests (enabled by default)
pytest
- Functional tests
pytest .
- All tests (linting and formatting checks)
pytest . --packaging
- With coverage
pytest . --cov=pyttb --cov-report=term-missing
- Just doctests (enabled by default)
If you want to propose a change to Python Tensor Toolbox, follow these steps:
-
Create an Issue
- Use the Issues tab of the Python Tensor Toolbox GitHub repository and click on the "New issue" button.
-
Fork the Repository and Create a New Branch
- Navigate to the main page of the Python Tensor Toolbox GitHub repository and click on the "Fork" button to create a copy of the repository under your own account.
- Clone the forked repository to your local machine.
- In your local repository, create a new branch for your proposed changes.
-
Update the Code
- Make the necessary updates in your local environment.
- After making your changes, stage and commit them with an informative message.
-
Push your Changes and Create a Pull Request
- Push your changes to the new branch in your fork of the repository.
- Navigate to the main page of the Python Tensor Toolbox repository and click on the "New pull request" button.
- In the "base repository" dropdown, select the original Python Tensor Toolbox repository. In the "base" dropdown, select the branch where you want your changes to be merged.
- In the "head repository" dropdown, select your forked repository. In the "compare" dropdown, select the branch with your changes.
- Write a title and description for your pull request.
-
Review Process
- After creating a pull request, wait for the Github CI tests to pass.
- If any test fails, review your code, make necessary changes, and push your code again to the same branch in your forked repository.
- If there are any comments or requested changes from the Python Tensor Toolbox team, address them and push any additional changes to the same branch.
- Once your changes are approved, a repository admin will merge your pull request.