Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #76 from neelgala/dev
Browse files Browse the repository at this point in the history
 Updating CONTRIBUTING.rst to capture the new git strategy
  • Loading branch information
neelgala authored Aug 20, 2023
2 parents 95bec38 + d5420e0 commit ef895d6
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 26 deletions.
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<FOR DOC UPDATES FILL ONLY DESCRIPTION AND RELATED ISSUES SECTION AND REMOVE THE OTHERS>

#DEVELOPMENT PRs SHOULD BE TO DEV BRANCH ONLY

## Description

> Provide a detailed description of the changes performed by the PR.
### Related Issues

> Please list all the issues related to this PR. Use NA if no issues exist.
### Update to/for Ratified/Unratified Extensions or to framework

- [ ] Ratified
- [ ] Unratified
- [ ] Framework

### List Extensions

> List the extensions that your PR affects. In case of unratified extensions, please provide a link to the spec draft that was referred to make this PR.
### Mandatory Checklist:

- [ ] Make sure to have created a suitable entry in the CHANGELOG.md under `[WIP-DEV]` section.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Please note the header `WIP-DEV` is to always remain indicating the changes done on the dev branch.
Only when a release to the main branch is done, the contents of the WIP-DEV are put under a
versioned header while the `WIP-DEV` is left empty

## [WIP-DEV]
- Updating CONTRIBUTING.rst to capture the new git strategy adopted to follow a monthly release
cadence.

## [0.11.1] - 2023-08-15
- Fixed hex values handling for K extensions
- Fixed set indexing error during opcomb gen
Expand Down
71 changes: 50 additions & 21 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
.. highlight:: shell

============
Contributing
============
======================
Developer Contribution
======================

Contributions are welcome, and they are greatly appreciated and credit will always be given.

Expand All @@ -30,15 +30,31 @@ If you are proposing a feature:
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Git Strategy
------------

The repo adopts a simple git strategy where all contributions to the repo are made to the ``dev``
branch (i.e. all Pull-Requests must use ``dev`` as the target branch). On a monthly cadence (decided
and controlled by the SIG-ARCH-TEST members) the ``dev`` branch will be merged to the ``main`` to by
the official maintainers of the repo. This will create an official release capturing all the
development over the month into a single release.

To implement the above strategy successfully the following needs be followed:

* Developers: All pull-requests from developers must target the ``dev`` branch and the PR must
contain an entry in the CHANGELOG.md file under `[WIP-DEV]` section.
* Maintainers: When a making a release the maintainers shall assign semantic version number by
updating the CHANGELOG and the respective python files before raising a PR from the `dev` to `main`.

Get Started!
------------

Ready to contribute? Here's how to set up `riscv_ctg` for local development.

1. Fork the `riscv_ctg` repo on GitHub.
2. Clone your fork locally::
2. Clone your fork locally and checkout the ``dev`` branch::

$ git clone https://github.com/riscv-software-src/riscv-ctg.git
$ git clone https://github.com/riscv-software-src/riscv-ctg.git -b dev

3. Create an issue and WIP merge request that creates a working branch for you::

Expand All @@ -58,33 +74,46 @@ Ready to contribute? Here's how to set up `riscv_ctg` for local development.
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

6. Submit a merge request through the GitHub website.
6. Submit a pull-request through the GitHub website. Make sure the pull-request is on the `dev`
branch of the origin repo.

7. Do not forget to make an entry in the CHANGELOG.md file under the `[WIP-DEV]` section
highlighting the changes you have done.

Merge Request Guidelines
----------------------------
------------------------

Before you submit a merge request, check that it meets these guidelines:

1. The merge request should include tests.
1. The merge request should include tests (if any).
2. If the merge request adds functionality, the docs should be updated.
3. The merge request should work for Python 3.6, 3.7 and 3.8, and for PyPy.
and make sure that the tests pass for all supported Python versions.
3. The target branch must always be the `dev` branch.


Versioning (only for maintainers)
---------------------------------

When issuing pull requests to the main branch (from dev), a version entry in the CHANGELOG.md is mandatory. The tool adheres to
the [`Semantic Versioning`](https://semver.org/spec/v2.0.0.html) scheme. Following guidelines must
be followed while assigning a new version number :

- Patch-updates: all doc updates (like typos, more clarification,etc).
- Minor-updates: Fixing bugs in current features, adding new features which do not break current
features or working. Adding new extensions.
- Major-updates: Backward incompatible changes.

Tips
----
Note: You can have either a patch or minor or major update.
Note: In case of a conflict, the maintainers will decide the final version to be assigned.

To run a subset of tests::
To update the version of the python package for deployment you can use `bumpversion` (installed
using ``pip install bumpversion``)::

$ pytest tests.test_riscv_ctg
$ bumpversion --no-tag --config-file setup.cfg patch # last arg can be: major or minor or patch

If you don't have bumpversion installed you can manually update the version in the following files:

Deploying
---------
- change the value of variable ``current_version`` in `./setup.cfg`
- change the value of variable ``__version__`` in `./riscv_ctg/__init__.py`

A reminder for the maintainers on how to deploy.
Make sure all your changes are committed.
Then run::

$ bumpversion --no-tag --config-file setup.cfg patch # possible: major / minor / patch
$ git push origin name-of-your-branch

4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ current_version = 0.11.1
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:riscv_ctg/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from setuptools import setup, find_packages
import os
import riscv_ctg

# Base directory of package
here = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -26,7 +27,7 @@ def read_requires():

setup(
name='riscv_ctg',
version='0.11.1',
version=riscv_ctg.__version__,
description="RISC-V CTG",
long_description=readme + '\n\n',
classifiers=[
Expand Down

0 comments on commit ef895d6

Please sign in to comment.