Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CONTRIBUTING.md #11393

Merged
merged 2 commits into from
May 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,23 @@ In the event an emergency fix is required for the release version of Chia, membe
4. Chia Network's nodes on the public testnet are running the latest version `x.y.z`.
5. The `main` branch will have a long running `beta testnet` to allow previewing of changes.
6. Pull Request events may require a `beta testnet` review environment. At the moment this is at the discretion of the reviewer.
7. Hotfixes land in the release branch they fix, and all later versions. (This will be achieved by regularly merging from `1.0.x` to main).
7. Hotfixes land in the release branch they fix, and all later versions. (This will be achieved by regularly merging from `1.3.x` to main).
8. Hotfixes that are emergency fixes for a specific version will be merged into (???), and removed from down-stream branches. This allows future merges without issues.
9. Whoever develops a hotfix is also responsible for merging it into all later branches.
10. A release branch (e.g. `1.1.x`) will be cut prior to a release, in order to separate work that should go into the release from work going into the next major release (main branch). (This pre-release branch will also have a `beta testnet` spun up for preview).
10. A release branch (e.g. `1.3.x`) will be cut prior to a release, in order to separate work that should go into the release from work going into the next major release (main branch). (This pre-release branch will also have a `beta testnet` spun up for preview).
11. All Merge events will be squash merged.

## Run tests and linting

The first time the tests are run, BlockTools will create and persist many plots. These are used for creating
proofs of space during testing. The next time tests are run, this will not be necessary.
proofs of space during testing. The next time tests are run, this will not be necessary. Look at the pytest.ini file
to configure how the tests are run. For example, for more logging: change the log level from WARNING to INFO, change
`-n auto` to `-n 0` and set `log_cli = True`.

```bash
sh install.sh -d
. ./activate
pip install ".[dev]"
black chia tests && mypy chia tests && flake8 chia tests
black chia tests tools && isort chia tests tools && mypy chia tests tools && flake8 chia tests tools
mariano54 marked this conversation as resolved.
Show resolved Hide resolved
py.test tests -v --durations 0
```

Expand Down Expand Up @@ -86,20 +88,18 @@ provided configuration with `pre-commit install`.

Pycharm is an amazing and beautiful python IDE that some of us use to work on this project.
If you combine it with python black and formatting on save, you will get a very efficient
workflow.
workflow. It's also especially efficient for git branching, cherry-picking, committing and pushing.

1. pip install black
2. Run blackd in a terminal
3. Install BlackConnect plugin
4. Set to run python black on save
5. Set line length to 120
6. Install the linters in the root directory
1. Run blackd in a terminal
2. Install BlackConnect plugin
3. Set to run python black on save
4. Set line length to 120
5. Install the linters in the root directory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what 5. means and I personally can't comment on the rest as the closest I come to black integrations is a ctrl+b shortcut. Do you have to have the venv activated in the console where you launch pycharm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what 5 means. I just left it there since I didn't know what it meant


## Testnets and review environments

With the launch of `1.0.0` we will begin running an official `testnet`.
Prior to the release of `1.1.0` there will be two running test nets. `testnet` and `transaction-beta-testnet`. The `transaction-beta-testnet` testnet will be a beta of the pending 1.1 release, which will enable transactions on the chia blockchain.
Following the release of `1.1.0`, the official `testnet` will include all changes that have been accepted to the current release branch.
The current official testnet is testnet10. Look at `chia/util/initial_config.yaml` to see the configuration parameters
for each testnet. Information on how to use the testnet can be found in the wiki.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a link to the wiki?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These links change a lot so I rather avoid adding a link

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, another check to add. A link checker.


Prior to proposing changes to `main`, proposers should consider if running a `beta testnet` review environment will make the reviewer more effective when evaluating a change.
Changes that impact the blockchain could require a review environment before acceptance into `main`. This is at the discretion of the reviewer.
Expand Down