diff --git a/.github/workflows/condor_review.yml b/.github/workflows/condor_review.yml new file mode 100644 index 0000000..f624a41 --- /dev/null +++ b/.github/workflows/condor_review.yml @@ -0,0 +1,24 @@ +name: Condor Code Review + +on: [pull_request] + +jobs: + review: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install condor_code_reviewer + + - name: Run Condor + run: condor --openai-key ${{ secrets.OPENAI_KEY }} --gh-api-key ${{ secrets.GH_API_KEY }} --assistant-id ${{ secrets.ASSISTANT_ID }} --pull-request-url ${{ github.event.pull_request.html_url }} diff --git a/run_copy.py b/run_copy.py new file mode 100644 index 0000000..9fa540a --- /dev/null +++ b/run_copy.py @@ -0,0 +1,44 @@ +import pandas as pd +import matplotlib.pyplot as plt +import seaborn as sns + +def read_and_clean_data(file_path): + try: + # Read the CSV file + df = pd.read_csv(file_path) + + # Clean the data + df = df.dropna() # remove rows with missing values + df.columns = df.columns.str.strip() # remove leading/trailing spaces from column names + + return df + except FileNotFoundError: + print(f"File not found: {file_path}") + return None + except pd.errors.EmptyDataError: + print(f"No data in file: {file_path}") + return None + except Exception as e: + print(f"Error occurred: {e}") + return None + +def create_bar_plot(df, x_col, y_col): + # Set the style + sns.set(style="whitegrid") + + # Create the bar plot + fig, ax = plt.subplots(figsize=(10, 6)) + sns.barplot(x=x_col, y=y_col, data=df, ax=ax, palette="Blues_d") + + # Customize the plot + ax.set_title('Bar Plot', fontsize=15) + ax.set_xlabel(x_col, fontsize=12) + ax.set_ylabel(y_col, fontsize=12) + + # Show the plot + plt.show() + +# Use the functions +data = read_and_clean_data('your_file.csv') +if data is not None: + create_bar_plot(data, 'column1', 'column2')