Issues will be collected using GitHub’s issue trackers, one for each CHoRUS repo. Anyone can file an issue.
Assign an issue to a collaborator to indicate that person is working on it, or will be working on it shortly.
Issues can be labelled with the following default labels (package maintainers are free to add their own custom labels should they see a need):
Before you open a pull request, you should always file an issue and make sure the package maintainer agrees that it’s a problem, and is happy with your basic proposal for fixing it. We don’t want you to spend a bunch of time on something that we don’t think is a good idea.
Additional requirements for pull requests:
Adhere to the Developer Guidelines posted here, as well as the OHDSI Code Style.
If possible, add unit tests for new functionality you add.
Restrict your pull request to solving the issue at hand. Do not try to ‘improve’ parts of the code that are not related to the issue. If you feel other parts of the code need better organization, create a separate issue for that.
Make sure you pass R check without errors and warnings before submitting.
Always target the develop
branch, and make sure you are up-to-date with the develop branch.
CHoRUS tools rely on a variety of different languages and associated structures. We are working to define a standard format for each use case.
Some general coding guidelines:
When a user calls a function, the effect of that call should be apparent to the user. This means:
Do not call library
or require
in a function, as this changes the user’s search path.
Do not set options.
Do not write to files other than those specified by the user in the function call.
Do not use global variables.
Instead of using library
, always explicitly reference the package a function belongs to, for example SqlRender::translate()
.
Dependencies lead to instability. Only add dependencies to other packages if completely unavoidable.
We have more or less accepted we need to depend on the core tidyverse
packages, so any of those packages are allowed.
Except for very simple function calls (e.g. print(x)
), use named arguments, for example:
sql <- SqlRender::translate(sql = "SELECT * FROM my_table;", targetDialect = "postgresql")
instead of
sql <- SqlRender::translate("SELECT * FROM my_table;", "postgresql")