Skip to content

Commit 94285cb

Browse files
committed
fix: formatting after review
1 parent 5c03568 commit 94285cb

3 files changed

Lines changed: 109 additions & 94 deletions

File tree

hrflow/job/matching.py

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -36,57 +36,63 @@ def list(
3636
**kwargs,
3737
):
3838
"""
39-
Retrieve the matching information.
39+
💾 Match Jobs indexed in Boards to a Job
40+
(https://api.hrflow.ai/v1/jobs/matching).
4041
4142
Args:
42-
job_key: <string>
43-
job_reference: <string>
4443
board_key: <string>
45-
baord_keys: <list>
46-
limit: <int> (default to 30)
47-
number of fetched jobs/page
48-
page: <int> REQUIRED default to 1
49-
number of the page associated to the pagination
50-
sort_by: <string>
51-
order_by: <string>
52-
created_at_min: <string>
53-
The minimum date of creation of the targeted Jobs.
54-
Format : "YYYY-MM-DD".
55-
created_at_max: <string>
56-
The maximum date of creation of the targeted Jobs.
57-
Format : "YYYY-MM-DD".
58-
Returns
59-
Applies the params to filter on Jobs in the targeted Boards and
60-
returns the response from the endpoint.
61-
Response examples :
62-
- Success response :
44+
The key of the Board in which the job is indexed.
45+
job_key: <string>
46+
The key of a specific job to macth with.
47+
job_reference: <string>
48+
The reference of a specific job to macth with.
49+
board_keys: <list>
50+
A list of keys for multiple Boards of profiles to be matched with the specific job.
51+
Example : ["xxx", "yyy", "zzz"]
52+
limit: <int> (default to 30)
53+
number of fetched jobs/page
54+
page: <int> REQUIRED default to 1
55+
number of the page associated to the pagination
56+
sort_by: <string>
57+
order_by: <string>
58+
created_at_min: <string>
59+
The minimum date of creation of the targeted Jobs.
60+
Format: "YYYY-MM-DD".
61+
created_at_max: <string>
62+
The maximum date of creation of the targeted Jobs.
63+
Format: "YYYY-MM-DD".
64+
65+
Returns:
66+
Match the job identified by job_key or job_reference
67+
and board_key with all jobs in the boards identified by keys in board_keys list.
68+
Response examples:
69+
- Success response:
6370
{
6471
"code": 200, # response code
6572
"message": "Job Matching results", # response message
66-
"meta" : {'page': 1, # current page
67-
'maxPage': 5, # max page in the paginated response
68-
'count': 2, # number of jobs in the current page
69-
'total': 10}, # total number of jobs retrieved
70-
"data": { # list of jobs objects
71-
"predictions":[
72-
[]
73-
]
74-
"jobs":[
75-
{
76-
"key": "xxx",
77-
"reference": "xxx",
73+
"meta" : {
74+
'page': 1, # current page
75+
'maxPage': 5, # max page in the paginated response
76+
'count': 2, # number of jobs in the current page
77+
'total': 10 # total number of jobs retrieved
78+
},
79+
"data": { # list of jobs objects
80+
"predictions": [[]],
81+
"jobs": [
82+
{
83+
"key": "xxx",
84+
"reference": "xxx",
85+
...
86+
},
7887
...
79-
},
80-
...
8188
]
8289
}
8390
}
84-
- Error response : (if the board_key is not valid)
91+
- Error response: (if the board_key is not valid)
8592
{
8693
"code": 400,
8794
"message": "Invalid parameters. Unable to find object: source"
8895
}
89-
9096
"""
9197

