Skip to content

eli64s/dots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dots

◎ Configurations files and utility scripts

Visual%20Studio%20Code Python Pytest GNU%20Bash Ruff Git Zsh

line

Overview

This repository contains a combination of configuration files and bash scripts to automate various development tasks. The files are organized into directories based on their purpose, such as setting up project environments, configuring version control, and enhancing the development experience.

Project Structure

The repository is structured as follows:

└── dots/
    ├── README.md
    ├── bash
    │   ├── builds
    │   ├── common
    │   ├── file-ops
    │   ├── install
    │   └── project-setup
    ├── git
    │   ├── .gitcommit_template
    │   ├── .gitconfig
    │   ├── .gitignore
    │   └── .gitignore_global
    ├── make
    │   ├── Makefile-poetry
    │   └── Makefile-uv
    ├── python
    │   ├── .ruff.toml
    │   ├── pyproject.toml
    │   └── pytest.ini
    ├── vscode
    │   └── settings.json
    └── zsh
        ├── .zshenv
        └── .zshrc

Project Index

Select a submodule to explore its contents:

DOTS/
__root__
python
pytest.ini - Configures pytest settings for test execution, coverage reporting, and asyncio behavior
- Sets test verbosity, duration, coverage thresholds, and paths
- Excludes specific lines from coverage, enforces coverage thresholds, and formats coverage reports
- Manages asyncio fixture scope and mode, and sets Python path for test discovery.
pyproject.toml - Generates README files using large language model APIs, enhancing developer productivity and documentation quality
- Integrates with various tools to streamline the process, ensuring consistency and efficiency in creating project documentation.
.ruff.toml Define codebase linting and formatting rules for Python project using .ruff.toml file, ensuring consistent code style and quality.
zsh
.zshrc - The code file configures the Zsh shell environment by setting up aliases, functions, path modifications, completion settings, and keybindings
- It also handles directory navigation, history settings, and integrates tools like Poetry, Docker, and VS Code
- Additionally, it enables FZF settings and keybindings, and provides autocomplete functionality for the 'uv' command.
.zshenv Define environment variables for project paths in the zsh configuration file to ensure proper setup and execution.
vscode
settings.json - Configures various settings for the Visual Studio Code editor, including themes, font sizes, file associations, and language-specific formatting preferences
- Manages settings for Git integration, terminal behavior, and test frameworks
- Enhances the editor with plugins for Python, Docker, and more
- Optimizes the development environment for efficient coding and collaboration.
git
.gitcommit_template - Defines commit message template for clear and concise communication of changes made in the project
- Encourages detailed descriptions of "what" and "why" behind each commit, referencing related issues for better tracking
- Facilitates effective collaboration and understanding among team members.
.gitignore_global Exclude unnecessary files and directories from version control using the global .gitignore file to maintain a clean repository structure.
.gitconfig Configure Git settings for a streamlined workflow, including user info, editor preferences, commit templates, aliases for common commands, and visual enhancements like syntax highlighting.
bash
install
micromamba.sh - Facilitates seamless installation and setup of Micromamba on Linux and macOS systems
- Automatically determines the OS type, downloads the latest Micromamba version, sets up executable permissions, moves it to a global path, initializes Micromamba, and configures it to use the conda-forge channel by default.
local_dependencies_uninstall.sh - Perform local environment cleanup by uninstalling various dependencies like pyenv, goenv, Node.js, Poetry, Git, Git LFS, kubectl, kubectx, and Helm
- Additionally, clean up configuration files to ensure a fresh start
- The script logs each step and the total cleanup time, providing a streamlined process for resetting the local development environment.
pyflink.sh - Automates PyFlink setup by checking and installing Java 11, Python 3.7, and downloading PyFlink
- Sets environment variables and aliases for zsh, enabling seamless PyFlink usage.
local_dependencies.sh - Automates local environment setup by installing essential tools like Oh My Zsh, Homebrew, pyenv, Go, kubectl, Helm, Node.js, Poetry, Git, and Git LFS
- Updates shell configurations for seamless tool integration
- Verifies installations and provides a summary of the total installation time
- Ensures a smooth developer experience for building projects.
file-ops
chunk_docs.sh Automates chunking and renaming of a Markdown document into 10 parts for improved readability and navigation in the project's documentation section.
aggregate_docs.sh - Automates concatenation of GitHub project documentation markdown files into a single file
- Clones the repository, searches for markdown files in predefined paths, and merges them
- Useful for enhancing context in learning more about a project's technical implementation.
modify_filenames.sh Automates renaming files to lowercase with hyphens in a specified directory.
move_directory.sh Moves a specified folder to a destination directory if both exist; otherwise, displays appropriate error messages.
builds
pypi.sh - Automates the deployment of a Python package to PyPI by cleaning, building, and uploading distribution files
- The script sets up necessary configurations and executes the deployment process seamlessly.
docker.sh - Automates Docker image building, pushing, and multi-platform support
- Sets up Docker Buildx, builds and publishes the image, and completes the process.
project-setup
create_python_project.sh - Creates essential project directories, files, and configuration settings for a Python project setup
- Establishes a structured foundation for code organization, including key components like main script, configuration constants, and logger module
- Sets up necessary project dependencies, formatting tools, and environment setup scripts for streamlined development and deployment processes.
create_directory_structure.sh - Generates directory structure with files for a Markdown guide based on user input
- The script prompts for a base directory and creates a structured hierarchy with various Markdown files and directories
- This functionality aids in organizing and setting up a comprehensive Markdown guide within the project architecture.
common
run.sh - Automate environment setup and package upgrades for the project using a bash script
- The script activates the conda environment, upgrades pip, and logs the execution start and end times.
clean.sh - The clean.sh script provides functions to remove various artifacts like build files, Python file artifacts, test and coverage artifacts, backup files, and cache files
- It offers commands to clean different types of artifacts within the project structure, ensuring a clean and organized codebase.
test.sh - Executes test coverage analysis for the 'readmeai' project, ensuring a minimum coverage threshold of 90%
- The script activates the 'readmeai' conda environment, runs pytest with coverage, and generates a report highlighting missing coverage.
make
uv
Makefile - Facilitates managing project dependencies and virtual environments using Makefile commands
- Commands include installing dependencies, locking dependencies, syncing environments, and creating virtual environments
- The Makefile provides a structured approach to streamline development setup and maintenance tasks.
poetry
Makefile - Facilitates managing dependencies and environment for Poetry projects
- Includes commands to install dependencies, clean environment, remove environment, and generate requirements files
- Key for maintaining project dependencies and environment setup.

Installation

To get started with the utility scripts, build the project from source:

  1. Clone the repository:
❯ git clone https://github.com/eli64s/dots
  1. Navigate to the project directory:
cd dots

Running the Scripts

One of my favorite scripts to use right now is aggregate_docs.sh, which concatenates all files from a GitHub repository into a single file. I've found this script useful when working with language model APIs for providing the model with robust context and up-to-date information.

To run the script, provide the following arguments:

bash bash/file-ops/aggregate_docs.sh \
    -r https://github.com/pydantic/pydantic \ # Repository URL
    -n pydantic \						  	  # Repository name
    -o pydantic-docs.md \					  # Your output file
    -p docs \								  # Repository directory to search and aggregate
    -s "*.md"								  # File format to search for in the repository

Alternatively, make the script executable:

chmod +x bash/file-ops/aggregate_docs.sh

And run it directly:

./aggregate_docs.sh \
    -r https://github.com/pydantic/pydantic \
    -p docs \
    -o pydantic-docs.md \
    -n pydantic \
    -s "*.md"

Tip

The bash scripts directory contains a variety of utility scripts for automating tasks like environment setup, file operations, and codebase management.