Skip to content

Commit

Permalink
Extra scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-Rey committed Nov 19, 2024
1 parent a883f39 commit db9e72a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 4 deletions.
24 changes: 24 additions & 0 deletions examples/anonymise_submissions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Make file with anonymised submissions to share with sister conferences
# (for dual-submission detection)
# Ulle Endriss, 14 April 2024
import os

from easychair_extra.read import read_submission


def main():
current_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.join(current_dir, "..", "easychair_sample_files")

# read submission and author files
submissions = read_submission(
os.path.join(root_dir, "submission.csv"),
remove_deleted=True
)

submissions["id"] = submissions["#"]
submissions.to_csv("anonymised_submissions.csv", sep=",", encoding="utf-8", columns=["id", "title", "abstract"], index=False)


if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion examples/papers_with_same_authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pandas as pd

from easychair_extra.read import read_submission, read_committee
from easychair_extra.read import read_submission


def main():
Expand Down
24 changes: 24 additions & 0 deletions examples/papers_with_short_abstracts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Help finding placeholder abstracts
# Ulle Endriss, 14 April 2024
import os

from easychair_extra.read import read_submission


def main():
current_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.join(current_dir, "..", "easychair_sample_files")

# read submission and author files
submissions = read_submission(
os.path.join(root_dir, "submission.csv"),
remove_deleted=True
)
submissions["abstract_len"] = submissions.apply(lambda df_row: len(df_row["abstract"]), axis=1)

submissions.to_csv("abstract.csv", sep=",", encoding="utf-8", columns=["#", "abstract_len", "abstract"], index=False)


if __name__ == "__main__":
main()

2 changes: 0 additions & 2 deletions examples/plot_num_pc_per_area.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import pathlib
from collections import Counter, defaultdict

import csv
import os.path

import pandas as pd
Expand Down
8 changes: 7 additions & 1 deletion test/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
authors_as_list,
author_list_to_str,
read_topics,
read_committee,
read_committee, read_author,
)


Expand Down Expand Up @@ -132,3 +132,9 @@ def test_read_committee(self):
for arg in arguments:
args[arg] = optional_arguments[arg]
read_committee(os.path.join(root_dir, "committee.csv"), **args)

def test_read_author(self):
current_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.join(current_dir, "..", "easychair_sample_files")

read_author(os.path.join(root_dir, "author.csv"))

0 comments on commit db9e72a

Please sign in to comment.