### Install Ephemeris with Pip Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/installation.rst Installs or upgrades Ephemeris using pip. This includes a traditional installation, upgrading an existing installation, and installing from the development branch. ```bash $ virtualenv .venv; . .venv/bin/activate $ pip install ephemeris ``` ```bash $ . .venv/bin/activate $ pip install -U ephemeris ``` ```bash $ pip install -U git+git://github.com/galaxyproject/ephemeris.git ``` -------------------------------- ### Install Galaxy Tools with shed-tools install Source: https://context7.com/galaxyproject/ephemeris/llms.txt Installs Galaxy tools from a Tool Shed using a YAML configuration file. Requires Galaxy instance URL, API key, and a tool list file. Outputs installation logs. The tool list YAML defines tools by name, owner, revisions, and optional section labels. ```bash # Install tools from a YAML file shed-tools install \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --tool_list_file tool_list.yaml \ --log_file installation.log # Tool list YAML format # tools: # - name: 'bwa' # owner: 'devteam' # tool_panel_section_label: 'NGS mapping' # revisions: # - '051eba708f43' # install_resolver_dependencies: True ``` -------------------------------- ### Install Galaxy Repositories with Ephemeris Source: https://context7.com/galaxyproject/ephemeris/llms.txt Installs Galaxy repositories using the ephemeris library. It handles repository installation, dependency resolution, and provides counts of installed, skipped, and errored repositories. ```python from ephemeris import irm results = irm.install_repositories( repositories=repos, force_latest_revision=False, default_install_resolver_dependencies=True ) print(f"Installed: {len(results.installed_repositories)}") print(f"Skipped: {len(results.skipped_repositories)}") print(f"Errored: {len(results.errored_repositories)}") ``` -------------------------------- ### Install Sphinx for Documentation Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst This command installs Sphinx and its dependencies from the docs/requirements.txt file, necessary for building the project's documentation locally. ```shell pip install -r docs/requirements.txt ``` -------------------------------- ### Install Ephemeris with Conda Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/installation.rst Installs Ephemeris using Conda. It requires adding the bioconda channel and then installing the package. ```bash $ conda config --add channels bioconda $ conda install ephemeris ``` -------------------------------- ### Setup Galaxy Data Libraries with setup-data-libraries CLI Source: https://context7.com/galaxyproject/ephemeris/llms.txt Creates and populates Galaxy data libraries using a YAML configuration file. Supports data sources from URLs or local paths, and has a '--training' flag for specific configurations. ```bash # Setup data library from YAML setup-data-libraries \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --infile library_data.yaml \ --training # Library YAML format: # destination: # type: library # name: "Training Data" # description: "Reference datasets for training" # items: # - name: "Test Folder" # items: # - url: https://example.com/data.fasta # src: url # ext: fasta # dbkey: "hg38" ``` -------------------------------- ### Programmatic Tool Repository Installation with Python Source: https://context7.com/galaxyproject/ephemeris/llms.txt Programmatically install and manage Galaxy tool repositories using the `InstallRepositoryManager` class. Allows fine-grained control over installations by defining repositories with details like name, owner, Tool Shed URL, panel section, and changeset revision. ```python from bioblend.galaxy import GalaxyInstance from ephemeris.shed_tools import InstallRepositoryManager # Connect to Galaxy gi = GalaxyInstance(url='http://localhost:8080', key='your-api-key') irm = InstallRepositoryManager(gi) # Define repositories to install repos = [ { 'name': 'bwa', 'owner': 'devteam', 'tool_shed_url': 'https://toolshed.g2.bx.psu.edu', 'tool_panel_section_label': 'NGS Tools', 'changeset_revision': '051eba708f43' } ] ``` -------------------------------- ### Set up Virtual Environment for Ephemeris Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst This command sets up a virtual environment for local development of the Ephemeris project, assuming you have virtualenvwrapper installed. ```shell make setup-venv ``` -------------------------------- ### Install Tool Dependencies with install-tool-deps CLI Source: https://context7.com/galaxyproject/ephemeris/llms.txt Installs tool dependencies for tools already present in a Galaxy instance. Can be used to install dependencies for all tools or for specific tools identified by name and owner. ```bash # Install dependencies for all tools install-tool-deps \ --galaxy http://localhost:8080 \ --api_key your-api-key-here # Install dependencies for specific tools install-tool-deps \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --name bwa \ --owner devteam ``` -------------------------------- ### Test Galaxy Tools with shed-tools test Source: https://context7.com/galaxyproject/ephemeris/llms.txt Runs automated tests for installed Galaxy tools and generates a JSON test report. Supports testing tools from a list or all installed tools, with options for parallel execution. Requires Galaxy instance URL, API key, and a tool list file. ```bash # Test tools from a tool list shed-tools test \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --tool_list_file tool_list.yaml \ --test_json test_results.json \ --parallel_tests 4 # Test all installed tools shed-tools test \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --test_json all_tools_results.json \ --parallel_tests 2 ``` -------------------------------- ### Generate Tool List YAML from Workflows with workflow-to-tools CLI Source: https://context7.com/galaxyproject/ephemeris/llms.txt Generates a tool list YAML file from Galaxy workflow files, specifying required tools. This output can then be used with shed-tools to install the extracted tools. ```bash # Extract tools from workflows workflow-to-tools \ --workflow workflow1.ga workflow2.ga workflow3.ga \ --output_file required_tools.yaml \ --panel_label "Workflow Tools" # Then install the extracted tools shed-tools install \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --tool_list_file required_tools.yaml ``` -------------------------------- ### Export Galaxy Tool List with get-tool-list Source: https://context7.com/galaxyproject/ephemeris/llms.txt Exports a list of currently installed Galaxy tools to a YAML file, useful for backup or replication. Options include exporting all tools with revisions or including tool panel IDs and data managers. Requires Galaxy instance URL and API key. ```bash # Export all tools with revisions get-tool-list \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --output_file installed_tools.yaml \ --get_all_tools # Export with tool panel IDs get-tool-list \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --output_file tools_with_sections.yaml \ --include_tool_panel_id \ --get_data_managers ``` -------------------------------- ### Run Galaxy Data Managers with run-data-managers Source: https://context7.com/galaxyproject/ephemeris/llms.txt Executes Galaxy data managers to provision reference genomes and index files using a configuration YAML file. Requires Galaxy instance URL, API key, and a configuration file. Outputs installation logs. The config YAML specifies data manager IDs, parameters, items, and data table reloads. ```bash # Run data managers from configuration run-data-managers \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --config data_managers.yaml \ --log_file dm_installation.log # Configuration YAML format: data_managers: - id: toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_dbkeys_all_fasta/data_manager_fetch_genome_all_fasta_dbkey/0.0.2 params: - 'dbkey_source|dbkey': '{{ item }}' - 'reference_source|reference_source_selector': 'ucsc' items: - hg38 - mm10 data_table_reload: - all_fasta - __dbkeys__ ``` -------------------------------- ### Get Authenticated Galaxy Connection with ephemeris Source: https://context7.com/galaxyproject/ephemeris/llms.txt Creates an authenticated Galaxy connection object using the ephemeris library. It can parse arguments or read from a YAML configuration file for connection details. ```python from ephemeris import get_galaxy_connection import argparse # Parse arguments parser = argparse.ArgumentParser() parser.add_argument('--galaxy', default='http://localhost:8080') parser.add_argument('--api_key', default=None) args = parser.parse_args() # Connect to Galaxy (tries API key, then username/password, then env var) gi = get_galaxy_connection(args, file='config.yaml', login_required=True) # Use the connection version = gi.config.get_version() print(f"Connected to Galaxy {version['version_major']}") ``` -------------------------------- ### Update Galaxy Tools with shed-tools update Source: https://context7.com/galaxyproject/ephemeris/llms.txt Updates installed Galaxy tools to their latest revisions. Can update all tools or specific tools listed in a YAML file. Requires Galaxy instance URL and API key. ```bash # Update all installed tools shed-tools update \ --galaxy http://localhost:8080 \ --api_key your-api-key-here # Update specific tools from a list shed-tools update \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --tool_list_file tools_to_update.yaml ``` -------------------------------- ### Wait for Galaxy Instance with Verbose Output (Shell) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/commands/galaxy-wait.rst This example shows how to use the verbose option ('-v') with galaxy-wait. When enabled, it prints logging statements indicating the progress of the check, including connection attempts and retry messages. This is useful for debugging or monitoring the waiting process. ```shell $ galaxy-wait -g http://localhost:8080 -v ``` -------------------------------- ### Handling Non-JSON Response Error (Shell) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/commands/galaxy-wait.rst This example demonstrates the error handling when galaxy-wait receives non-JSON content from the Galaxy instance. The traceback indicates a 'JSONDecodeError', which occurs because the tool expects a JSON response from the '/api/version' endpoint. If the host returns HTML or other non-JSON data, this error will be raised. ```shell $ galaxy-wait -g https://example.com -v --timeout 3 ``` -------------------------------- ### Configure PyPI Credentials (.pypirc) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/developing.rst This configuration snippet shows the structure of the ~/.pypirc file, which is necessary for interacting with PyPI (Python Package Index) for releasing packages. It includes settings for both the production and test PyPI servers, requiring username and password for authentication. ```ini [distutils] index-servers = pypi test [pypi] username: password: [test] repository:https://testpypi.python.org/pypi username: password: ``` -------------------------------- ### Open Project Documentation (Makefile) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/developing.rst This command opens the locally built documentation for the Ephemeris project. It is used to review the changelog and ensure the documentation is accurate before a release. ```bash make open-docs ``` -------------------------------- ### Automate Full Release Process (Makefile) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/developing.rst This command executes the complete release process for Ephemeris. It automates pushing packages to a test PyPI, allows for review, publishes to the production PyPI, tags the git repository, and pushes the tag upstream. ```bash make release ``` -------------------------------- ### Clean, Lint, and Test Project (Makefile) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/developing.rst This command performs essential development tasks: cleaning build artifacts, linting the code for style and quality, and running unit tests to ensure correctness. It's a crucial step before initiating a release. ```bash make clean && make lint && make test ``` -------------------------------- ### Build HTML Documentation Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst This command, executed from the docs directory, builds the HTML documentation for Ephemeris. This is useful for previewing documentation changes before submitting a pull request. ```shell make html ``` -------------------------------- ### Execute Local Release Build (Makefile) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/developing.rst This command initiates a local build process for releasing packages. It's a step in the larger release automation, allowing for local review before pushing to a remote repository. ```bash make release-local ``` -------------------------------- ### Wait for Galaxy Instance with galaxy-wait CLI Source: https://context7.com/galaxyproject/ephemeris/llms.txt Blocks until a Galaxy instance is responsive, useful for Docker and CI/CD pipelines. Supports timeouts and ensuring the API key is valid and belongs to an admin user. ```bash # Wait for Galaxy to start (no timeout) galaxy-wait --galaxy http://localhost:8080 # Wait with timeout galaxy-wait \ --galaxy http://localhost:8080 \ --timeout 300 # Wait until API key is valid and user is admin galaxy-wait \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --ensure_admin # Returns exit code 0 on success, 1 on failure/timeout ``` -------------------------------- ### Import Galaxy Workflows with workflow-install CLI Source: https://context7.com/galaxyproject/ephemeris/llms.txt Imports Galaxy workflow files (.ga format) into a Galaxy instance. Supports importing single workflows or all workflows from a directory, with an option to publish them. Deduplicates by UUID. ```bash # Import a single workflow workflow-install \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --workflow_path my_workflow.ga # Import all workflows from a directory workflow-install \ --galaxy http://localhost:8080 \ --api_key your-api-key-here \ --workflow_path ./workflows/ \ --publish_workflows # Workflows are deduplicated by UUID - existing workflows won't be re-imported ``` -------------------------------- ### Push Release Artifacts (Makefile) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/developing.rst This command is used to push the release artifacts, likely built locally, to a repository. It is part of the multi-step release process for Ephemeris. ```bash make push-release ``` -------------------------------- ### Clone Ephemeris Repository Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst This command clones your forked Ephemeris repository to your local machine. Ensure you replace 'your_name_here' with your GitHub username. ```shell git clone git@github.com:your_name_here/ephemeris.git ``` -------------------------------- ### Commit and Push Ephemeris Changes Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst This sequence of commands stages all your changes, commits them with a descriptive message, and pushes your branch to GitHub. Replace 'Your detailed description of your changes.' with a clear summary of your modifications. ```shell git add . git commit -m "Your detailed description of your changes." git push origin name-of-your-bugfix-or-feature ``` -------------------------------- ### Lint and Test Ephemeris Changes Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst These commands are used to check your local changes for code quality issues using flake8 and run the project's tests. Ensure your contributions adhere to the project's standards. ```shell make lint ``` -------------------------------- ### Programmatic Data Manager Execution with Python Source: https://context7.com/galaxyproject/ephemeris/llms.txt Programmatically manage Galaxy data manager execution using the `DataManagers` class from the Ephemeris library. Connects to Galaxy via BioBlend, loads configuration from a YAML file, and runs data managers with options for logging, error handling, and overwrite behavior. ```python from bioblend.galaxy import GalaxyInstance from ephemeris import load_yaml_file from ephemeris.run_data_managers import DataManagers # Connect to Galaxy gi = GalaxyInstance(url='http://localhost:8080', key='your-api-key') # Load configuration config = load_yaml_file('data_managers.yaml') # Initialize and run data managers dm = DataManagers(gi, config) results = dm.run( log=None, ignore_errors=False, overwrite=False, data_manager_mode='populate', history_name='Reference Data Installation' ) print(f"Successful: {len(results.successful_jobs)}") print(f"Failed: {len(results.failed_jobs)}") print(f"Skipped: {len(results.skipped_jobs)}") ``` -------------------------------- ### Wait for Galaxy Instance (Shell) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/commands/galaxy-wait.rst This command-line snippet demonstrates how to use galaxy-wait to poll a Galaxy instance. The '-g' flag specifies the Galaxy URL. The tool will repeatedly check for availability until the instance responds successfully or the timeout is reached. It's designed to exit with a status code of 0 on success. ```shell $ galaxy-wait -g https://fqdn/galaxy ``` -------------------------------- ### Create a New Branch for Development Source: https://github.com/galaxyproject/ephemeris/blob/master/CONTRIBUTING.rst This command creates a new branch for your bug fix or feature development. Replace 'name-of-your-bugfix-or-feature' with a descriptive name for your branch. ```shell git checkout -b name-of-your-bugfix-or-feature ``` -------------------------------- ### Wait for Galaxy Instance with Timeout (Shell) Source: https://github.com/galaxyproject/ephemeris/blob/master/docs/commands/galaxy-wait.rst This snippet illustrates using the '--timeout' option with galaxy-wait. By default, the tool waits indefinitely. Setting a timeout (e.g., '--timeout 3' for 3 seconds) will cause galaxy-wait to exit with an error code (1) if the Galaxy instance doesn't become available within the specified duration. ```shell $ galaxy-wait -g https://does-not-exist -v --timeout 3 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.