Skip to content

Commit b05f08c

Browse files
authored
Merge pull request #19 from appannie/bugfixes
2 parents b046b52 + 1db2007 commit b05f08c

File tree

11 files changed

+35
-28
lines changed

11 files changed

+35
-28
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
python-version: 3.8
3030
- run: |
3131
git config --global user.name "github-actions[bot]"
32+
- name: Copy README.me
33+
run: |
34+
for i in packages/*; do echo cp README.md $i; done
3235
- name: Publish to NPM
3336
run: |
3437
yarn install

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
node_modules
66
coverage
77
packages/*/lib
8-
8+
packages/*/README.md

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
# AB Testing
3131

32-
![CI](https://github.com/appannie/ab-testing/workflows/CI/badge.svg)
32+
[![CI](https://github.com/appannie/ab-testing/workflows/CI/badge.svg)](https://github.com/appannie/ab-testing/actions?query=workflow%3ACI)
3333
[![Coverage Status](https://coveralls.io/repos/github/appannie/ab-testing/badge.svg)](https://coveralls.io/github/appannie/ab-testing)
34-
![GitHub Release Date](https://img.shields.io/github/release-date/appannie/ab-testing)
34+
[![GitHub Release Date](https://img.shields.io/github/release-date/appannie/ab-testing)](https://github.com/appannie/ab-testing/releases)
3535

3636
The AB Testing library implements multi-variance testing with a deterministic algorithm. It doesn't require any complex backend or database. Supporting both Javascript and Python.
3737

@@ -58,9 +58,9 @@ The config file can be optionaly [hashed](#Configuration-File-Hashing-and-Protec
5858

5959
## For React: `@appannie/react-ab-testing`
6060

61-
![npm (scoped)](https://img.shields.io/npm/v/@appannie/react-ab-testing)
62-
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@appannie/react-ab-testing)
63-
![npm](https://img.shields.io/npm/dw/@appannie/react-ab-testing)
61+
[![npm (scoped)](https://img.shields.io/npm/v/@appannie/react-ab-testing)](https://www.npmjs.com/package/@appannie/react-ab-testing)
62+
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@appannie/react-ab-testing)](https://www.npmjs.com/package/@appannie/react-ab-testing)
63+
[![npm](https://img.shields.io/npm/dw/@appannie/react-ab-testing)](https://www.npmjs.com/package/@appannie/react-ab-testing)
6464

6565
React binding for the vanilla Javascript package, featuring similar functionality.
6666

@@ -122,9 +122,9 @@ const Component = () => {
122122

123123
## For Vanilla Javascript: `@appannie/ab-testing`
124124

125-
![npm (scoped)](https://img.shields.io/npm/v/@appannie/ab-testing)
126-
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@appannie/ab-testing)
127-
![npm](https://img.shields.io/npm/dw/@appannie/ab-testing)
125+
[![npm (scoped)](https://img.shields.io/npm/v/@appannie/ab-testing)](https://www.npmjs.com/package/@appannie/ab-testing)
126+
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@appannie/ab-testing)](https://www.npmjs.com/package/@appannie/ab-testing)
127+
[![npm](https://img.shields.io/npm/dw/@appannie/ab-testing)](https://www.npmjs.com/package/@appannie/ab-testing)
128128

129129
Core Javascript package that implementing ab-testing SDK APIs.
130130

@@ -166,9 +166,9 @@ switch (cohort) {
166166

167167
## Javascript Hashing Utils `@appannie/ab-testing-hash-object`
168168

169-
![npm (scoped)](https://img.shields.io/npm/v/@appannie/ab-testing-hash-object)
170-
![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@appannie/ab-testing-hash-object)
171-
![npm](https://img.shields.io/npm/dw/@appannie/ab-testing-hash-object)
169+
[![npm (scoped)](https://img.shields.io/npm/v/@appannie/ab-testing-hash-object)](https://www.npmjs.com/package/@appannie/ab-testing-hash-object)
170+
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@appannie/ab-testing-hash-object)](https://www.npmjs.com/package/@appannie/ab-testing-hash-object)
171+
[![npm](https://img.shields.io/npm/dw/@appannie/ab-testing-hash-object)](https://www.npmjs.com/package/@appannie/ab-testing-hash-object)
172172

173173
An helper library that implements hashing for the configurations (user profile and the configuration `force_include` section) in case you want to host the config file publicly but still keep the content private, or just don't want to leave PIIs been transmitted in plain text.
174174

@@ -208,9 +208,9 @@ You'll want to make sure the salt is the same on your server and your client for
208208

209209
## For Python: `py-ab-testing`
210210

211-
![PyPI](https://img.shields.io/pypi/v/py-ab-testing)
212-
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py-ab-testing)
213-
![PyPI - Downloads](https://img.shields.io/pypi/dw/py-ab-testing)
211+
[![PyPI](https://img.shields.io/pypi/v/py-ab-testing)](https://pypi.org/project/py-ab-testing/)
212+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/py-ab-testing)](https://pypi.org/project/py-ab-testing/)
213+
[![PyPI - Downloads](https://img.shields.io/pypi/dw/py-ab-testing)](https://pypi.org/project/py-ab-testing/)
214214

215215
Python implementation for the same APIs in `@appannie/ab-testing` and `@appannie/ab-testing-hash-object`
216216

@@ -224,7 +224,7 @@ pipenv install py-ab-testing
224224

225225
### Usage
226226

227-
Note: The `config` variable holds an `dict` with [configuration file format that documented here](../../README.md).
227+
Note: The `config` variable holds an `dict` with [configuration file format that documented here](#configuration-file-reference).
228228

229229
```python
230230
from ABTesting import ABTestingController
@@ -333,7 +333,7 @@ You shouldn't list user [private information (PII)](https://csrc.nist.gov/glossa
333333

334334
If you need to segment users using emails or information you wish/need to keep private, we suggest you to securely encrypt them.
335335

336-
We're providing an extra module [`@appannie/ab-testing-hash-object`](./packages/ab-testing-hash-object/README.md) aiming to simplify this flow. This module will encode the keys and the values of your user profile. You then need to call it with the same `salt` while preprocessing your configuration and once when defining the user profile:
336+
We're providing an extra module `@appannie/ab-testing-hash-object` aiming to simplify this flow. This module will encode the keys and the values of your user profile. You then need to call it with the same `salt` while preprocessing your configuration and once when defining the user profile:
337337

338338
```js
339339
import { hashObject } from '@appannie/ab-testing-hash-object';

lerna.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
"version": "1.1.2",
33
"npmClient": "yarn",
44
"useWorkspaces": true,
5-
"ignoreChanges": [
6-
"**/__fixtures__/**",
7-
"**/__tests__/**",
8-
"**/*.md"
9-
],
5+
"ignoreChanges": ["**/__fixtures__/**", "**/__tests__/**", "**/*.md"],
106
"command": {
117
"version": {
12-
"allowBranch": "master"
8+
"allowBranch": "master",
9+
"conventionalCommits": true,
10+
"changelogPreset": "conventionalcommits"
1311
}
1412
}
1513
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@types/testing-library__react-hooks": "^3.2.0",
1616
"@typescript-eslint/eslint-plugin": "^2.34.0",
1717
"@typescript-eslint/parser": "^2.34.0",
18+
"conventional-changelog-conventionalcommits": "^4.3.0",
1819
"eslint": "^7.0.0",
1920
"eslint-config-prettier": "^6.11.0",
2021
"eslint-formatter-friendly": "^7.0.0",

packages/ab-testing-hash-object/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/ab-testing/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/py-ab-testing/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/py-ab-testing/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import setuptools
55

6-
with open(path.join(path.dirname(__file__), "README.md"), "r") as fh:
6+
with open(path.join(path.dirname(__file__), "..", "..", "README.md"), "r") as fh:
77
long_description = fh.read()
88

99
with open(path.join(path.dirname(__file__), "package.json"), "r") as f:

packages/react-ab-testing/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)