ptrteixeira / nusports Goto Github PK
View Code? Open in Web Editor NEWWeb Scraper to report schedule and standings for Northeastern's CAA Sports teams
License: MIT License
Web Scraper to report schedule and standings for Northeastern's CAA Sports teams
License: MIT License
Changing tabs doesn't automatically make a query to the website, even when it should.
Steps to reproduce:
That I can think of off the top of my head, track, xc, swimming/diving, and field hockey are missing.
At the moment, the selected sport is handled independently by each tab. This means that each tab remembers what you were on, rather than being preserved when switching between the two of them. In my opinion, it would be a better UX for selected sport to be preserved between tabs (eg, you are looking at Volleyball's current standings, and then you switch tabs to check out what games they have left to play).
Currently uses JUnit 4 + Hamcrest + TestFX 4.
TestFX 4 stays because its good for what it does. I am still not going to try to get it to work in headless mode, though.
If possible, it would be fun to get it running with JUnit 5, which is (as of this issue) in early alpha. It might be fun to get it running with j8spec, a BDD-style test library, which is built to inter-operate with JUnit (4?), so prob'ly would work together fine. Maybe also drop in AssertJ, which is (+/-) an alternative to Hamcrest.
Ideally, this application could be used to gather the statistics that it covers from pretty much anywhere. In order to do that, it should load web scrapers via the ServiceLoader API, so that you can easily swap it out for different websites.
In the event of a tie (ie, when neither team has the "win" class set), then it will simply not report what the final score was.
Update to the newest version of Gradle. The fix for this issue should probably involve at least trying out rewriting some of the gradle scripts for this project as Kotlin gradle scripts.
At the moment, I am starting a new thread, performing the request there, and eventually pushing that onto the UI. This isn't hella fun because JavaFX is finicky about threading, and because threads are, all things considered, a pretty low-level abstraction for asynchronous programming. So I would rather move to something else.
I'm not really concerned whether it is ReactiveX and its handful of derivatives on the platform or it's Kotlin's coroutines, or anything like that. I'd just like to not have to start my own threads.
See the description w/r/t F#. The idea is that you pass an Either<Exception, Value>
around and map
/flatMap
over that, rather throwing exceptions and no longer having a single point of return. Is it necessary? Probably not. Is it cool? Yeah, which is why I'm going to do it.
At the moment, communication between the model and the controller - and even within the model - regarding sports is entirely with strings. This is abominable, frankly, because it means there's a bunch of expressions that are just switches over strings.
At least within the model, I should move to using an enum. The advantage of this is that I can then centralize the switch-over-string functions into the enum.
I am unsure whether I should an interface-over-enum setup for communication between the model and the controller. I think it is probably more likely to complicate the interface unnecessarily and I am unsure that the controller has a need to look at individual sports. I could be wrong, though, so I need to think about this.
At the moment, the build artifacts being exported to CircleCI are the HTML style check output and the XML test output. I would like to at least also include the HTML test output. An ever-so-slightly more ambitious goal is to add code coverage metrics as well; this would involve adding another plugin to the Gradle build script.
The controller should be able to make use of multiple web scrapers. The particular use case for this is that some of Northeastern's sports are through the CAA and some are through the Hockey East. Currently, this application only works on the CAA web-site, and therefore can only provide access to the sports that are through the CAA. It would be really nice if it could also work for the Hockey East website.
This should be pretty easy. The key idea is that the controller should be able to look up a web scraper based on a sport, then perform the required calls.
Matches which are listed in the schedule, but which have not been played have bogus results entries in the table. In particular, they are displayed as "L - ".
The standings table contains three columns, but they are not the correct three columns. One of the columns is labeled "Result" and doesn't contain anything. It should be labeled "Overall" and contain the overall win-loss record for the team.
At the moment, it currently takes ~ 2 minutes for the full calendar to load on the CAA website. That's way, way too slow to be usable, quite honestly. Loading the RSS feed, on the other hand, is nice and snappy. So that's what I'm gonna use instead.
See TornadoFX for more details. This is part of an overarching effort to re-write more of the application in Kotlin.
At the moment, the JSoup query is blocking things on the UI thread, which is creating a pretty bad UX - the application pauses while the web request does it's thing. The best way to resolve this would be to make something here an observable and just pull that through. The less preferred way would be to make the response a promise. The least preferred way would be to put the request on a new thread and pull them back together later.
The object between the model and the controller is pretty small, but it still isn't terribly fun to be creating it in a bunch of different places. It would also encourage better design - or, at least, slightly better inversion of control for testing.
Possible frameworks for dependency injection:
The test files that are checked in as samples at the moment are massive, and are causing this project (which is definitely actually written in Java) to be detected as HTML. This is unfortunate.
Most of the content of those HTML files does not need to be their. As a matter of fact, it should almost certainly be just-barely-valid HTML plus a table. Anything else is more of a test of JSoup than this project. (There are hypothetical legal issues behind this decision too).
At the moment, all of the UI code is written in Java. This isn't a terribly good way to do it, because it makes the UI difficult to understand. It also isn't terribly well supported by JavaFX itself; at the moment, the controller controls by asking if the view would kindly register these lambdas on the relevant objects, please. The correct way to do this would be to put the layout code in xml and rely in JavaFX's native view injection to put the references in the right spots.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.