[meta] partners: cleanup of duplicated helpers and constants

Open
#2,728 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by locating SourceStatus in partners/model.py and every copy in models/partner_outing.py, the migration and FAILURE_STATUSES; then trace the duplicated fixtures/secrets code between the job and partners/main.py. Compare jobs/init.py helpers with _interval_minutes/_setting_is_true and gulliver's _int/_float with normalise.to_int before touching author_url. Done means the duplicates are removed or shared, the migration statuses are pinned by a test, and author_url is either populated with a documented source or dropped.

Written by the indexing model from the issue text.

Description

metaskirando

From the M1 integration review of meta. Target branch: meta. Tracking: c2corg/metaskirando-archive#2

  • The source statuses are defined in 4 places: partners/model.py, models/partner_outing.py, the migration and FAILURE_STATUSES. Derive them with typing.get_args(SourceStatus) and pin the migration in a test.
  • The default fixtures dir and the secrets reader are duplicated between the job and partners/__main__.py.
  • jobs/__init__.py re-implements _interval_minutes, and _setting_is_true duplicates removals_auto.
  • gulliver's _int/_float duplicate normalise.to_int.
  • author_url is never filled. Fill it (skitour user id → profile URL, gulliver nicename) or drop the column.

Generated by Claude Code

Dominant language
Python
Stars
25
Forks
30
Avg merge
8h 3m
Merged PRs (30d)
255

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from c2corg/v6_api

All issues in c2corg/v6_api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.