Skip to content

Commit

Permalink
Merge branch 'master' into feat/add-profile-json-to-parsing-warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdellahitech authored Mar 15, 2024
2 parents 34e3896 + 16f03f1 commit cf222c1
Show file tree
Hide file tree
Showing 28 changed files with 393 additions and 68 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@



## v4.10.0 (2024-02-29)

### Feature

* feat: make docs maintains notebooks folder for each connector
BREAKING CHANGE: for users that rely on generate_docs helper ([`77b8da9`](https://github.com/Riminder/hrflow-connectors/commit/77b8da9db409c396fe7e5abe94894fe8665ac614))

### Fix

* fix: exclude .gitkeep in notebooks from calculation of connector update_at in main readme ([`4f465c8`](https://github.com/Riminder/hrflow-connectors/commit/4f465c8d0918958267166f8bbacbe31504f1dbd4))


## v4.9.0 (2024-02-19)

### Feature
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hrflow-connectors"
version = "4.9.0"
version = "4.10.0"
description = "hrflow-connectors is an open source project created by HrFlow.ai to allow developers to connect easily HR ecosystem component."
license = "Apache-2.0"
authors = ["HrFlow.ai <support+hrflow_connectors@hrflow.ai>"]
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To make sure you can successfully run the latest versions of the example scripts
To browse the examples of actions corresponding to released versions of 🤗 this connector, you just need to import the module like this :

<p align="center">
<image src=https://github.com/Riminder/hrflow-connectors/assets/135601200/c09d00f8-8332-4315-aeab-dd1beed301cc width=90% height=100% >
<image src=https://github.com/Riminder/hrflow-connectors/assets/135601200/089bc6d4-f7bb-4095-8b26-dda7b0de2538 width=90% height=100% >
</p>

Once the connector module is imported, you can leverage all the different actions that it offers.
Expand Down
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion src/hrflow_connectors/connectors/jobology/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For more code details checkout connector code.

# 🔗 Useful Links

- 📄Visit [Jobology](https://www.jobology.com/) to learn more.
- 📄Visit [Jobology](https://www.jobology.fr/) to learn more.
- 💻 [Connector code](https://github.com/Riminder/hrflow-connectors/tree/master/src/hrflow_connectors/connectors/jobology) on our Github.


Expand Down
Empty file.
16 changes: 10 additions & 6 deletions src/hrflow_connectors/connectors/lever/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [😍 Why is it a big deal for Lever customers & partners?](#-why-is-it-a-big-deal-for-lever-customers--partners)
- [🔧 How does it work?](#-how-does-it-work)
- [📊 Data integration capabilities:](#-data-integration-capabilities)
- [🧠 Artificial Intelligence capabilities:](#-artificial-intelligence-capabilities)
- [🔌 Connector Actions](#-connector-actions)
- [💍 Quick Start Examples](#-quick-start-examples)
- [🔗 Useful Links](#-useful-links)
Expand All @@ -15,6 +14,9 @@

> Lever is a modern recruitment platform that helps companies streamline their hiring process.
<p align="center">
<image src=https://github.com/Riminder/hrflow-connectors/assets/135601200/138a7d3b-d14d-4095-a50a-3a5395cb69e7 width=90% height=100% >
</p>

## 😍 Why is it a big deal for Lever customers & partners?

Expand All @@ -27,13 +29,8 @@ This new connector will enable:
- ⬅️ Send Profiles data from Lever to a Destination of your choice.
- ➡️ Send Profiles data from a Source of your choice to Lever.
- ⬅️ Send Jobs data from Lever to a Destination of your choice.
- ➡️ Send Jobs data from a Source of your choice to Lever.


## 🧠 Artificial Intelligence capabilities:
- Extract, Structure, and Categorize Talent & Workforce data
- Search, Score, and Match Profiles & Jobs with our APIs and AI Widgets (**Matching Custom Tab in Lever**)


# 🔌 Connector Actions
<p align="center">
Expand All @@ -47,6 +44,10 @@ This new connector will enable:

</p>

<p align="center">
<image src=https://github.com/Riminder/hrflow-connectors/assets/135601200/313c58d9-e5b4-48f6-98d0-1e5c37021daf width=90% height=100% >
</p>


# 💍 Quick Start Examples

Expand All @@ -55,6 +56,9 @@ To make sure you can successfully run the latest versions of the example scripts

To browse the examples of actions corresponding to released versions of 🤗 this connector, you just need to import the module like this :

<p align="center">
<image src=https://github.com/Riminder/hrflow-connectors/assets/135601200/534807aa-34a4-422f-8fbc-26b5e00c5c34 width=90% height=100% >
</p>

Once the connector module is imported, you can leverage all the different actions that it offers.

Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions src/hrflow_connectors/connectors/salesforce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ Once logged to your Salesforce environment go to Setup then click Create > Custo
<image width="1919" alt="HrFlow Experiences" src="https://github.com/Riminder/hrflow-connectors/assets/65894619/3006d23f-2944-4e8e-89b1-c6b58a49de21">
<image width="1919" alt="HrFlow Attachments" src="https://github.com/Riminder/hrflow-connectors/assets/65894619/dfcdba59-658b-4a75-870b-99c991f53935">

## Hrflow.ai Recruiter Copilot Widget installed in Salesforce
<image width="1919" alt="Scoring" src="https://github.com/Riminder/hrflow-connectors/assets/135601200/2434d21a-1994-4e16-a6b0-65d7e2a6fa49">

# 📊 Data Flow
In this section, we outline the data flow between different components of the connector. The following schema provides a graphical representation of the data exchange process

Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
48 changes: 44 additions & 4 deletions src/hrflow_connectors/core/documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import subprocess
import typing as t
from contextvars import ContextVar
from datetime import datetime
from datetime import datetime, timezone
from pathlib import Path

from pydantic import BaseModel
Expand Down Expand Up @@ -34,7 +34,7 @@ def CONNECTOR_LISTING_REGEXP_F(name: str) -> str:
return (
r"\|\s*\[?\*{0,2}(?i:(?P<name>"
+ r" ?".join([c for c in name if c.strip()])
+ r"))\*{0,2}(\]\([^)]+\))?\s*\|[^|]+\|[^|]+\|\s*(\*|_)(?P<release_date>[\d\/]+)(\*|_)\s*\|.+"
+ r"))\*{0,2}(\]\([^)]+\))?\s*\|[^|]+\|[^|]+\|\s*(\*|_)(?P<release_date>[\d\/]+)(\*|_)\s*\|\s*(\*|_)(?P<update_date>[\d\/]+)(\*|_)\s*\|.+"
)


Expand All @@ -43,10 +43,13 @@ def CONNECTOR_LISTING_REGEXP_F(name: str) -> str:
)


GIT_UPDATE_EXCLUDE_PATTERN = (
r"(notebooks/\.gitkeep|README\.md|test\-config\.yaml|logo\.png|docs/)"
)
GIT_UPDATE_TIMEOUT = 5
GIT_UPDATE_DATE = """
git ls-tree -r --name-only HEAD {base_connector_path}/{connector} | while read filename; do
echo "$(git log -1 --format="%aI" -- $filename)"
echo "$(git log -1 --format="%aI" -- $filename) $filename"
done
"""

Expand Down Expand Up @@ -185,9 +188,16 @@ def update_root_readme(connectors: t.List[Connector], root: Path) -> t.Dict:
"Subprocess run for Git update dates failed for connector {} with"
" errors {}".format(model.name.lower(), result.stderr)
)
filtered = [
line.split(" ")[0]
for line in filter(
lambda line: not re.search(GIT_UPDATE_EXCLUDE_PATTERN, line),
result.stdout.strip().splitlines(),
)
]
updated_at = datetime.fromisoformat(
max(
result.stdout.strip().splitlines(),
filtered,
key=lambda d: datetime.fromisoformat(d),
)
)
Expand All @@ -209,6 +219,13 @@ def update_root_readme(connectors: t.List[Connector], root: Path) -> t.Dict:
model.name, pattern
)
)
current_updated_at = datetime.strptime(
match.group("update_date"), "%d/%m/%Y"
).replace(tzinfo=timezone.utc)
updated_at = (
current_updated_at if current_updated_at >= updated_at else updated_at
)

updated_listing = (
"| [**{name}**]({readme_link}) | {type} | :white_check_mark: |"
" *{release_date}* | *{updated_at}* | {pull_profile_list_status} |"
Expand All @@ -235,6 +252,9 @@ def update_root_readme(connectors: t.List[Connector], root: Path) -> t.Dict:
readme.write_bytes(readme_content.encode())


KEEP_EMPTY_NOTEBOOKS = ".gitkeep"


def generate_docs(
connectors: t.List[Connector], connectors_directory: Path = CONNECTORS_DIRECTORY
) -> None:
Expand Down Expand Up @@ -281,6 +301,26 @@ def generate_docs(
)
updated_readme_content = py_37_38_compat_patch(updated_readme_content)
readme.write_bytes(updated_readme_content.encode())

notebooks_directory = connector_directory / "notebooks"
empty_dir_file = notebooks_directory / KEEP_EMPTY_NOTEBOOKS
create_empty_file = True

if notebooks_directory.is_dir():
for child in notebooks_directory.iterdir():
if not child.name == empty_dir_file.name:
create_empty_file = False
try:
empty_dir_file.unlink()
except FileNotFoundError:
pass
break
else:
notebooks_directory.mkdir()

if create_empty_file:
empty_dir_file.touch()

if len(model.actions) > 0:
action_docs_directory = connector_directory / "docs"
if not action_docs_directory.is_dir():
Expand Down
Loading

0 comments on commit cf222c1

Please sign in to comment.