MuellMark / Course-Scheduler

Repository for the Course Scheduler Capstone Project
http://colbysullivan.pythonanywhere.com/
3 stars 1 forks source link

Final touches for CSV to Script Requirements #160

Open colbySullivan opened 1 month ago

colbySullivan commented 1 month ago

This issues is dedicated to all CSV requirements that need to be fixed or added in order to be passed to the python script

TODO need to add the final requirements after our meeting on Monday

colbySullivan commented 1 month ago

For the last 30 minutes I pivoted away from the rules page since it is working for now and I started working on fixing some small issues with the table to script section of the main page. I am going to take a break for tonight but I've have already pushed my branch into main.

colbySullivan commented 1 month ago

I am going to start adding some more task check boxes and fixing some weird edge cases in the tables.

colbySullivan commented 1 month ago

For the last 30 minutes I have been experimenting with the autocomplete function for the course row in the faculty table. I have attached the documentation but I don't think we will ultimately use it as it only fill traditional things like names, dates, and emails. I also added some new check boxes so we can track the progress.

colbySullivan commented 1 month ago

Sorry for the delayed update I had a family emergency. Edit: I started experimenting with a button that will lead to our script but I still need to create link it to our schedule page. But I think I'm done for tonight.

colbySullivan commented 1 month ago

I am going to start working on adding the page that we will use for the schedule and link the script button to it.

colbySullivan commented 1 month ago

I've made some good progress with passing a CSV to a python file but right now I'm having an issue where it only outputs the python contents rather than the CSVs.

colbySullivan commented 1 month ago

I have started looking into CGI for python but in order to debug it I need to set it up on a XAMPP server. https://www.tutorialspoint.com/python/python_cgi_programming.htm

colbySullivan commented 1 month ago

I have been coding in circles for awhile but I think I have finally landed on using Python CGI as our method of passing this CSV to the python script. I am going to try for another 30 minutes but I think I am done after that.

colbySullivan commented 1 month ago

I have finally given up on Python CGI and have gone back to our original plan of flask. I have a rough outline of how it should be setup but it is having some issues right now. I will discuss my research tomorrow during our meeting.

colbySullivan commented 1 month ago

I made a lot of progress on the Flask server but there is a lot of small things that we need to do such as fix all the images and CSS for Flask. That shouldn't take too long but I thing I have a rough outline. But most importantly I got the javascript csv script to successful pass to a python script and display the contents. I am going to sign off for tonight and work on this tomorrow.

colbySullivan commented 1 month ago

I am going start on the final step of integration and put the script into the flask app.

colbySullivan commented 1 month ago

I have made some great progress but I needed to move around the file system again so I won't be able to merge until after our meeting tomorrow. I am going to sign off for now.

colbySullivan commented 1 month ago

I am going to put the app on pythonanywhere to see if it works on there.

colbySullivan commented 1 month ago

I have the website being hosted on pythonanywhere again under the domain http://colbysullivan.pythonanywhere.com. GLPK is running but I am having an issue with it finding the output files.

colbySullivan commented 1 month ago

I have made some progress but for some reason it only writing to the input file and not the output. I'm going to work for a little bit longer and then head off.

colbySullivan commented 1 month ago

I've got a somewhat working copy but as it can grab from the export file but it will only do it once. I think I know a fix but I am going to take a break for now.

colbySullivan commented 1 month ago

I got carried away and could not let good enough alone. I got it working flawlessly using a subprocess call and it will output multiple files and will print out infeasible as well. There is still a lot to do with formatting but I am now comfortable with this being a stopping point and I will transfer the changes to github later tonight. image image

colbySullivan commented 1 month ago

I am going to start working on pulling the recent changes and getting them to automatically set the pythonanywhere web page.

colbySullivan commented 1 month ago

I am two copies of the code in pythonanywhere at the moment as the pulled copy is not working as expected but I will fix it next week. I have attached the file system that is currently online.Screenshot_20240407_230646_Firefox.jpg

