Skip to content

Better tagging directory structure #2228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

mathbunnyru
Copy link
Member

Describe your changes

Issue ticket if applicable

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

@mathbunnyru
Copy link
Member Author

mathbunnyru commented Feb 21, 2025

There were quite a lot of files in tagging/ directory.

So, I:

  1. Moved wiki related files to the separate wiki/ directory
  2. Reorganised the directory structure of tagging as follows:
tagging/
├── __init__.py                      # Package marker
├── apps/                            # Command-line applications
│   ├── __init__.py
│   ├── apply_tags.py               # Apply generated tags to images
│   ├── common_arguments.py         # Shared CLI argument parsing
│   ├── merge_tags.py              # Create multi-arch images
│   └── write_tags_file.py         # Generate image tags
├── taggers/                       # Classes for generating image tags
│   ├── __init__.py
│   ├── date.py                   # Build date tagger 
│   ├── program_versions.py       # Version taggers for Python, R, Julia etc.
│   ├── sha.py                    # Git commit SHA tagger
│   ├── tagger_interface.py       # Base interface for taggers
│   └── ubuntu_version.py         # Ubuntu version tagger
├── manifests/                     # Classes for generating build manifests
│   ├── __init__.py
│   ├── apt_packages.py           # APT packages manifest
│   ├── conda_environment.py      # Conda packages manifest
│   ├── header.py                 # Build manifest header
│   ├── julia_packages.py         # Julia packages manifest
│   ├── manifest_interface.py     # Base interface for manifests
│   ├── r_packages.py            # R packages manifest
│   └── spark_info.py           # Spark version manifest
├── hierarchy/                    # Image relationship definitions  
│   ├── __init__.py
│   ├── get_taggers_and_manifests.py   # Get taggers/manifests for image
│   └── images_hierarchy.py            # Define image dependencies
└── utils/                      # Shared utilities
    ├── __init__.py
    ├── docker_runner.py       # Docker container management
    ├── get_platform.py       # Platform detection
    ├── get_prefix.py        # Path prefix helpers
    └── git_helper.py        # Git repository utilities
  1. Note that each Tagger and Manifest got its own file instead of having one long file with all of them. I kept versions.py together though, because these are similar.
  2. Updated tagging/README.md and made it more clear
  3. Moved this README to docs/maintaining/tagging.md
  4. Replaced all pieces of code in this file with literalinclude

I also made sure that git think files are moved (and not deleted and added), so it should mess less with the history

@mathbunnyru mathbunnyru force-pushed the reorganize_tagging branch 7 times, most recently from 52e8c47 to 0521200 Compare February 21, 2025 03:40
@mathbunnyru mathbunnyru merged commit e815fde into jupyter:main Feb 21, 2025
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant