Updated files. getting ready for publishing. Some issues

This commit is contained in:
Boyan 2024-04-21 02:08:58 +02:00
parent 2daee84d4f
commit 667a388da4
Signed by: boyan_k
GPG Key ID: 620E9CC7A57EAAA5
12 changed files with 42 additions and 14 deletions

1
.gitignore vendored
View File

@ -331,3 +331,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
project-hierarchy.txt

View File

@ -12,14 +12,14 @@ A python library which interacts with themis. Uses bs4. I'll try to end developm
* [x] Log in * [x] Log in
* [x] Submit * [x] Submit
* [x] Bulk download of test cases and files * [x] Bulk download of test cases and files
* [ ] Submission status * [x] Submission status
## Docs ## Docs
[here](http://temmies.rtfd.io/). [here](http://temmies.rtfd.io/).
## Possible continuations ## Possible continuations
* [ ] Discord bot * Discord bot
* [ ] CLI program * CLI program
## Thanks to ## Thanks to
* [Glitchcat](https://glitchcat.github.io/themis-api/), cool docs bro. * [Glitchcat](https://glitchcat.github.io/themis-api/), cool docs bro.

View File

@ -58,7 +58,6 @@ courses = year.all_courses()
## `Course` ## `Course`
### Usage ### Usage
```python ```python
pf = year.get_course("Programming Fundamentals (for CS)") pf = year.get_course("Programming Fundamentals (for CS)")
print(pf.info) # <- course info attribute print(pf.info) # <- course info attribute
assignments = pf.get_groups() assignments = pf.get_groups()

29
setup.py Normal file
View File

@ -0,0 +1,29 @@
from setuptools import find_packages, setup
with open("README.md", "r") as f:
l_description = f.read()
setup(
name="temmies",
version="1.0.1",
package_dir = {"": "temmies"},
packages=find_packages(where="temmies"),
description="A wrapper for the Themis website",
long_description=l_description,
long_description_content_type="text/markdown",
url="https://github.com/Code-For-Groningen/temmies",
author="Boyan K.",
author_email="boyan@confest.im",
license="GPLv3",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.9",
],
install_requires=[
"requests",
"bs4",
],
python_requires=">=3.9",
)

0
temmies/__init__.py Normal file
View File

View File

@ -4,9 +4,9 @@ Houses the Course class which is used to represent a course in a year.
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from requests import Session from requests import Session
from exercise_group import ExerciseGroup from .exercise_group import ExerciseGroup
from exceptions.course_unavailable import CourseUnavailable from .exceptions.course_unavailable import CourseUnavailable
from exceptions.illegal_action import IllegalAction from .exceptions.illegal_action import IllegalAction
class Course: class Course:

View File

@ -7,8 +7,8 @@ Represents a group of exercises or a single exercise.
from json import loads from json import loads
from time import sleep from time import sleep
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from exceptions.illegal_action import IllegalAction from .exceptions.illegal_action import IllegalAction
from submission import Submission from .submission import Submission
class ExerciseGroup: class ExerciseGroup:
""" """

View File

@ -4,7 +4,6 @@ File to define the submission class
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
class Submission: class Submission:
""" """
Submission class Submission class

View File

@ -6,8 +6,8 @@ Main class for the Themis API
import urllib3 import urllib3
from requests import Session from requests import Session
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from year import Year from .year import Year
from exceptions.illegal_action import IllegalAction from .exceptions.illegal_action import IllegalAction
# Disable warnings # Disable warnings

View File

@ -5,8 +5,8 @@ Class which represents an academic year.
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from requests import Session from requests import Session
from course import Course from .course import Course
from exceptions.course_unavailable import CourseUnavailable from .exceptions.course_unavailable import CourseUnavailable
# Works # Works