Skip to content

Commit d562b2d

Browse files
Merge pull request #10 from rewire5-io/feature/v1.9.0
Feature/v1.9.0
2 parents f07ab9f + 7f96e83 commit d562b2d

14 files changed

Lines changed: 86 additions & 60 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img src="https://raw.githubusercontent.com/neural7/five-factor-e/main/doc/neural7.png" align="right" width="80" height="70"/>
1+
<img src="https://raw.githubusercontent.com/rewire5-io/five-factor-e/main/doc/rewire5.png" align="right" width="80" height="70"/>
22

33
# Five Factor E 🌊
44

@@ -10,7 +10,7 @@
1010
[python_version]: https://img.shields.io/static/v1.svg?label=python&message=3.7%20|%203.8%20|%203.9%20|%203.10%20|%203.11%20&color=blue
1111

1212
<p align="center">
13-
<img src="https://raw.githubusercontent.com/neural7/five-factor-e/main/doc/big-five-neural7.png" alt="Representation of the Big Five"/>
13+
<img src="https://raw.githubusercontent.com/rewire5-io/five-factor-e/main/doc/big-five-rewire5.png" alt="Representation of the Big Five"/>
1414
</p>
1515

1616
This project assesses a person's 🗣 personality based on an inventory of questions. The project uses the **Big Five** theory using the [IPIP-NEO-300](http://www.personal.psu.edu/~j5j/IPIP/ipipneo300.htm) model created by **Lewis R. Goldberg** and [IPIP-NEO-120](http://www.personal.psu.edu/~j5j/IPIP/ipipneo120.htm) the shorter version developed by Professor **Dr. John A. Johnson**, this is a free representation of the [NEO PI-R™](https://en.wikipedia.org/wiki/Revised_NEO_Personality_Inventory).
@@ -21,7 +21,7 @@ The main idea of the project is to facilitate the use of **Python** developers w
2121

2222
👉 *"That is wonderful, ...! Thank you for developing the Python version of the IPIP-NEO and making it publicly available. It looks like a great resource."* - Dr. Johnson
2323

