Skip to main content

A Project Manager made for Data scientists

Project description

DeadLock

License Platform Language Build Status Version GitHub pull requests Last commit Code size Top language

Table of Contents

Click to expand

A smart way to manage your data science projects with pre-configured templates, dependency tracking and installation, etc.

Features

  • Smart Project Initialization: Create pre-configured data science projects with template selections.
  • Dependency Resolution: Automatically resolve and install package dependencies.
  • Virtual Environment Management: Built-in virtual environment creation and management.
  • PyPI Integration: Direct integration with PyPI for package information and downloads.
  • Cross-Platform Support: Works on Windows, macOS, and Linux.
  • Lock File Management: dead.lock file for reproducible builds.
  • Template Projects: Pre-configured templates for Basic, Computer Vision, and NLP projects.
  • Package Information: Get detailed information about packages from PyPI.
  • Sync Functionality: Sync packages from dead.lock file across environments.
  • Wheel File Handling: Direct wheel file download and extraction.
  • Dependency Tracking: Track and manage package dependencies with install dates.

Installation

Prerequisites

  • Python 3.7+ installed and available in PATH

Creating a New Project

deadlock create <project-name>

This will:

  • Set up a virtual environment.
  • Generate project files (.ipynb, .py, .gitignore, README.md).
  • Create a dead.lock file for dependency tracking.

Installing Packages

# Install single package
deadlock install pandas

# Install multiple packages
deadlock install numpy pandas matplotlib seaborn

Getting Package Information

deadlock info <package-name>

Example output:

Package: tensorflow
Latest version: 2.13.0
PyPI URL: https://pypi.org/project/tensorflow/

Syncing Dependencies

deadlock sync

Installs all packages listed in the dead.lock file.

Listing Installed Packages

deadlock list

Shows all packages from the dead.lock file with versions and dependencies.

Commands

Command Description Example
create <name> Create a new project deadlock create my-project
install <packages...> Install Python packages deadlock install pandas numpy
info <package> Get package information deadlock info tensorflow
sync Install from dead.lock file deadlock sync
list List installed packages deadlock list

Project Templates

DeadLock has pre-configured templates from which you can kickstart your project, you can choose between the following options:

1. Basic Data Science

Pre-installed packages for simple data analysis tasks:

  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • seaborn
  • scipy

2. Computer Vision

Choose between:

  • TensorFlow: Installs TensorFlow, OpenCV, etc. in the virtual environment.
  • PyTorch: Installs torch, torchvision, OpenCV, etc. in the isolated virtual environment.

3. Natural Language Processing

Choose between:

  • TensorFlow: Installs TensorFlow in addition to tokenizer, nltk, embeddings, etc. in the virtual environment.
  • PyTorch: Installs torch in addition to tokenizer, nltk, embeddings, etc. in the virtual environment.

4. Empty Project

No pre-installed packages, clean slate for custom setups.

Dead.lock File

The dead.lock file ensures reproducible builds by tracking exact package versions and dependencies.

Structure

{
  "version": "1.0",
  "generated": "Mon Oct 23 14:30:45 2023",
  "packages": {
    "pandas": {
      "version": "2.1.0",
      "source": "pypi",
      "install_date": "Mon Oct 23 14:30:45 2023",
      "dependencies": ["numpy", "python-dateutil", "pytz"]
    }
  },
  "metadata": {
    "python_version": "3.9.7",
    "platform": "windows",
    "deadlock_version": "1.0.0"
  }
}

Code Walkthrough

DeadLock

Main class for dependency management.

Key Methods:

  • init(string projectName) - Initialize new project
  • installPackages(vector<string> packages) - Install multiple packages // Work in progress
  • getLatestVersion(string packageName) - Get latest version from PyPI
  • getPackageDependencies(string packageName, string version) - Get dependencies
  • syncFromDeadLock(string projectPath) - Sync from lock file // Work in progress
  • loadDeadLockFile(string projectPath) - Load existing lock file // Work in progress

Package

Structure representing a package.

struct Package {
    string name;
    string version;
    string source;
    string installDate;
    vector<string> dependencies;
    bool empty() const {
        return !name.empty() && !version.empty();
    }
};

Contributing

Contributions are welcome. Please follow below guidelines if you have an idea or want a feature:

Have an idea?

Open a GitHub issue

Want to Contribute with code?

Open an issue and follow below steps:

Contribution Guidelines

  1. Fork the repository

  2. Create a feature branch

    git checkout -b feature/amazing-feature
    
  3. Make your changes

  4. Test your Changes

  5. Ensure code quality

  6. Commit your changes

    git commit -m "Add amazing feature"
    
  7. Push to your fork

    git push origin feature/amazing-feature
    
  8. Create a Pull Request

Code Style

  • Follow existing C++ coding conventions.
  • Variable and function names should follow smallCamelCase naming scheme.
  • Classes should follow UpperCamelCase naming scheme.
  • Add comments for complex logic.
  • Follow existing directory structure.

Project Structure

DeadLock/
├── src/                    # Source files
│   ├── deadlock.cpp       # Main implementation
│   └── lock.cpp          # Python Bindings
├── include/               # Header files
│   ├── deadlock.h        # Main header
│   ├── structs.h         # Data structures
├── third_party/          # External dependencies
└── CMakeLists.txt        # Build configuration

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Building from Source

  • Clone the repository

    git clone https://github.com/Chitransh-coder/DeadLock.git
    cd DeadLock
    
  • Install system dependencies:

    Linux (Ubuntu/Debian):

    git clone https://github.com/Microsoft/vcpkg.git
    ./vcpkg/bootstrap-vcpkg.sh
    ./vcpkg/vcpkg install
    

    Windows:

    # Install vcpkg first
    git clone https://github.com/Microsoft/vcpkg.git
    .\vcpkg\bootstrap-vcpkg.bat
    .\vcpkg\vcpkg install
    

Note: You may need to set VCPKG_ROOT environment variable to the vcpkg installation path.

  • Build the project
    cmake --preset debug && cmake --build build
    

Made with ❤️ for the data science community.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deadlock_manager-1.0.0-cp312-cp312-win_amd64.whl (164.7 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file deadlock_manager-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for deadlock_manager-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e8a3e42c1163adb5adc65abfbb2227f284ec71072e910cba2a09528030e0f869
MD5 07cd82181792bbd9306532514579e3e4
BLAKE2b-256 4e3ba0a7bfadc114b2e92e1139bebf3e430a1df48d838d06c1da78caa0d58b5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for deadlock_manager-1.0.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on Chitransh-coder/DeadLock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page