9298
query_params = {

hrflow/profile/grading.py

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,44 @@
1818

1919
class ProfileGrading:
2020
def __init__(self, api):
21-
"""Init."""
21+
"""Initialize the ProfileGrading class with the provided API client."""
2222
self.client = api
2323

2424
@rate_limiter
2525
def get(
2626
self,
27-
algorithm_key: t.Literal[
28-
"1d07451c0f33091869bd3c6d336dfa4e5c63af74",
29-
"daaa0f61b72a68b985f31d123ad45b361adc91e4",
30-
],
31-
source_key,
32-
board_key,
33-
profile_key=None,
34-
profile_reference=None,
35-
job_key=None,
36-
job_reference=None,
27+
algorithm_key: str,
28+
source_key: str,
29+
board_key: str,
30+
profile_key: t.Optional[str] = None,
31+
profile_reference: t.Optional[str] = None,
32+
job_key: t.Optional[str] = None,
33+
job_reference: t.Optional[str] = None,
3734
):
3835
"""
3936
💾 Grade a Profile indexed in a Source for a Job
4037
(https://api.hrflow.ai/v1/profile/grading).
4138
4239
Args:
40+
algorithm_key: <string>
41+
The key of the grading algorithm to use.
42+
Refer to the documentation: https://developers.hrflow.ai/reference/grade-a-profile-indexed-in-a-source-for-a-job
43+
for all possible values.
4344
source_key: <string>
44-
The key of the Source where the profile is indexed.
45-
key: <string>
46-
The Profile unique identifier.
47-
reference: <string>
48-
The Profile reference chosen by the customer.
45+
The key of the Source where the profile to grade is indexed.
46+
board_key: <string>
47+
The key of the Board where the job to grade to is indexed.
48+
profile_key: <string>
49+
(Optional) The Profile unique identifier.
50+
profile_reference: <string>
51+
(Optional) The Profile reference chosen by the customer.
4952
job_key: <string>
53+
(Optional) The Job unique identifier.
5054
job_reference: <string>
51-
board_key: <string>
55+
(Optional) The Job reference chosen by the customer.
5256
53-
Returns
54-
Get information
57+
Returns:
58+
The grading information for the profile, based on the specified job.
5559
5660
"""
5761
query_params = {

hrflow/profile/matching.py

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class ProfileMatching:
1919
def __init__(self, api):
20-
"""Init."""
20+
"""Initialize the ProfileMatching class with the provided API client."""
2121
self.client = api
2222

2323
@rate_limiter
@@ -36,58 +36,63 @@ def list(
3636
**kwargs,
3737
):
3838
"""
39-
Retrieve the matching information.
39+
💾 Match Profils indexed in Sources to a Profile
40+
(https://api.hrflow.ai/v1/profils/matching).
4041
4142
Args:
42-
profile_key: <string>
43-
profile_reference: <string>
4443
source_key: <string>
45-
source_keys: <list>
46-
source_keys
44+
The key of the Source in which the profile is indexed.
45+
profile_key: <string> (Optional)
46+
The key of a specific profile to macth with.
47+
profile_reference: <string> (Optional)
48+
The reference of a specific profile to macth with.
49+
source_keys: <list> (Optional)
50+
A list of keys for multiple Sources of profiles to be matched with the profile.
51+
page: <int> (default to 1)
52+
The page number for pagination.
4753
limit: <int> (default to 30)
48-
number of fetched profiles/page
49-
page: <int> REQUIRED default to 1
50-
number of the page associated to the pagination
51-
sort_by: <string>
52-
order_by: <string>
53-
created_at_min: <string>
54-
The minimum date of creation of the targeted Profiles.
55-
Format : "YYYY-MM-DD".
56-
created_at_max: <string>
57-
The maximum date of creation of the targeted Profiles.
58-
Format : "YYYY-MM-DD".
59-
Returns
60-
Applies the params to filter on Profiles in the targeted Sources and
61-
returns the response from the endpoint.
62-
Response examples :
63-
- Success response :
54+
Number of profiles to fetch per page.
55+
sort_by: <string> (default to "created_at")
56+
The field to sort by.
57+
order_by: <string> (Optional)
58+
The order of sorting, either 'asc' or 'desc'.
59+
created_at_min: <string> (Optional)
60+
The minimum creation date of the profiles in format "YYYY-MM-DD".
61+
created_at_max: <string> (Optional)
62+
The maximum creation date of the profiles in format "YYYY-MM-DD".
63+
64+
Returns:
65+
Match the profile identified by profile_key or profile_reference
66+
and board_key with all profiles in the sources identified by keys in source_keys list.
67+
68+
Response examples:
69+
- Success response:
6470
{
6571
"code": 200, # response code
6672
"message": "Profile Matching results", # response message
67-
"meta" : {'page': 1, # current page
68-
'maxPage': 5, # max page in the paginated response
69-
'count': 2, # number of profiles in the current page
70-
'total': 10}, # total number of profiles retrieved
71-
"data": { # list of profiles objects
72-
"predictions":[
73-
[]
74-
]
75-
"profiles":[
76-
{
77-
"key": "xxx",
78-
"reference": "xxx",
73+
"meta": {
74+
'page': 1, # current page
75+
'maxPage': 5, # max page in the paginated response
76+
'count': 2, # number of profiles in the current page
77+
'total': 10 # total number of profiles retrieved
78+
},
79+
"data": { # list of profile objects
80+
"predictions": [[]],
81+
"profiles": [
82+
{
83+
"key": "xxx",
84+
"reference": "xxx",
85+
...
86+
},
7987
...
80-
},
81-
...
8288
]
8389
}
8490
}
85-
- Error response : (if the source_key is not valid)
91+
- Error response: (if the source_key is not valid)
8692
{
8793
"code": 400,
8894
"message": "Invalid parameters. Unable to find object: source"
8995
}
90-
9196
"""
9297

9398
query_params = {

0 commit comments

Comments
 (0)