Skip to content

Commit

Permalink
Update and create readmes so that the app docs create a consistent ta…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleshkev authored Apr 24, 2023
1 parent 2952137 commit df72e00
Show file tree
Hide file tree
Showing 59 changed files with 121 additions and 98 deletions.
4 changes: 1 addition & 3 deletions oioioi/amppz/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
This module is responsible for handling one of Polish programming contests
-- Akademickie Mistrzostawa Polski w Programowaniu Zespołowym
(see contest website: http://amppz.mimuw.edu.pl/).
Handles `Akademickie Mistrzostwa Polski w Programowaniu Zespołowym type <http://amppz.mimuw.edu.pl/>`_ programming contests.
2 changes: 1 addition & 1 deletion oioioi/analytics/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This module adds support for Google Analytics.
Google Analytics.
3 changes: 1 addition & 2 deletions oioioi/balloons/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
This module provides an interface for supporting teams delivering balloons
during ACM contest.
An interface for supporting teams delivering balloons during ACM contests.
4 changes: 2 additions & 2 deletions oioioi/celery/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module takes care of proper initialization of Celery -
Distributed Task Queue for judging submissions.
Proper initialization of Celery --
the Distributed Task Queue for judging submissions.
2 changes: 1 addition & 1 deletion oioioi/clock/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module with current time and countdown clock implementation.
Display current time and countdown in the navbar.
2 changes: 1 addition & 1 deletion oioioi/complaints/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module for sending complaints from participants to jury.
Complaints from participants to the jury.
2 changes: 1 addition & 1 deletion oioioi/confirmations/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module is responsible for sending e-mail confirmations
Sending e-mail confirmations
after participant's submission during a contest.
4 changes: 2 additions & 2 deletions oioioi/contestexcl/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module adds a possibility of creating an exclusive contest
-- its users cannot enter any other contests.
Exclusive contests
(its users cannot enter any other contests).
2 changes: 1 addition & 1 deletion oioioi/contestlogo/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module responsible for displaying a logo for a contest.
Displays the contest logo.
2 changes: 1 addition & 1 deletion oioioi/contests/README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This huge module implements top-level logic connected with all contests:
Top-level logic connected with all contests:
problem instance, submission, score report, user results,
round time extension, judge process, user registration,
rendering reports and more.
2 changes: 1 addition & 1 deletion oioioi/dashboard/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module implementing contest dashboard.
Implements the contest dashboard.
4 changes: 2 additions & 2 deletions oioioi/deployment/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module contains templates for a Django deployment - manage.py, settings.py
and other similar.
Contains templates for a Django deployment -- manage.py, settings.py,
and similar.
2 changes: 2 additions & 0 deletions oioioi/disqualification/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Contestant disqualifications.
10 changes: 6 additions & 4 deletions oioioi/evalmgr/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Evaluation Manager is a module taking a recipe along with parameters
in 'env' variable (large dictionary) and processing it according to
a recipe. This process is used to compile, execute and grade
Takes a recipe along with parameters
in 'env' variable (a large dictionary), and processes it according to
the recipe.

This process is used to compile, execute and grade
submissions in a programming contest. This module adds a visual
interface to it's queue as well, allowing to view and remove
interface to its queue as well, to allow viewing and removing
pending submissions.
4 changes: 2 additions & 2 deletions oioioi/filetracker/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Filetracker is a module for storing files like submission
source codes and tests.
Stores files (submission
source codes, tests, etc.).
2 changes: 1 addition & 1 deletion oioioi/forum/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This module is responsible for a contest forum.
Adds contest forums.
4 changes: 2 additions & 2 deletions oioioi/globalmessage/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
An optional module for showing alert for all users on every page, for example
An optional module. Shows alerts for all users on every page, for example
to announce planned downtime or current system issues.

There can be one message at most.

Message can be programmed to automatically show and hide at given times.
Message can be programmed to automatically show and hide at given times.
1 change: 1 addition & 0 deletions oioioi/ipauthsync/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Validating incoming IP addresses.
2 changes: 1 addition & 1 deletion oioioi/ipdnsauth/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module implementing authentication based on user IP or DNS hostname.
Authentication based on user IP or DNS hostname.
1 change: 1 addition & 0 deletions oioioi/livedata/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Endpoints to query live data about tasks, submission events and teams.
1 change: 1 addition & 0 deletions oioioi/liveranking/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Endpoints to query live data about submissions.
1 change: 1 addition & 0 deletions oioioi/mailsubmit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Handle postal submissions.
2 changes: 2 additions & 0 deletions oioioi/maintenancemode/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Allow putting the site into maintenance mode, where all functionality is disabled. ("Sorry, the site is under maintenance.")
4 changes: 2 additions & 2 deletions oioioi/mp/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module is responsible for handling Mistrz Programowania programming contests
(see 2022 contest website: https://oki.org.pl/mistrz-programowania-2022/).
Supports Mistrz Programowania type contests
(`2022 contest website <https://oki.org.pl/mistrz-programowania-2022/>`_).
5 changes: 2 additions & 3 deletions oioioi/newsfeed/README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
This module adds newsfeed feature. Additionaly, it adds
single news and newsfeed widgets to portals.
Adds the newsfeed, single news, and newsfeed widgets to portals.

It requires portals app to be enabled.
The portals app must be enabled.
4 changes: 2 additions & 2 deletions oioioi/oi/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module is responsible for handling Polish Olympiad type
programming contests. (see contest web site: http://oi.edu.pl/)
Support for `Polish Olympiad type <http://oi.edu.pl/>`_
programming contests.
2 changes: 1 addition & 1 deletion oioioi/oireports/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module implementing the HTML, PDF and XML report logic.
HTML, PDF and XML reports.
6 changes: 3 additions & 3 deletions oioioi/oisubmit/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This module provides some utils for submissions during the
Polish Olympiad in Informatics, helping to find suspected submissions
like submitted before the contest start.
Provides some utils for submissions during the
Polish Olympiad in Informatics, helping to find suspicious submissions
(like these submitted before the contest start).
5 changes: 2 additions & 3 deletions oioioi/pa/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
This module is responsible for handling one of Polish programming contests
-- Potyczki Algorytmiczne
(see contest website: http://potyczki.mimuw.edu.pl/).
Support for one of Polish programming contests
-- `Potyczki Algorytmiczne <http://potyczki.mimuw.edu.pl/>`_.
2 changes: 1 addition & 1 deletion oioioi/participants/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This module is responsible for contest's participants registration.
Contest's participants registration.
2 changes: 1 addition & 1 deletion oioioi/plagiarism/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module contains tools for plagiarism detection among contest submissions.
Tools for plagiarism detection among contest submissions.
Currently there is only a contest admin tab for exporting source codes to the MOSS system.
2 changes: 2 additions & 0 deletions oioioi/portals/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Adds portals -- pages where users can write their own content.
2 changes: 1 addition & 1 deletion oioioi/printing/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This module allows contestants to print text files (eg. source code).
Allows contestants to print text files (eg. source code).
7 changes: 2 additions & 5 deletions oioioi/problemsharing/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
Problem Sharing
===============

Description
===========

Problem sharing module allows to share problems.
Currently only way of sharing is through a one-sided friendship.
Allows teachers to share problems.
Currently the only way to share is through a one-sided friendship.

Activating this module adds:

Expand Down
2 changes: 1 addition & 1 deletion oioioi/publicsolutions/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module implementing publishing and viewing participants' solutions.
Publishing and viewing participants' solutions.
2 changes: 1 addition & 1 deletion oioioi/questions/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module provides questions and answers system for
Questions and answers system for
contestants during a contest.
1 change: 1 addition & 0 deletions oioioi/quizzes/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds problems which are quizzes.
2 changes: 1 addition & 1 deletion oioioi/rankings/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module implementing html and cvs ranking views.
HTML and CSV ranking views.
5 changes: 3 additions & 2 deletions oioioi/scoresreveal/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
This module implements score revealing. Participants are provided
with some number of tokens for each task.
Score revealing.

Participants are provided with some number of tokens for each task.
Tokens can be used for revealing scores for specified submissions.
1 change: 1 addition & 0 deletions oioioi/similarsubmits/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allows the organisers to mark submissions as similar, and displays this to participants.
6 changes: 3 additions & 3 deletions oioioi/simpleui/README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This module is a set of simplified templates/views for users.
It provides sites like user or contest dashboards.
It can be used by many separate apps, just make sure there are no conflicts.
A set of simplified templates/views for users.
Provides sites like user or contest dashboards.
Can be used by many separate apps, just make sure there are no conflicts.
4 changes: 2 additions & 2 deletions oioioi/sinolpack/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This module is responsible for handling
Sinol packages - standardized archives with problem data.
Support for
Sinol packages -- standardized archives with problem data.
Sinolpack is OIOIOI standard problem package format.
The detailed archive content description can be found here:
https://github.com/sio2project/oioioi/wiki
4 changes: 2 additions & 2 deletions oioioi/sioworkers/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
A module containing front-end code for sioworkers,
used for staring their jobs.
Front-end code for sioworkers,
used for starting their jobs.
2 changes: 1 addition & 1 deletion oioioi/statistics/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module providing contest statistics for admins and participants.
Contest statistics for admins and participants.
4 changes: 2 additions & 2 deletions oioioi/status/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
A module containing small framework used for automatic update
of some interface parts, like time synchronization (every 5 minutes).
Small framework used for automatic update
of some parts of the UI, like time synchronization (every 5 minutes).
2 changes: 1 addition & 1 deletion oioioi/su/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module adds an option for admins to log in as other user
An option for admins to log in as other user
for testing purposes.
2 changes: 1 addition & 1 deletion oioioi/submitservice/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module that enables automated solution submitting from user's terminal.
Automated solution submitting from user's terminal.
2 changes: 1 addition & 1 deletion oioioi/suspendjudge/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This module adds an option to suspend judging of selected problems.
Adds an option to suspend judging of selected problems.
1 change: 1 addition & 0 deletions oioioi/szkopul/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Custom functionality for the `Szkopuł <https://szkopul.edu.pl>`_ platform.
2 changes: 1 addition & 1 deletion oioioi/teachers/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module adds an option to create and administrate
Adds an option to create and administer
a new contest by teachers.
2 changes: 1 addition & 1 deletion oioioi/teams/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module providing features for team-based contests.
Features for team-based contests.
2 changes: 1 addition & 1 deletion oioioi/testrun/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A module that allows to execute a program in conditions similar to the final checking.
Allows to execute a program in conditions similar to the final checking.
10 changes: 5 additions & 5 deletions oioioi/testspackages/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Testspackages
~~~~~~~~~~~~~

This module allows users to publish the tests for packages in the contest.
Allows users to publish the tests for packages in the contest.
If the problem is public, in problemset there will be an additional tab where
zipped tests can be downloaded.

Expand All @@ -12,9 +12,9 @@ First, make sure you are the owner of package. It's not possible to publish
tests for package added from external source -- e.g. problemset.
It's because test package is connected to problem, not the probleminstance.

Assuming you are the owner of the package, find the problem for which you want to publish the tests.
In the contest view, go to "Problems" in "Contest Administration" tab and then click "Advanced settings"
next to the chosen problem. Now, in "Tests Packages" form you can specify which test cases you want to publish
and specify the publish date. It's also possible to customize file name and description.
#. Assuming you are the owner of the package, find the problem for which you want to publish the tests.
#. In the contest view, go to "Problems" in "Contest Administration" tab and then click "Advanced settings"
#. next to the chosen problem. Now, in "Tests Packages" form you can specify which test cases you want to publish
#. and specify the publish date. It's also possible to customize file name and description.

After the publish date tests will be visible for ALL participants in the contest.
2 changes: 1 addition & 1 deletion oioioi/timeline/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
A module implementing the admin timeline view,
Implements the admin timeline view,
used for manipulating contest's dates.
4 changes: 2 additions & 2 deletions oioioi/usercontests/README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module enables every regular user to create and admin their own contests.
It is an experimental feature - use at your own risk!
Enables every regular user to create and administer their own contests.
It is an experimental feature -- use at your own risk!
2 changes: 1 addition & 1 deletion oioioi/usergroups/README.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This module adds an option to group selected users into personal user groups and share them with other teachers.
Adds an option to group selected users into personal user groups and share them with other teachers.
1 change: 1 addition & 0 deletions oioioi/workers/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Displays running workers (useful mainly for system admins).
2 changes: 1 addition & 1 deletion rst/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ clean:
-rm -rf $(BUILDDIR)/*

autogen:
python gendoc.py
python3 gendoc.py

html: autogen
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Expand Down
48 changes: 31 additions & 17 deletions rst/gendoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,51 @@
sections_suff = '../rst/source/sections/'
sections_dist = len(sections_suff.split(os.sep))

entries = []

entries.append(
"""
Autogenerated by the /rst/gendoc.py script
entries = ["""
..
Autogenerated by the /rst/gendoc.py script

==============
OIOIOI Modules
==============

List of modules
---------------

"""
)
.. list-table::
:widths: 25 75
:header-rows: 1

* - Module
- Implements

"""]
missing = []

oioioi_dirname = os.path.dirname(oioioi.__file__)
sections_dirname = os.path.join(oioioi_dirname, sections_suff)
for root, dirs, files in os.walk(oioioi_dirname):
dirs.sort()
rel_root = os.path.relpath(root, sections_dirname)
module_name = '.'.join(rel_root.split(os.sep)[sections_dist - 1 :])
if 'README.rst' in files:
entries.append(
'**%s**\n\n.. include:: %s/README.rst\n\n' % (module_name, rel_root)
)
elif len(rel_root.split(os.sep)) == sections_dist and 'locale' not in module_name:
print("No README.rst in %s" % module_name)
module_name = '.'.join(rel_root.split(os.sep)[sections_dist - 1:])

if "." in module_name or module_name.startswith("_") or not module_name:
continue

include_readme = f".. include:: {rel_root}/README.rst"
if 'README.rst' not in files:
include_readme = "*README.rst missing*"
missing.append(module_name)

entries.append(
f" * - {module_name}\n"
f" - {include_readme}\n"
)

content = ''.join(entries)

if missing:
print(sys.stderr, "Some README.rst for modules are missing:", missing)



if len(sys.argv) > 1 and (sys.argv[1] == '--verbose' or sys.argv[1] == '-v'):
print(content)

Expand Down

0 comments on commit df72e00

Please sign in to comment.