Mirror of SVN Apache Comdev - Projects

Clone this repo:
  1. e22562e Retry failed downloads and catch only network errors by Rich Bowen · 7 hours ago trunk
  2. a86119c parsecatalog.py: simplify fetch_catalog() by Rich Bowen · 8 hours ago
  3. 1eeab61 Document the test suite and the atomic, skip-if-unchanged JSON writes by Rich Bowen · 8 hours ago
  4. 3a81398 Write generated JSON atomically and only when the content changed by Rich Bowen · 8 hours ago
  5. 5bfb490 Add pytest suite for the cronjob scripts by Rich Bowen · 8 hours ago

Creates the site https://projects.apache.org/

The canonical source is at: https://svn.apache.org/repos/asf/comdev/projects.apache.org/trunk

Please raise bugs at: https://issues.apache.org/jira/projects/COMDEV using the component: Projects Tool

Please do not use Pull Requests.

Contributing changes

The GitHub repository (apache/comdev-projects) is a read-only mirror of the SVN trunk above. Nobody can push to it or merge Pull Requests there, so changes have to go through SVN.

Do not include generated data

Most files under site/json/ are generated by the scripts in scripts/cronjobs/ and committed to SVN daily (around 2 AM UTC) by the projects_role account. Change the script that generates a file, not the file itself: a hand-edited copy will conflict with, or be overwritten by, the next scheduled update.

Submitting a patch for review

  1. Check out trunk (or update an existing checkout):

    svn checkout https://svn.apache.org/repos/asf/comdev/projects.apache.org/trunk projects.apache.org
    cd projects.apache.org
    
  2. Make and test your change (see “Running locally” below).

  3. Create the patch from the top of the checkout:

    svn diff > my-change.patch
    

    If you work in a clone of the Git mirror instead, this creates a patch that “svn patch” can apply, without the generated data:

    git diff --no-prefix origin/trunk...HEAD -- . ':!site/json' > my-change.patch
    
  4. Send it for review, either:

Reviewers apply it with “svn patch my-change.patch”.

Committing directly

Committers with write access to comdev may commit their own changes with “svn commit”. The project works commit-then-review: every commit is sent to commits@community.apache.org, where it can be reviewed. For larger or user-visible changes, consider sending a patch to dev@community.apache.org first.

If generative AI tools helped write a change, say so in the commit message or patch email, for example with a “Generated-by:” line, as described in https://www.apache.org/legal/generative-tooling.html

Running locally

Run a local version of the site with:

cd site && python3 -m http.server 8000

Running the tests

The tests need no network access and do not touch site/json or data/cache. They use fakes for downloads and a temporary copy of the directory layout. From the top of the checkout:

uv run --with pytest --with requests pytest tests -q

or, with pytest and requests already installed:

python3 -m pytest tests -q

Generated JSON files

The cronjob scripts write JSON through write_json() in scripts/cronjobs/jsonutils.py. It writes to a temporary file and renames it over the target, so a failed run cannot leave a half-written file. It also leaves a file untouched when the content has not changed, so the nightly SVN commit contains only real changes, and a file's modification time shows when its content last changed. chooser.json ignores its generated timestamp for this comparison.