dnd-firefly


Namednd-firefly JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/ejoliet/dnd-firefly.git
SummaryProgrammatically drag-and-drop in IRSA Viewer (Firefly) tool via Upload feature
upload_time2024-11-16 02:03:12
maintainerNone
docs_urlNone
authorEmmanuel Joliet
requires_python>=3.11
licenseNone
keywords firefly visualization astronomy images tables fits parquet votable csv tsv
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dnd_firefly

Programmatically load file either drag-and-drop or via URL into Firefly Viewer

## Overview

`dnd_firefly` is a command-line tool that allows you to programmatically upload local files to the [Firefly Viewer](https://irsa.ipac.caltech.edu/irsaviewer/) (IRSA Viewer tool) by simulating a drag-and-drop action or loading from a URL. 

This tool is particularly useful for automating data uploads and integrating with scripts or workflows that interact with the Firefly Viewer. This tools complements the existing [URL API](https://irsa.ipac.caltech.edu/irsaviewer/?api) by enabling support for the Upload feature in scenarios where direct access is not yet available.

### Firefly

Firefly is an open-source web-based UI library for astronomical data archive access and visualization developed at [Caltech](https://caltech.edu).
The development was started in the context of archive-specific applications at the [NASA/IPAC Infrared Science Archive (IRSA)](https://irsa.ipac.caltech.edu), and was then generalized to serve data from many different archives at IRSA (and beyond). It was open sourced in 2015, hosted at GitHub.

See details in the GitHub [repository](https://github.com/Caltech-IPAC/firefly?tab=readme-ov-file#intro) and how to install [locally](https://github.com/Caltech-IPAC/firefly/blob/dev/docs/firefly-docker.md).

### Compatibility

`dnd_firefly` tool makes use of [IRSA Viewer](https://irsa.ipac.caltech.edu/irsaviewer/) and is compatible since release 2023.3 (Drag-n-drop introduced - [FIREFLY-1310](https://github.com/Caltech-IPAC/firefly/pull/1426).

## Features

- **Automate File Uploads:** Upload files to the Firefly Viewer without manual intervention.
- **Simulate Drag-and-Drop:** Programmatically simulate the drag-and-drop action to upload local files or from URL.
- **Easy Integration:** Integrate seamlessly with existing data processing pipelines or scripts.

## Installation

You can install `dnd_firefly` directly from PyPI using `pip`:

```bash
pip install dnd_firefly
```

PyPi: https://pypi.org/project/dnd-firefly/

**Note:** `dnd_firefly` requires Python **3.11** or higher.

## Requirements

- **Python 3.11+**
- **Google Chrome Browser:** Ensure that the latest version of Chrome is installed on your system.

## How It Works

The tool uses **Selenium WebDriver** to automate a Chrome browser session. It opens the Firefly Viewer and simulates the drag-and-drop action to upload your specified file or load from URL.

**Selenium Manager:** Starting from Selenium 4.6.0, Selenium includes Selenium Manager, which automatically manages the browser driver required for automation. If you have Chrome installed, Selenium will handle the rest.

## Usage

The `dnd_firefly` tool accepts one argument: the path to the local file or URL you want to upload to the Firefly Viewer.

### Command-Line Usage

For local files:
```bash
dnd_firefly /path/to/your/file.tbl
```
**Replace** `/path/to/your/file.tbl` with the actual path to your local file.

For URL:

```bash
dnd_firefly <http|https>://.../file.tbl
```
**Replace** `<http|https>://.../file.tbl` with the URL.


### Example

To upload a file named `WISE-allwise_p3as_psd-Cone_100asec.tbl` located in your `Downloads` folder, run:

```bash
dnd_firefly ~/Downloads/WISE-allwise_p3as_psd-Cone_100asec.tbl
```
Example of VOTable with 2 tables via URL:

```bash
dnd_firefly https://raw.githubusercontent.com/ejoliet/playground/refs/heads/master/data/table_IRS_Enh-Spectra-1.vot
```

## Troubleshooting

- **Selenium Exceptions:** If you encounter errors related to Selenium WebDriver, ensure that you have the latest version of Chrome installed and that your Selenium version is up to date.
- **Internet Access:** Selenium Manager requires internet access to download the appropriate WebDriver. If you're in an environment with restricted internet access, you may need to manually set up the WebDriver. Refer to the [Selenium documentation](https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/selenium_manager/) for more details.
- **File Path / URL Issues:** Ensure that the file path or URL you provide is correct and that the file exists.

## Advanced Usage (Optional)

If you need to use a different browser or have specific requirements, you can manually set up the WebDriver.

### Manual WebDriver Setup

1. **Download ChromeDriver:**
   - Visit the [ChromeDriver Downloads](https://sites.google.com/a/chromium.org/chromedriver/downloads) page.
   - Download the version that matches your installed Chrome browser version.

2. **Install ChromeDriver:**
   - Place the `chromedriver` executable in a directory that's in your system's `PATH`, or specify its location in the code.

**Note:** Manual setup is only necessary if Selenium Manager is unable to manage the WebDriver automatically.

## Contributing

Contributions are welcome! Please visit the [GitHub repository](https://github.com/ejoliet/dnd-firefly.git) to report issues or submit pull requests.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ejoliet/dnd-firefly.git",
    "name": "dnd-firefly",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "firefly, visualization, astronomy, images, tables, fits, parquet, votable, csv, tsv",
    "author": "Emmanuel Joliet",
    "author_email": "ejoliet@caltech.edu",
    "download_url": "https://files.pythonhosted.org/packages/9a/cc/66ff361c20dfde68f3af8cd0a6544fca1330b9ec348532f3c436ec93ead0/dnd_firefly-0.4.1.tar.gz",
    "platform": null,
    "description": "# dnd_firefly\n\nProgrammatically load file either drag-and-drop or via URL into Firefly Viewer\n\n## Overview\n\n`dnd_firefly` is a command-line tool that allows you to programmatically upload local files to the [Firefly Viewer](https://irsa.ipac.caltech.edu/irsaviewer/) (IRSA Viewer tool) by simulating a drag-and-drop action or loading from a URL. \n\nThis tool is particularly useful for automating data uploads and integrating with scripts or workflows that interact with the Firefly Viewer. This tools complements the existing [URL API](https://irsa.ipac.caltech.edu/irsaviewer/?api) by enabling support for the Upload feature in scenarios where direct access is not yet available.\n\n### Firefly\n\nFirefly is an open-source web-based UI library for astronomical data archive access and visualization developed at [Caltech](https://caltech.edu).\nThe development was started in the context of archive-specific applications at the [NASA/IPAC Infrared Science Archive (IRSA)](https://irsa.ipac.caltech.edu), and was then generalized to serve data from many different archives at IRSA (and beyond). It was open sourced in 2015, hosted at GitHub.\n\nSee details in the GitHub [repository](https://github.com/Caltech-IPAC/firefly?tab=readme-ov-file#intro) and how to install [locally](https://github.com/Caltech-IPAC/firefly/blob/dev/docs/firefly-docker.md).\n\n### Compatibility\n\n`dnd_firefly` tool makes use of [IRSA Viewer](https://irsa.ipac.caltech.edu/irsaviewer/) and is compatible since release 2023.3 (Drag-n-drop introduced - [FIREFLY-1310](https://github.com/Caltech-IPAC/firefly/pull/1426).\n\n## Features\n\n- **Automate File Uploads:** Upload files to the Firefly Viewer without manual intervention.\n- **Simulate Drag-and-Drop:** Programmatically simulate the drag-and-drop action to upload local files or from URL.\n- **Easy Integration:** Integrate seamlessly with existing data processing pipelines or scripts.\n\n## Installation\n\nYou can install `dnd_firefly` directly from PyPI using `pip`:\n\n```bash\npip install dnd_firefly\n```\n\nPyPi: https://pypi.org/project/dnd-firefly/\n\n**Note:** `dnd_firefly` requires Python **3.11** or higher.\n\n## Requirements\n\n- **Python 3.11+**\n- **Google Chrome Browser:** Ensure that the latest version of Chrome is installed on your system.\n\n## How It Works\n\nThe tool uses **Selenium WebDriver** to automate a Chrome browser session. It opens the Firefly Viewer and simulates the drag-and-drop action to upload your specified file or load from URL.\n\n**Selenium Manager:** Starting from Selenium 4.6.0, Selenium includes Selenium Manager, which automatically manages the browser driver required for automation. If you have Chrome installed, Selenium will handle the rest.\n\n## Usage\n\nThe `dnd_firefly` tool accepts one argument: the path to the local file or URL you want to upload to the Firefly Viewer.\n\n### Command-Line Usage\n\nFor local files:\n```bash\ndnd_firefly /path/to/your/file.tbl\n```\n**Replace** `/path/to/your/file.tbl` with the actual path to your local file.\n\nFor URL:\n\n```bash\ndnd_firefly <http|https>://.../file.tbl\n```\n**Replace** `<http|https>://.../file.tbl` with the URL.\n\n\n### Example\n\nTo upload a file named `WISE-allwise_p3as_psd-Cone_100asec.tbl` located in your `Downloads` folder, run:\n\n```bash\ndnd_firefly ~/Downloads/WISE-allwise_p3as_psd-Cone_100asec.tbl\n```\nExample of VOTable with 2 tables via URL:\n\n```bash\ndnd_firefly https://raw.githubusercontent.com/ejoliet/playground/refs/heads/master/data/table_IRS_Enh-Spectra-1.vot\n```\n\n## Troubleshooting\n\n- **Selenium Exceptions:** If you encounter errors related to Selenium WebDriver, ensure that you have the latest version of Chrome installed and that your Selenium version is up to date.\n- **Internet Access:** Selenium Manager requires internet access to download the appropriate WebDriver. If you're in an environment with restricted internet access, you may need to manually set up the WebDriver. Refer to the [Selenium documentation](https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/selenium_manager/) for more details.\n- **File Path / URL Issues:** Ensure that the file path or URL you provide is correct and that the file exists.\n\n## Advanced Usage (Optional)\n\nIf you need to use a different browser or have specific requirements, you can manually set up the WebDriver.\n\n### Manual WebDriver Setup\n\n1. **Download ChromeDriver:**\n   - Visit the [ChromeDriver Downloads](https://sites.google.com/a/chromium.org/chromedriver/downloads) page.\n   - Download the version that matches your installed Chrome browser version.\n\n2. **Install ChromeDriver:**\n   - Place the `chromedriver` executable in a directory that's in your system's `PATH`, or specify its location in the code.\n\n**Note:** Manual setup is only necessary if Selenium Manager is unable to manage the WebDriver automatically.\n\n## Contributing\n\nContributions are welcome! Please visit the [GitHub repository](https://github.com/ejoliet/dnd-firefly.git) to report issues or submit pull requests.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Programmatically drag-and-drop in IRSA Viewer (Firefly) tool via Upload feature",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/ejoliet/dnd-firefly.git",
        "Issues": "https://github.com/ejoliet/dnd-firefly/issues",
        "Say Thanks!": "https://buymeacoffee.com/Red2Green",
        "Source": "https://github.com/ejoliet/dnd-firefly.git"
    },
    "split_keywords": [
        "firefly",
        " visualization",
        " astronomy",
        " images",
        " tables",
        " fits",
        " parquet",
        " votable",
        " csv",
        " tsv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "562df2a439f67e470c18233eccad42e2478b2bf8c303eb8130d5556fadaf6843",
                "md5": "8a5f5ea3253e7ca252b6df3387478059",
                "sha256": "e7d4b0c220b95c165601b490a3d7778ee2cda33d5cc24b2b1330fc42ca2c969e"
            },
            "downloads": -1,
            "filename": "dnd_firefly-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a5f5ea3253e7ca252b6df3387478059",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 7199,
            "upload_time": "2024-11-16T02:03:10",
            "upload_time_iso_8601": "2024-11-16T02:03:10.471145Z",
            "url": "https://files.pythonhosted.org/packages/56/2d/f2a439f67e470c18233eccad42e2478b2bf8c303eb8130d5556fadaf6843/dnd_firefly-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9acc66ff361c20dfde68f3af8cd0a6544fca1330b9ec348532f3c436ec93ead0",
                "md5": "1da101f2c2d7db099bacd0739b4d4e81",
                "sha256": "47466d07514883f5d8669749954fc795e92e50605208e8ecbcbf25f7b18901a7"
            },
            "downloads": -1,
            "filename": "dnd_firefly-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1da101f2c2d7db099bacd0739b4d4e81",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 7163,
            "upload_time": "2024-11-16T02:03:12",
            "upload_time_iso_8601": "2024-11-16T02:03:12.221012Z",
            "url": "https://files.pythonhosted.org/packages/9a/cc/66ff361c20dfde68f3af8cd0a6544fca1330b9ec348532f3c436ec93ead0/dnd_firefly-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-16 02:03:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ejoliet",
    "github_project": "dnd-firefly",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "dnd-firefly"
}
        
Elapsed time: 0.37055s