You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing.md
+9-96Lines changed: 9 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
## Contributing to the Codebase
2
2
3
-
#### 0. Look at Open Issues
4
-
We currently utilize GitHub Issues as our project management tool for datachecks. Please do the following:
5
-
* Look at our [open issues](#)
3
+
#### 0. Look at Open Issues
4
+
We currently utilize GitHub Issues as our project management tool for checkmates. Please do the following:
5
+
* Look at our [open issues](https://github.com/alteryx/CheckMates/issues)
6
6
* Find an unclaimed issue by looking for an empty `Assignees` field.
7
7
* If this is your first time contributing, issues labeled ``good first issue`` are a good place to start.
8
8
* If your issue is labeled `needs design` or `spike` it is recommended you provide a design document for your feature
@@ -11,19 +11,18 @@ We currently utilize GitHub Issues as our project management tool for datachecks
11
11
12
12
13
13
#### 1. Clone repo
14
-
The code is hosted on GitHub, so you will need to use Git to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. Additionally, you must make sure that the version of Python you use is at least 3.8. Using `conda` you can use `conda create -n datachecks python=3.8` and `conda activate datachecks` before the following steps.
14
+
The code is hosted on GitHub, so you will need to use Git to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. Additionally, you must make sure that the version of Python you use is at least 3.8.
15
15
* clone with `git clone [https://github.com/alteryx/CheckMates.git]`
16
16
* install in edit mode with:
17
17
```bash
18
18
# move into the repo
19
-
cddatachecks
19
+
cdcheckmates
20
20
# installs the repo in edit mode, meaning changes to any files will be picked up in python. also installs all dependencies.
21
21
make installdeps-dev
22
22
```
23
23
24
24
<!--- Note that if you're on Mac, there are a few extra steps you'll want to keep track of.
25
-
* In order to run on Mac, [LightGBM requires the OpenMP library to be installed](https://datachecks.alteryx.com/en/stable/install.html#Mac), which can be done with HomeBrew by running `brew install libomp`
26
-
* We've seen some installs get the following warning when importing datachecks: "UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError". [A known workaround](https://stackoverflow.com/a/61531555/841003) is to run `brew reinstall readline xz` before installing the python version you're using via pyenv. If you've already installed a python version in pyenv, consider deleting it and reinstalling. v3.8.2 is known to work. --->
25
+
* We've seen some installs get the following warning when importing checkmates: "UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError". [A known workaround](https://stackoverflow.com/a/61531555/841003) is to run `brew reinstall readline xz` before installing the python version you're using via pyenv. If you've already installed a python version in pyenv, consider deleting it and reinstalling. v3.9.7 is known to work. --->
27
26
28
27
#### 2. Implement your Pull Request
29
28
@@ -78,12 +77,12 @@ Note that if you're building docs locally, the warning suppression code at `docs
78
77
79
78
* We use GitHub Actions to run our PR checkin tests. On creation of the PR and forevery change you make to your PR, you'll need a maintainer to click "Approve and run" on your PR. This is a change [GitHub madein April 2021](https://github.blog/2021-04-22-github-actions-update-helping-maintainers-combat-bad-actors/).
80
79
81
-
* We ask that all contributors sign our contributor license agreement (CLA) the first time they contribute to datachecks. The CLA assistant will place a message on your PR; follow the instructions there to sign the CLA.
80
+
* We ask that all contributors sign our contributor license agreement (CLA) the first time they contribute to checkmates. The CLA assistant will place a message on your PR; follow the instructions there to sign the CLA.
82
81
83
82
Add a description of your PR to the subsection that most closely matches your contribution:
84
-
* Enhancements: new features or additions to DataChecks.
83
+
* Enhancements: new features or additions to CheckMates.
85
84
* Fixes: things like bugfixes or adding more descriptive error messages.
86
-
* Changes: modifications to an existing part of DataChecks.
85
+
* Changes: modifications to an existing part of CheckMates.
87
86
* Documentation Changes
88
87
* Testing Changes
89
88
@@ -96,92 +95,6 @@ If your work includes a [breaking change](https://en.wiktionary.org/wiki/breakin
96
95
* Description of your breaking change
97
96
```
98
97
99
-
### 4. Updating our conda package
100
-
101
-
We maintain a conda package [package](#) to give users more options of how to install datachecks.
102
-
Conda packages are created from recipes, which are yaml config files that list a package's dependencies and tests. Here is
103
-
datachecks's latest published [recipe](#).
104
-
GitHub repositories containing conda recipes are called `feedstocks`.
105
-
106
-
If you opened a PR to datachecks that modifies the packages in`dependencies` within `pyproject.toml`, or if the latest dependency bot
107
-
updates the latest version of one of our packages, you will see a CI job called `build_conda_pkg`. This section describes
108
-
what `build_conda_pkg` does and what to doif you see it fails in your pr.
109
-
110
-
#### What is build_conda_pkg?
111
-
`build_conda_pkg` clones the PR branch and builds the conda package from that branch. Since the conda build process runs our
112
-
entire suite of unit tests, `build_conda_pkg` checks that our conda package actually supports the proposed change of the PR.
113
-
We added this check to eliminate surprises. Since the conda package is released after we release to PyPi, it's possible that
114
-
we released a dependency version that is not compatible with our conda recipe. It would be a pain to try to debug this at
115
-
release-time since the PyPi release includes many possible PRs that could have introduced that change.
116
-
117
-
#### How does `build_conda_pkg` work?
118
-
`build_conda_pkg` will clone the `master` branch of the feedstock as well as you datachecks PR branch. It will
119
-
then replace the recipe in the `master` branch of the feedstock with the current
120
-
latest [recipe](#) in datachecks.
121
-
It will also modify the [source](#)
122
-
field of the local copy of the recipe and point it at the local datachecks clone of your PR branch.
123
-
This has the effect of building our conda package against your PR branch!
124
-
125
-
#### Why does `build_conda_pkg` use a recipe in datachecks as opposed to the recipe in the feedstock `master` branch?
126
-
One important fact to know about conda is that any change to the `master` branch of a feedstock will
127
-
result in a new version of the conda package being published to the world!
128
-
129
-
With this in mind, let's say your PR requires modifying our dependencies.
130
-
If we made a change to `master`, an updated version of datachecks's latest conda package would
131
-
be released. This means people who installed the latest version of datachecks prior to this PR would get different dependency versions
132
-
than those who installed datachecks after the PR got merged on GitHub. This is not desirable, especially because the PR would not get shipped
133
-
to PyPi until the next release happens. So there would also be a discrepancy between the PyPi and conda versions.
134
-
135
-
By using a recipe stored in the datachecks repo, we can keep track of the changes that need to be made for the next release without
136
-
having to publish a new conda package. Since the recipe is also "unique" to your PR, you are free to make whatever changes you
137
-
need to make without disturbing other PRs. This would not be the case if `build_conda_pkg` ran from the `master` branch of the
138
-
feedstock.
139
-
140
-
#### What to do if you see `build_conda_pkg` is red on your PR?
141
-
It depends on the kind of PR:
142
-
143
-
**Case 1: You're adding a completely new dependency**
144
-
145
-
In this case, `build_conda_pkg` is failing simply because a dependency is missing. Adding the dependency to the recipe should
146
-
make the check green. To add the dependency, modify the recipe located at `.github/meta.yaml`.
147
-
148
-
If you see that adding the dependency causes the build to fail, possibly because of conflicting versions, then iterate until
149
-
the build passes. The team will verify if your changes make sense during PR review.
150
-
151
-
**Case 2: The latest dependency bot created a PR**
152
-
If the latest dependency bot PR fails `build_conda_pkg`, it means our code doesn't support the latest version
153
-
of one of our dependencies. This means that we either have to cap the max allowed version in our requirements file
154
-
or update our code to support that version. If we opt for the former, then just like in Case 1, make the corresponding change
155
-
to the recipe located at `.github/meta.yaml`
156
-
157
-
#### What about the `check_versions` CI check?
158
-
This check verifies that the allowed versions listed in `pyproject.toml` match those listed in
159
-
the conda recipe so that the PyPi requirements and conda requirements don't get out of sync.
160
-
161
-
## Code Style Guide
162
-
163
-
* Keep things simple. Any complexity must be justified in order to pass code review.
164
-
* Be aware that while we love fancy python magic, there's usually a simpler solution which is easier to understand!
165
-
* Make PRs as small as possible! Consider breaking your large changes into separate PRs. This will make code review easier, quicker, less bug-prone and more effective.
166
-
* In the name of every branch you create, include the associated issue number if applicable.
167
-
* If new changes are added to the branch you're basing your changes off of, consider using `git rebase -i base_branch` rather than merging the base branch, to keep history clean.
168
-
* Always include a docstring for public methods and classes. Consider including docstrings for private methods too. We use the [Google docstring convention](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings), and use the [`sphinx.ext.napoleon`](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html) extension to parse our docstrings.
169
-
* Although not explicitly enforced by the Google convention, keep the following stylistic conventions fordocstringsin mind:
170
-
- First letter of each argument description should be capitalized.
171
-
- Docstring sentences should end in periods. This includes descriptions for each argument.
172
-
- Types should be written in lower-case. For example, use "bool" instead of "Bool".
173
-
- Always add the default value in the description of the argument, if applicable. For example, "Defaults to 1."
174
-
* Use [PascalCase (upper camel case)](https://en.wikipedia.org/wiki/Camel_case#Variations_and_synonyms) for class names, and [snake_case](https://en.wikipedia.org/wiki/Snake_case) for method and class member names.
175
-
* To distinguish private methods and class attributes from public ones, those which are private should be prefixed with an underscore
176
-
* Any code which doesn't need to be public should be private. Use `@staticmethod` and `@classmethod` where applicable, to indicate no side effects.
177
-
* Only call public methods in unit tests.
178
-
* All code must have unit test coverage. Use mocking and monkey-patching when necessary.
179
-
* Keep unit tests as fast as possible. In particular, avoid calling `fit`. Mocking can help with this.
180
-
* When you're working with code which uses a random number generator, make sure your unit tests set a random seed.
181
-
* Use `np.testing.assert_almost_equal` when comparing floating-point numbers, to avoid numerical precision issues, particularly cross-platform.
182
-
* Use `os.path` tools to keep file paths cross-platform.
183
-
* Our rule of thumb is to favor traditional inheritance over a mixin pattern.
184
-
185
98
## GitHub Issue Guide
186
99
187
100
* Make the title as short and descriptive as possible.
Copy file name to clipboardExpand all lines: release.md
+10-51Lines changed: 10 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Before starting the release process, verify the following:
10
10
11
11
#### Version Numbering
12
12
13
-
DataChecks uses [semantic versioning](https://semver.org/). Every release has a major, minor and patch version number, and are displayed like so: `<majorVersion>.<minorVersion>.<patchVersion>`.
13
+
CheckMates uses [semantic versioning](https://semver.org/). Every release has a major, minor and patch version number, and are displayed like so: `<majorVersion>.<minorVersion>.<patchVersion>`.
14
14
15
15
If you'd like to create a development release, which won't be deployed to pypi and conda and marked as a generally-available production release, please add a "dev" prefix to the patch version, i.e. `X.X.devX`. Note this claims the patch number--if the previous release was `0.12.0`, a subsequent dev release would be `0.12.dev1`, and the following release would be `0.12.2`, *not*`0.12.1`. Development releases deploy to [test.pypi.org](#) instead of to [pypi.org](#).
16
16
@@ -23,13 +23,13 @@ Once a perf test document has been reviewed and approved by the team, we'll move
23
23
Please use the following pattern for the release PR branch name: "release_vX.X.X". Doing so will bypass our release notes checkin test which requires all other PRs to add a release note entry.
24
24
25
25
Create a release PR with the following changes:
26
-
* Update `setup.py` and `datachecks/__init__.py` to bump `__version__` to the new version.
26
+
* Update `setup.py` and `checkmates/__init__.py` to bump `__version__` to the new version.
27
27
* Move all entries in `docs/source/release_notes.rst` currently listed under `**Future Releases**` to be under a new heading with the version number and release date.
28
28
* Make sure `**Future Releases**` is empty except for the sub-headings, so it's ready for new entries.
29
29
* Populate the release PR body with a copy of this release's release notes, reformatted to [GitHub markdown](https://guides.github.com/features/mastering-markdown/). You'll reuse this text in step 2. You can generate the markdown by running `tools/format_release_notes.sh` locally.
30
30
* Confirm that all release items are in the release notes under the correct header, and that no extra items are listed. You may have to do an "empty cache and hard reset" in your browser to see updates.
31
31
32
-
An example can be found here: #
32
+
An example can be found here: https://github.com/alteryx/CheckMates/pull/11
33
33
34
34
Checklist before merging:
35
35
* PR has been reviewed and approved.
@@ -52,7 +52,7 @@ Note that by targeting `main`, there must be no new merges to `main` from the mo
52
52
53
53
Save the release as a draft and make sure it looks correct. You could start the draft while waiting for the release PR to be ready to merge.
54
54
55
-
When it's ready to go, hit "Publish release." This will create a "vX.X.X" tag for the release, which tells ReadtheDocs to build and update the "stable" version. This will also deploy the release [to pypi](#), making it publicly accessible!
55
+
When it's ready to go, hit "Publish release." This will create a "vX.X.X" tag for the release, which tells ReadtheDocs to build and update the "stable" version. This will also deploy the release [to pypi](https://pypi.org/project/CheckMates/), making it publicly accessible!
56
56
57
57
## 4. Make Documentation Public for Release Version
58
58
Creating the GitHub release should have updated the default `stable` docs branch to point at the new version. You'll now need to activate the new release version on ReadtheDocs so its publicly visible in the list of versions. This is important so users can view old documentation versions which match their installed version.
@@ -67,57 +67,16 @@ Please do the following:
67
67
## 5. Verify the release package has been deployed
68
68
Now that the release has been made in the repo, to pypi and in our documentation, the final step is making sure the new release is publicly pip-installable via pypi.
69
69
70
-
In a fresh virtualenv, install datachecks via pip and ensure it installs successfully:
70
+
In a fresh virtualenv, install checkmates via pip and ensure it installs successfully:
Note: make sure when you do this that you're in a virtualenv, your current working directory isn't in the datachecks repo, and that you haven't added your repo to the `PYTHONPATH`, because in both cases python could pick up the repo instead, even in a virtualenv.
83
-
84
-
## 6. Publish Our New Conda Package
85
-
86
-
A couple of hours after you publish the GitHub release, a bot will open a PR to our [feedstock](#) that automatically
87
-
bumps the recipe to use the latest version of the package.
88
-
In order to publish our latest conda package, we need to make some changes to the bot's PR and merge it.
89
-
90
-
The bot's PR will will remove the quotes around the version tag in the recipe.
91
-
Removing these quotes will break our `build_conda_pkg` CI job so add them back in and push your changes to the bot's PR.
92
-
For example, lines 3-5 of the [recipe](#) should look like the following:
93
-
```yaml
94
-
package:
95
-
name: datachecks-core
96
-
version: '{{ version }}'
97
-
```
98
-
For help on how to push changes to the bot's PR please read this [document.](https://conda-forge.org/docs/maintainer/updating_pkgs.html#pushing-to-regro-cf-autotick-bot-branch)
99
-
100
-
You may need to make other changes to the bot's PR. For example, there is a CI check called "Check conda versions/check_versions" that
101
-
verifies whether the dependency versions of the conda update PR match the versions of the recipe used in
102
-
`build_conda_pkg` (located in `.github/meta.yaml`). If the check is red, modify the dependencies so they match those in `.github/meta.yaml`.
103
-
104
-
After you make the necessary changes and merge the PR, our latest package will be deployed to conda-forge! To verify, run this in a fresh conda environment:
105
-
106
-
```shell
107
-
conda install -c conda-forge datachecks
108
-
```
109
-
110
-
Verify the latest version of `datachecks` got installed by running
## Add new maintainers to datachecks-core-feedstock
118
-
119
-
Per the instructions [here](https://conda-forge.org/docs/maintainer/updating_pkgs.html#updating-the-maintainer-list):
120
-
1. Ask an existing maintainer to create an issue on the [repo](#).
121
-
- Select *Bot commands* and put the following title (change `username`): `@conda-forge-admin, please add user @username`
122
-
2. A PR will be auto-created on the repo, and will need to be merged by an existing maintainer.
123
-
3. The new user will need to **check their email for an invite link to click**, which should be https://github.com/conda-forge
82
+
Note: make sure when you do this that you're in a virtualenv, your current working directory isn't in the checkmates repo, and that you haven't added your repo to the `PYTHONPATH`, because in both cases python could pick up the repo instead, even in a virtualenv.
0 commit comments