Screenshot_20240407_230605_Firefox.jpg

colbySullivan commented 1 month ago

For the last 30 minutes I have been transferring a lot of the changes manually from the github to pythonanywhere since the pull function is having some issues. I have attached documentation where necessary but essentially I left multiple copies of directory paths since they are different from platform to platform at the moment.

colbySullivan commented 1 month ago

Forgot to leave an ending comment but I worked on the published version and the upload section is currently not working due to a directory bug with the subprocess call. I am now going to sign off for today.

colbySullivan commented 1 month ago

I am going to start working on fixing the flask server issues.

colbySullivan commented 1 month ago

I couldn't figure out why the script wasn't working on flask through vscode but I did research how to deploy our application through other services such as AWS. I will look up how to use docker but I am going to sign off for now.

colbySullivan commented 1 month ago

I am going to continue looking into how to use docker and providers such as AWS.

colbySullivan commented 1 month ago

I have found a few instructions on how to set it up through AWS but I am going to follow this site since we have free credits through Google cloud. https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-python-service

colbySullivan commented 1 month ago

I've been trying for the last 30 minutes to get around putting in a credit card to sign up for a google cloud account but have found no success. I will try for another 30 minutes and if not I will look for something else.

colbySullivan commented 1 month ago

I have gotten a free account for AWS working. It still required a credit card but I found a way around it. I am now going to try and set up our flask server on it using the link from above and this new one. https://blog.nextideatech.com/deploy-flask-on-aws-heroku/ Edit: I am also going to use this as well https://www.youtube.com/watch?v=ct1GbTvgVNM&ab_channel=AMonkinCloud%E2%98%81%EF%B8%8F

colbySullivan commented 1 month ago

I have got another working copy on AWS after some work. I have attached a photo of the shell and the some of the commands I used to get it working. I am happy with this progress and am going to sign off for tonight. image https://github.com/yeshwanthlm/YouTube/blob/main/flask-on-aws-ec2.md https://askubuntu.com/questions/349582/installing-and-running-glpk

colbySullivan commented 1 month ago

I am going continue working on getting the AWS server up and running.

colbySullivan commented 1 month ago

I got a basic testing flask up and running on AWS but I am going to fix it to fit our application.

colbySullivan commented 1 month ago

I have ran into a php issue so I am going to fix the code on my branch before I continue but I am going to sign off for now until tonight.

colbySullivan commented 1 month ago

I am going to start fixing the php problem.

colbySullivan commented 1 month ago

I have opened all the ports and have had no luck getting the website to post. I am going to try for another 30 and then stop for the night. image

colbySullivan commented 1 month ago

I've tried everything I can for now, I even ran rm -rf main to try and install from scratch but it didn't work. I will try again later but I am signing off for tonight.

colbySullivan commented 1 month ago

I am going to take a break from trying to host the website and I am going to try and get the drag and drop working.

colbySullivan commented 1 month ago

I have a decent work in progress but it still has some bugs. I have attached a function that I am playing with to simulate the drag and drop. https://developer.mozilla.org/en-US/docs/Web/API/Element/closest

colbySullivan commented 1 month ago

I have made the table draggable but it is not dropping and swapping correctly. image

colbySullivan commented 1 month ago

I am still having the same issue so I am going to take a break for now. I am confident this is the direction that we should go for this page.

colbySullivan commented 1 month ago

I am going to start adding the script button to the csv page.

colbySullivan commented 1 month ago

I have got it downloading correctly to a variable but I am having trouble connecting and passing it to the display page.

colbySullivan commented 1 month ago

I have made some decent progress using the reference below but I am going to take a break for now. https://stackoverflow.com/questions/41885919/passing-variable-from-html-to-python-flask

colbySullivan commented 1 month ago

I am going to continue our work in class.

colbySullivan commented 1 month ago

I have gotten it to work with the new script but there is still some issues. I am going to sign off for now.