Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Semantic creation functions #6

Merged
merged 4 commits into from
Jun 3, 2020
Merged

Conversation

Meissnerinc
Copy link
Contributor

Create semantics function now only returns the semantics and does not alter the original dataframe

Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test test_upload_event_log_from_df fails at line 92 and the following:

resp = self.api.upload_event_log_df(
    'pylana-test-log-from-df', df_log, df_case, time_format='yyyy-MM-dd HH:mm:ss')

self.assertEqual(resp.status_code, 200)

which means the method upload_event_log_df is likely broken, assumed that the test expectation hasn't changed.

pylana/utils.py Outdated
Comment on lines 67 to 68
for i in range(0, len(df.columns)):
col = df.columns[i]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be pythonically simplified to

for i, col in enumerate(df.columns):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

pylana/utils.py Outdated Show resolved Hide resolved
@Meissnerinc Meissnerinc requested a review from bosyk May 7, 2020 14:53
Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the case id column naming independent from the lana api convention and made the code slightly more pythonic by removing reliance on indices.

pylana/utils.py Outdated

return df.loc[:, [c['name'] for c in dct_bare]], dct_bare
dct_bare = []
ids = ["Case ID", "Action"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space character are not nice, since it prevents accessing a data frame atribute lime df.name. Better use CaseID.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realised that the issue with the case id naming was purely a lana issue, so I introduced a mapping between a required name for the case id column in python. Thus, we can allow case id names we like, currently Case_ID and CaseID.

@bosyk bosyk merged commit 45281ec into development Jun 3, 2020
@bosyk bosyk deleted the semantic-creation-functions branch September 22, 2020 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants