From d78c511c2ccb2556f38e1cbf0dc496e66698b76b Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Sat, 16 Sep 2023 20:51:07 -0700 Subject: [PATCH] conduct --- CONTRIBUTING.md | 35 +++++++++++++++++------------------ Makefile | 7 +++++++ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83a3408..4cb03ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,8 +19,8 @@ Before sending a pull request, make sure you do the following: ## Building cvxcli from source You'll need to build cvxcli locally in order to start editing code. -To install cvxcli from source, clone the Github repository, navigate to the -repository root, and run the following command: +To install cvxcli from source, clone the Github +repository, navigate to its root, and run the following command: ```bash make install @@ -30,14 +30,14 @@ We assume you have [poetry](https://python-poetry.org) installed. ## Contributing code -To contribute to cvxcli, send us pull requests. For those new to contributing, -check out Github's +To contribute to cvxcli, send us pull requests. +For those new to contributing, check out Github's [guide](https://help.github.com/articles/using-pull-requests/). -Once you've made your pull request, a member of the cvxcli development team -will assign themselves to review it. You might have a few back-and-forths -with your reviewer before it is accepted, which is completely normal. Your -pull request will trigger continuous integration tests for many different +Once you've made your pull request, a member of the cvxcli +development team will assign themselves to review it. You might have a few +back-and-forths with your reviewer before it is accepted, which is completely normal. +Your pull request will trigger continuous integration tests for many different Python versions and different platforms. If these tests start failing, please fix your code and send another commit, which will re-trigger the tests. @@ -47,9 +47,10 @@ change on a Github issue, to make sure that your priorities align with ours. If you'd like to contribute code but don't know where to start, try one of the following: -- Read the cvxcli source and enhance the documentation, or address TODOs -- Browse the [issue tracker](https://github.com/cvxgrp/cvxcli/issues), and - look for the issues tagged "help wanted". +- Read the cvxcli source and enhance the documentation, + or address TODOs +- Browse the [issue tracker](https://github.com/cvxgrp/cvxcli/issues), + and look for the issues tagged "help wanted". ## License @@ -71,11 +72,11 @@ errors that are reported before sending the pull request. ## Writing unit tests Most code changes will require new unit tests. Even bug fixes require unit tests, -since the presence of bugs usually indicates insufficient tests. cvxcli tests -live in the directory `tests`, which contains many files, each of which -contains many unit tests. When adding tests, try to find a file in which your -tests should belong; if you're testing a new feature, you might want to create -a new test file. +since the presence of bugs usually indicates insufficient tests. +cvxcli tests live in the directory `tests`, +which contains many files, each of which contains many unit tests. +When adding tests, try to find a file in which your tests should belong; +if you're testing a new feature, you might want to create a new test file. We use the popular Python [pytest](https://docs.pytest.org/en/) framework for our tests. @@ -96,5 +97,3 @@ make coverage ``` Please make sure that your change doesn't cause any of the unit tests to fail. - -the above command (with and without your change) in your pull request. diff --git a/Makefile b/Makefile index 18d59b0..324b6da 100644 --- a/Makefile +++ b/Makefile @@ -40,3 +40,10 @@ coverage: install ## test and coverage help: ## Display this help screen @echo -e "\033[1mAvailable commands:\033[0m" @grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort + +.PHONY: conduct +conduct: ## Generete CODE of CONDUCT and Contributing + @poetry run pip install jinja2 toml + @gh gist clone a4a054e3e80a8021c351b027280d3b09 tmp + @poetry run python tmp/parse.py + @rm -rf tmp