diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..5c609ac --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +This is a template for making a pull-request. You can remove the text and sections and write your own thing if you wish, just make sure you give enough information about how and why. If you have any issues or difficulties, don't hesitate to open an issue. + + +# Description + +The aim is to add this feature ... + +# Proposed Changes + +I changed the `foo()` function so that ... + + +# Checklist + +Here are some things to check before creating the pull request. If you encounter any issues, don't hesitate to ask for help :) + +- [ ] I have read the [contributor's guide](https://github.com/arnab39/reptrix/blob/main/CONTRIBUTING.md). +- [ ] The base branch of my pull request is the `dev` branch, not the `main` branch. +- [ ] I ran the [code checks](https://github.com/arnab39/reptrix/blob/main/CONTRIBUTING.md#implement-your-changes) on the files I added or modified and fixed the errors. +- [ ] I updated the [changelog](https://github.com/arnab39/reptrix/blob/main/CHANGELOG.md). diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3099a08..128fe68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: '^docs/conf.py' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: check-added-large-files @@ -41,7 +41,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 24.4.0 hooks: - id: black language_version: python3 @@ -67,7 +67,7 @@ repos: # - id: codespell - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.8.0' + rev: 'v1.9.0' hooks: - id: mypy args: [--disallow-untyped-defs, --ignore-missing-imports] diff --git a/CHANGELOG.md b/CHANGELOG.md index dd0325b..ab086d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ # Changelog -## Version 0.1 (development) +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +### Fixed + +### Changed + +### Removed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 884b817..7bd206f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -183,12 +183,10 @@ conda activate reptrix and start making changes. Never work on the main branch! -2. Start your work on this branch. Don't forget to add [docstrings] to new - functions, modules and classes, especially if they are part of public APIs. +2. Start your work on this branch. Don't forget to add [docstrings] to the new + functions, modules and classes, especially if they are part of [equiadapt]. -3. Add yourself to the list of contributors in `AUTHORS.rst`. - -4. When you’re done editing, do: +3. When you’re done editing, do: ``` git add @@ -197,38 +195,41 @@ conda activate reptrix to record your changes in [git]. - ```{todo} if you are not using pre-commit, please remove the following item: - ``` - Please make sure to see the validation messages from [pre-commit] and fix any eventual issues. This should automatically use [flake8]/[black] to check/fix the code style in a way that is compatible with the project. - :::{important} - Don't forget to add unit tests and documentation in case your +> **Note**: + Please add unit tests and documentation in case your contribution adds an additional feature and is not just a bugfix. - Moreover, writing a [descriptive commit message] is highly recommended. In case of doubt, you can check the commit history with: + `git log --graph --decorate --pretty=oneline --abbrev-commit --all` + to look for recurring communication patterns. - ``` - git log --graph --decorate --pretty=oneline --abbrev-commit --all - ``` +#### Run code checks - to look for recurring communication patterns. - ::: +Please make sure to see the validation messages from pre-commit and fix any +eventual issues. This should automatically use [flake8]/[black] to check/fix +the code style in a way that is compatible with the project. -5. Please check that your changes don't break any unit tests with: +To run pre-commit manually, you can use: - ``` - tox - ``` +``` +pre-commit run --all-files +``` + +Please also check that your changes don't break any unit tests with: + +``` +tox +``` - (after having installed [tox] with `pip install tox` or `pipx`). +(after having installed [tox] with `pip install tox` or `pipx`). - You can also use [tox] to run several other pre-configured tasks in the - repository. Try `tox -av` to see a list of the available checks. +You can also use [tox] to run several other pre-configured tasks in the +repository. Try `tox -av` to see a list of the available checks. ### Submit your contribution diff --git a/README.md b/README.md index 7f8ba72..7c8ef62 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ Representation Metrics for assessing quality in pretrained deep models You can check out the [contributor's guide](CONTRIBUTING.md). -This project uses `pre-commit`_, you can install it before making any -changes:: +This project uses `pre-commit`, you can install it before making any +changes: pip install pre-commit cd reptrix