24-
Note 🚩: *The project is based on the work of **Dhiru Kholia**, and is an adaptation of [Neural7](https://github.com/neural7) for a version that can be reused in other projects of the company.*
24+
Note 🚩: *The project is based on the work of **Dhiru Kholia**, and is an adaptation of [ReWire5](https://github.com/rewire5-io) for a version that can be reused in other projects of the company.*
2525

2626
### Synopsis 🌐
2727

@@ -59,7 +59,7 @@ Note 🚩: Some answers have the order of the [score reversed](https://ipip.ori.
5959

6060
News about each version please look here:
6161

62-
* [Releases](https://github.com/neural7/five-factor-e/blob/main/RELEASES.md)
62+
* [Releases](https://github.com/rewire5-io/five-factor-e/blob/main/RELEASES.md)
6363

6464
### Installation 🚀
6565

@@ -72,14 +72,14 @@ $ python3 -m pip install --upgrade five-factor-e
7272
From source:
7373

7474
```shell
75-
$ git clone https://github.com/neural7/five-factor-e.git
75+
$ git clone https://github.com/rewire5-io/five-factor-e.git
7676
$ cd five-factor-e
7777
$ python3 -m pip install .
7878
```
7979

8080
### How to use 🔥
8181

82-
The construtor requires the questions model, whether it is the **300** model or short model with **120** questions. It also has the version to do simulations with the questions that are [reversed](https://ipip.ori.org/newScoringInstructions.htm). For this, you must turn the **test** variable from false to true, for more details on reverse scoring tests see section [Experiments with reverse scoring questions](https://github.com/neural7/five-factor-e/blob/main/data/README.md).
82+
The construtor requires the questions model, whether it is the **300** model or short model with **120** questions. It also has the version to do simulations with the questions that are [reversed](https://ipip.ori.org/newScoringInstructions.htm). For this, you must turn the **test** variable from false to true, for more details on reverse scoring tests see section [Experiments with reverse scoring questions](https://github.com/rewire5-io/five-factor-e/blob/main/data/README.md).
8383

8484
| Parameters | Type | Description |
8585
| ------------- | --------- | ----------------------------------------------------------------- |
@@ -102,12 +102,12 @@ from ipipneo import IpipNeo
102102
ipip = IpipNeo(question=300)
103103
```
104104

105-
The answers must be in a *standardized json*, you can insert this template in the [data](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/answers.json) folder of the project. This dictionary contains random answers, used for testing purposes only. As an example, you can load the file with the **120** test responses:
105+
The answers must be in a *standardized json*, you can insert this template in the [data](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/answers.json) folder of the project. This dictionary contains random answers, used for testing purposes only. As an example, you can load the file with the **120** test responses:
106106

107107
```python
108108
import json, urllib.request
109109

110-
data = urllib.request.urlopen("https://raw.githubusercontent.com/neural7"\
110+
data = urllib.request.urlopen("https://raw.githubusercontent.com/rewire5-io"\
111111
"/five-factor-e/main/data/IPIP-NEO/120/answers.json").read()
112112

113113
answers120 = json.loads(data)
@@ -118,7 +118,7 @@ For the long inventory version with **300** items.
118118
```python
119119
import json, urllib.request
120120

121-
data = urllib.request.urlopen("https://raw.githubusercontent.com/neural7"\
121+
data = urllib.request.urlopen("https://raw.githubusercontent.com/rewire5-io"\
122122
"/five-factor-e/main/data/IPIP-NEO/300/answers.json").read()
123123

124124
answers300 = json.loads(data)
@@ -200,7 +200,7 @@ An example of the output of the results:
200200
}
201201
```
202202

203-
Example of the complete output check here: [Big 5️⃣ Output](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/result.json)
203+
Example of the complete output check here: [Big 5️⃣ Output](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/result.json)
204204

205205
### Tests 🏗
206206

@@ -227,14 +227,14 @@ $ pip install five-factor-e[quiz]
227227
Example output with graphics:
228228

229229
<p align="center">
230-
<img src="https://raw.githubusercontent.com/neural7/five-factor-e/feature/v1.5.0/doc/sample-light-1.png" alt="Big Five Results" border="1"/>
230+
<img src="https://raw.githubusercontent.com/rewire5-io/five-factor-e/feature/v1.5.0/doc/sample-light-1.png" alt="Big Five Results" border="1"/>
231231
</p>
232232

233233
*The complete result is saved in the run folder in json format*.
234234

235235
### About data 📊
236236

237-
Inside the data [data](https://github.com/neural7/five-factor-e/blob/main/data/) directory, there are examples of questions and answers. The most important is the response data entry which must follow the pattern of this [file](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/answers.json). Example:
237+
Inside the data [data](https://github.com/rewire5-io/five-factor-e/blob/main/data/) directory, there are examples of questions and answers. The most important is the response data entry which must follow the pattern of this [file](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/answers.json). Example:
238238

239239
```json
240240
{
@@ -251,7 +251,7 @@ Inside the data [data](https://github.com/neural7/five-factor-e/blob/main/data/)
251251
}
252252
```
253253

254-
The id question field refers to the question in this [file](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/questions.json).
254+
The id question field refers to the question in this [file](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/questions.json).
255255
Obviously if you want you can change the translation of the question, *but don't change the ID of the question*.
256256

257257
Note 🚩:
@@ -279,4 +279,4 @@ Note 🚩:
279279

280280
### Authors 👨‍💻
281281

282-
* [Ederson Corbari](mailto:e@neural7.io) 👽
282+
* [Ederson Corbari](mailto:e@rewire5.io) 👽

RELEASES.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,50 @@
1-
<img src="https://raw.githubusercontent.com/neural7/five-factor-e/main/doc/neural7.png" align="right" width="80" height="70"/>
1+
<img src="https://raw.githubusercontent.com/rewire5-io/five-factor-e/main/doc/rewire5-io.png" align="right" width="80" height="70"/>
22

33
### Releases 🎈
44

5-
Release **[1.8.0](https://github.com/neural7/five-factor-e/releases/tag/v1.8.0)**:
5+
Release **[1.9.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.9.0)**:
66

77
* Leaving the json format more Pythonic;
88
* Revised README files.
99

10-
Release **[1.7.0](https://github.com/neural7/five-factor-e/releases/tag/v1.7.0)**:
10+
Release **[1.8.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.8.0)**:
11+
12+
* Leaving the json format more Pythonic;
13+
* Revised README files.
14+
15+
Release **[1.7.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.7.0)**:
1116

1217
* Leaving the age range between 10 to 110 years;
1318
* Revised README files.
1419

15-
Release **[1.6.0](https://github.com/neural7/five-factor-e/releases/tag/v1.6.0)**:
20+
Release **[1.6.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.6.0)**:
1621

1722
* Added to the return with the big-five averages: (low, average, high);
1823
* Refactoring of the reverse scored questions code;
1924
* Added to the quiz program, the verification of the translation of the questions (120 or 300);
2025
* Added new topics to PyPI setup.
2126

22-
Release **[1.5.0](https://github.com/neural7/five-factor-e/releases/tag/v1.5.0)**:
27+
Release **[1.5.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.5.0)**:
2328

2429
* Added support for original IPIP version with 300 items;
2530
* Refactoring of the program for testing the questions (quiz);
2631
* Added support for simulate question with reversed score;
2732
* Revised README files.
2833

29-
Release **[1.4.0](https://github.com/neural7/five-factor-e/releases/tag/v1.4.0)**:
34+
Release **[1.4.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.4.0)**:
3035

3136
* Adding language support Portuguese Brazil (pt-br) and Spain (es-es).
3237

33-
Release **[1.3.0](https://github.com/neural7/five-factor-e/releases/tag/v1.3.0)**::
38+
Release **[1.3.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.3.0)**::
3439

3540
* Fix of the normalization calculation of norms;
3641
* Fix of answers that have inversion, different weights.
3742

38-
Release **[1.2.0](https://github.com/neural7/five-factor-e/releases/tag/v1.2.0)**:
43+
Release **[1.2.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.2.0)**:
3944

4045
* Adding inventory tests (quiz).
4146

42-
Release **[1.1.0](https://github.com/neural7/five-factor-e/releases/tag/v1.1.0)**:
47+
Release **[1.1.0](https://github.com/rewire5-io/five-factor-e/releases/tag/v1.1.0)**:
4348

4449
* Initial version of IPIP-NEO;
4550
* Adding license information.

data/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<img src="https://raw.githubusercontent.com/neural7/five-factor-e/main/doc/neural7.png" align="right" width="80" height="70"/>
1+
<img src="https://raw.githubusercontent.com/rewire5-io/five-factor-e/main/doc/rewire5.png" align="right" width="80" height="70"/>
22

33
### About data 📊
44

55
The data directory contains the artifacts used for the [IPIP-NEO](https://ipip.ori.org/) used by this library, in the short version with **120** items and the long version with **300** items.
66

7-
If you are thinking of using this library in your project, you should follow the standard question and answer files proposed in examples [120](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/answers.json) and [300](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/300/answers.json).
7+
If you are thinking of using this library in your project, you should follow the standard question and answer files proposed in examples [120](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/answers.json) and [300](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/300/answers.json).
88

9-
The translations of the questions are in the [translation](https://github.com/neural7/five-factor-e/tree/main/data/IPIP-NEO/120/translation) folder, as the translations happen, we will attach them to this directory. If you want to send a translation that is not in the repository, feel free to contribute with us following the [json file pattern](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/translation/questions-en-us.json).
9+
The translations of the questions are in the [translation](https://github.com/rewire5-io/five-factor-e/tree/main/data/IPIP-NEO/120/translation) folder, as the translations happen, we will attach them to this directory. If you want to send a translation that is not in the repository, feel free to contribute with us following the [json file pattern](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/translation/questions-en-us.json).
1010

1111
### Experiments with reverse scoring questions ⚡
1212

13-
If you want to test and experiment with questions with the reverse order, you need to use the [example json file](https://github.com/neural7/five-factor-e/blob/main/data/IPIP-NEO/120/test/answers-1.json). Answers that have the key (reverse_scored = *1*) will have the reverse score ie: The value selected was *5*, it will be turned into *1*. You can read more about it here:
13+
If you want to test and experiment with questions with the reverse order, you need to use the [example json file](https://github.com/rewire5-io/five-factor-e/blob/main/data/IPIP-NEO/120/test/answers-1.json). Answers that have the key (reverse_scored = *1*) will have the reverse score ie: The value selected was *5*, it will be turned into *1*. You can read more about it here:
1414

1515
* [https://ipip.ori.org/newScoringInstructions.htm](https://ipip.ori.org/newScoringInstructions.htm)
1616
* [https://ipip.ori.org/newMultipleconstructs.htm](https://ipip.ori.org/newMultipleconstructs.htm)
@@ -50,6 +50,6 @@ from ipipneo import IpipNeo
5050
IpipNeo(question=120, test=True).compute(sex="M", age=40, answers=answers120, compare=True)
5151
```
5252

53-
If you have any questions, please send us an email to: (**e at neural.io**) or create an issue reporting the question of the problem in the repository of this project (https://github.com/neural7/five-factor-e/issues).
53+
If you have any questions, please send us an email to: (**e at neural.io**) or create an issue reporting the question of the problem in the repository of this project (https://github.com/rewire5-io/five-factor-e/issues).
5454

5555
Thanks!
File renamed without changes.

ipipneo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Import of the classes to be used."""
22

33
__name__ = "five-factor-e"
4-
__version__ = "1.8.0"
4+
__version__ = "1.9.0"
55

66
from ipipneo.ipipneo import IpipNeo

ipipneo/facet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Creation and scoring of the facets that make up the Big-Five."""
22

33
__author__ = "Ederson Corbari"
4-
__email__ = "e@neural7.io"
5-
__copyright__ = "Copyright Neural7 2022, Big 5 Personality Traits"
4+
__email__ = "e@rewire5.io"
5+
__copyright__ = "Copyright ReWire5 2022-2023, Big 5 Personality Traits"
66
__credits__ = ["John A. Johnson", "Dhiru Kholia"]
77
__license__ = "MIT"
8-
__version__ = "1.8.0"
8+
__version__ = "1.9.0"
99
__status__ = "production"
1010

1111
from enum import IntEnum

ipipneo/ipipneo.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""It does the calculations to generate the IPIP-NEO results based on the questions and answers."""
22

33
__author__ = "Ederson Corbari"
4-
__email__ = "e@neural7.io"
5-
__copyright__ = "Copyright Neural7 2022, Big 5 Personality Traits"
4+
__email__ = "e@rewire5.io"
5+
__copyright__ = "Copyright ReWire5 2022-2023, Big 5 Personality Traits"
66
__credits__ = ["John A. Johnson", "Dhiru Kholia"]
77
__license__ = "MIT"
8-
__version__ = "1.8.0"
8+
__version__ = "1.9.0"
99
__status__ = "production"
1010

1111
import copy
@@ -19,6 +19,7 @@
1919
organize_list_json,
2020
raise_if_age_is_invalid,
2121
raise_if_sex_is_invalid,
22+
add_dict_footer,
2223
)
2324

2425

@@ -58,7 +59,9 @@ def evaluator(self, sex: str, age: int, score: list) -> dict:
5859
normc = Norm.calc(domain=self.domain(score=score), norm=norm)
5960
assert isinstance(normc, dict), "normc must be a dict"
6061

61-
distrib = self.distrib(size=len(score), b5=self.b5create(score=score), norm=norm)
62+
distrib = self.distrib(
63+
size=len(score), b5=self.b5create(score=score), norm=norm
64+
)
6265
assert isinstance(distrib, dict), "distrib must be a dict"
6366

6467
normalize = Norm.normalize(normc=normc, percent=Norm.percent(normc=normc))
@@ -79,10 +82,9 @@ def evaluator(self, sex: str, age: int, score: list) -> dict:
7982
return {
8083
"id": str(uuid.uuid4()),
8184
"theory": "Big 5 Personality Traits",
82-
"model": "IPIP-NEO",
85+
"model": "IPIP-NEO" if self._nquestion == 120 else "IPIP",
8386
"question": self._nquestion,
8487
"test": self._test,
85-
"version": __version__,
8688
"person": {
8789
"sex": sex,
8890
"age": age,
@@ -96,6 +98,7 @@ def evaluator(self, sex: str, age: int, score: list) -> dict:
9698
]
9799
},
98100
},
101+
**add_dict_footer(),
99102
}
100103

101104
def compute(self, sex: str, age: int, answers: dict, compare: bool = False) -> dict:
@@ -120,7 +123,9 @@ def compute(self, sex: str, age: int, answers: dict, compare: bool = False) -> d
120123
reversed = ReverseScoredCustom(answers=answers)
121124
else:
122125
reversed = (
123-
ReverseScored120(answers=answers) if self._nquestion == 120 else ReverseScored300(answers=answers)
126+
ReverseScored120(answers=answers)
127+
if self._nquestion == 120
128+
else ReverseScored300(answers=answers)
124129
)
125130
assert isinstance(reversed, dict), "reversed must be a dict"
126131

ipipneo/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Auxiliary constants that are used in the library."""
22

33
__author__ = "Ederson Corbari"
4-
__email__ = "e@neural7.io"
5-
__copyright__ = "Copyright Neural7 2022, Big 5 Personality Traits"
4+
__email__ = "e@rewire5.io"
5+
__copyright__ = "Copyright ReWire5 2022-2023, Big 5 Personality Traits"
66
__credits__ = ["John A. Johnson", "Dhiru Kholia"]
77
__license__ = "MIT"
8-
__version__ = "1.8.0"
8+
__version__ = "1.9.0"
99
__status__ = "production"
1010

1111
from enum import Enum, IntEnum

ipipneo/norm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""The standard with the rules of IPIP-NEO norms."""
22

33
__author__ = "Ederson Corbari"
4-
__email__ = "e@neural7.io"
5-
__copyright__ = "Copyright Neural7 2022, Big 5 Personality Traits"
4+
__email__ = "e@rewire5.io"
5+
__copyright__ = "Copyright ReWire5 2022-2023, Big 5 Personality Traits"
66
__credits__ = ["John A. Johnson", "Dhiru Kholia"]
77
__license__ = "MIT"
8-
__version__ = "1.8.0"
8+
__version__ = "1.9.0"
99
__status__ = "production"
1010

1111
from enum import IntEnum

0 commit comments

Comments
 (0)