pearmut 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {pearmut-0.2.3 → pearmut-0.2.4}/PKG-INFO +1 -1
  2. {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/PKG-INFO +1 -1
  3. {pearmut-0.2.3 → pearmut-0.2.4}/pyproject.toml +1 -1
  4. {pearmut-0.2.3 → pearmut-0.2.4}/server/app.py +2 -2
  5. {pearmut-0.2.3 → pearmut-0.2.4}/server/cli.py +2 -3
  6. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/assets/style.css +4 -0
  7. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/listwise.bundle.js +1 -1
  8. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/pointwise.bundle.js +1 -1
  9. {pearmut-0.2.3 → pearmut-0.2.4}/LICENSE +0 -0
  10. {pearmut-0.2.3 → pearmut-0.2.4}/README.md +0 -0
  11. {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/SOURCES.txt +0 -0
  12. {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/dependency_links.txt +0 -0
  13. {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/entry_points.txt +0 -0
  14. {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/requires.txt +0 -0
  15. {pearmut-0.2.3 → pearmut-0.2.4}/pearmut.egg-info/top_level.txt +0 -0
  16. {pearmut-0.2.3 → pearmut-0.2.4}/server/assignment.py +0 -0
  17. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/assets/favicon.svg +0 -0
  18. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/dashboard.bundle.js +0 -0
  19. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/dashboard.html +0 -0
  20. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/index.html +0 -0
  21. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/listwise.html +0 -0
  22. {pearmut-0.2.3 → pearmut-0.2.4}/server/static/pointwise.html +0 -0
  23. {pearmut-0.2.3 → pearmut-0.2.4}/server/utils.py +0 -0
  24. {pearmut-0.2.3 → pearmut-0.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pearmut
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A tool for evaluation of model outputs, primarily MT.
5
5
  Author-email: Vilém Zouhar <vilem.zouhar@gmail.com>
6
6
  License: apache-2.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pearmut
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A tool for evaluation of model outputs, primarily MT.
5
5
  Author-email: Vilém Zouhar <vilem.zouhar@gmail.com>
6
6
  License: apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pearmut"
3
- version = "0.2.3"
3
+ version = "0.2.4"
4
4
  description = "A tool for evaluation of model outputs, primarily MT."
5
5
  readme = "README.md"
6
6
  license = { text = "apache-2.0" }
@@ -147,10 +147,10 @@ class DashboardDataRequest(BaseModel):
147
147
  async def _dashboard_data(request: DashboardDataRequest):
148
148
  campaign_id = request.campaign_id
149
149
 
150
- is_privileged = (request.token == tasks_data[campaign_id]["token"])
151
-
152
150
  if campaign_id not in progress_data:
153
151
  return JSONResponse(content={"error": "Unknown campaign ID"}, status_code=400)
152
+
153
+ is_privileged = (request.token == tasks_data[campaign_id]["token"])
154
154
 
155
155
  progress_new = {}
156
156
  assignment = tasks_data[campaign_id]["info"]["assignment"]
@@ -65,11 +65,10 @@ def _add_single_campaign(data_file, overwrite, server):
65
65
  progress_data = json.load(f)
66
66
 
67
67
  if campaign_data['campaign_id'] in progress_data and not overwrite:
68
- print(
69
- f"Campaign {campaign_data['campaign_id']} already exists.",
68
+ raise ValueError(
69
+ f"Campaign {campaign_data['campaign_id']} already exists.\n"
70
70
  "Use -o to overwrite."
71
71
  )
72
- exit(1)
73
72
 
74
73
  if "info" not in campaign_data:
75
74
  raise ValueError("Campaign data must contain 'info' field.")
@@ -232,4 +232,8 @@ input[type="button"].error_delete:hover {
232
232
  margin-right: 5px;
233
233
  position: relative;
234
234
  top: -5px;
235
+ }
236
+
237
+ .char_missing {
238
+ font-family: monospace;
235
239
  }