-
Notifications
You must be signed in to change notification settings - Fork 36
Contributing guidelines #251
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
Changes from all commits
5b88c43
871eff7
cedeea8
41534c0
0d68e6d
3a3e23e
5a41fac
ac73deb
9fdb35f
8444e42
3400ce1
cd15df8
30ccde8
db3dc09
1a3f213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
New? Check CONTRIBUTING.md! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Contribution guidelines | ||
|
||
We follow the [ColPrac guide for collaborative practices](https://colprac.sciml.ai/). New contributors should make sure to read the [first section](https://github.com/SciML/ColPrac#colprac-contributors-guide-on-collaborative-practices-for-community-packages) of that guide, but could also read the [Further Guidance](https://github.com/SciML/ColPrac#colprac-further-guidance) section if interested. | ||
|
||
|
||
# Workflows | ||
|
||
|
||
## Creating a new [pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) | ||
|
||
### Bumping the version number | ||
|
||
When contributing a PR, bump the version number (defined by `version = "..."` at the top of the base `Project.toml`) accordingly (as explained by the [guidance on the versioning scheme](https://colprac.sciml.ai/#incrementing-the-package-version) in the ColPrac guide). | ||
If unsure about what the new version should be, please just open the PR anyway -- existing contributors will provide a suggestion. | ||
|
||
### Running tests locally | ||
|
||
Firstly, run `using Pkg; Pkg.develop("KernelFunctions")` at the Julia REPL, and navigate to `~/.julia/dev/KernelFunctions`. | ||
|
||
Running `make test` will now run the entire test suite. | ||
These tests can take a long time to run, so it's often a good idea to simply comment out the blocks of tests not required in `test/runtests.jl`. | ||
Test files are paired 1-1 with source files, so if you're modifying code in `src/foo.jl`, you should only need to run the tests in `test/foo.jl` during development. | ||
|
||
### Code formatting | ||
|
||
Run `make format` before pushing your changes. | ||
|
||
|
||
### How to make a new release (for organization members) | ||
|
||
We use [JuliaRegistrator](https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app): | ||
|
||
On Github, go to the commit that you want to register (this should normally be the commit of a squash-merged pull request on the `master` branch that has bumped the version number) and add a comment saying `@JuliaRegistrator register`. | ||
|
||
The next release will then be processed automatically. KernelFunctions.jl does use TagBot so you can ignore the message about tagging. Note that it may take around 20 minutes until the actual release appears and you can edit the release notes if needed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just want to clarify (doesn't have to be added here, I think) that the Github releases and tags are nice but not relevant or mandatory for Julia packages (there exist many packages that work just fine without TagBot or Github releases). As soon as the PR by JuliaRegistrator is merged into the general registry, users can update KernelFunctions (well, in principle at least - sometimes it takes a while until the Julia PkgServers update the registry...). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If not here, should this be clarified elsewhere? Again, this is about how would the process look like for a new contributor? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
JULIA=$(shell which julia) | ||
|
||
.PHONY: help format test | ||
|
||
help: | ||
@echo "The following make targets are available:" | ||
@echo " format auto-format code" | ||
@echo " test run all tests" | ||
|
||
format: | ||
@if [ "$(JULIA)" = "" ]; then echo 'Julia not found; run `make JULIA=/path/to/julia format`'; exit 1; fi | ||
$(JULIA) -e 'using Pkg; Pkg.activate(; temp=true); Pkg.add("JuliaFormatter"); using JuliaFormatter; format(".")' | ||
|
||
test: | ||
@if [ "$(JULIA)" = "" ]; then echo 'Julia not found; run `make JULIA=/path/to/julia test`'; exit 1; fi | ||
$(JULIA) --project=. -e 'using Pkg; Pkg.test()' |
Uh oh!
There was an error while loading. Please reload this page.