repository-source-code-setup
Summary
Clone a scientific software repository and install its runtime dependencies and test fixtures to prepare the codebase for execution or testing. This skill ensures a reproducible local environment matching the project's configuration before running workflows, unit tests, or analyses.
When to use
You need to validate that a published software tool (e.g., MassQL) executes correctly in your environment, reproduce published results, or contribute to development. Apply this skill when you have a GitHub repository URL and want to verify the unit test suite or run the tool end-to-end on your own machine.
When NOT to use
- The tool is already installed in your environment (e.g., via pip install massql) and you do not need to reproduce or develop against the source repository.
- You only need to use the tool as a published package, not inspect or modify its source code.
- The repository is private or inaccessible to you; instead, rely on pre-built Docker images or containerized distributions.
Inputs
- GitHub repository URL or clone path (string)
- Repository README or configuration files (text/markdown)
- Requirements files (requirements.txt, setup.py, environment.yml, or equivalent)
Outputs
- Cloned local repository directory with all source code
- Installed Python package with dependencies available in the environment
- Fetched test fixtures and data files (if required by the test suite)
- Test execution report (pass/fail status, test counts, error logs)
- Verification that the tool CLI or API is callable
How to apply
First, clone the repository from GitHub (e.g., mwang87/MassQueryLanguage) to a local directory. Next, examine the repository structure and README to identify runtime and test dependencies—these may be specified in requirements files (e.g., requirements.txt, requirements_test.txt) or in documentation. Install the core package and its dependencies using the recommended package manager (pip for Python). If the project includes a test suite, fetch additional test fixtures or data (e.g., via scripts like get_data.sh) that are not bundled with the git repo. Verify installation by checking that the tool's API or CLI is available (e.g., from massql import msql_engine or massql --help). Finally, run the test suite (e.g., via a CI workflow definition like test-unit.yml) to confirm that the installation succeeded and the codebase is functional.
Related tools
- MassQL (Reference implementation of a domain-specific query language for mass spectrometry data; the tool being installed and tested) — https://github.com/mwang87/MassQueryLanguage
- GitHub Actions (test-unit.yml workflow) (CI workflow definition that specifies how to execute the unit test suite; consulted to understand the test execution steps) — https://github.com/mwang87/MassQueryLanguage
- pytest (inferred from test suite structure) (Test runner implied by the presence of a test suite; typically specified in requirements_test.txt)
Examples
cd /tmp && git clone https://github.com/mwang87/MassQueryLanguage.git && cd MassQueryLanguage && pip install -r requirements_test.txt && cd tests && sh ./get_data.sh && cd .. && python -m pytest tests/
Evaluation signals
- Repository successfully clones without authentication errors and contains the expected directory structure (Language Grammar, Reference Implementation, CLI, workflows).
- All core and test dependencies install without errors or unresolved version conflicts;
pip show massql or from massql import msql_engine confirms the package is available.
- Test fixtures are fetched completely (e.g.,
cd tests && sh ./get_data.sh completes without errors); data files are present in the test directory.
- Unit test suite executes and the test-unit.yml CI badge shows a passing status (green check); test output reports zero failures or expected/acceptable failure counts.
- The command-line tool is callable (e.g.,
massql test.mzML "QUERY scaninfo(MS2DATA)" --output_file results.tsv produces output without import or command-not-found errors).
Limitations
- Test fixtures and large data files may not be bundled with the git repository; they must be fetched separately via scripts (e.g., get_data.sh), which may require network access or authentication.
- Python version compatibility may vary; the README states the package is tested on Python 3.9 but compatibility with other versions is uncertain.
- CI workflows (test-unit.yml, test-package.yml) are defined for GitHub Actions; execution locally requires a compatible test runner setup, not automatic replication of the CI environment.
Evidence
- [other] Clone the MassQL repository, install dependencies, execute unit tests, collect results: "1. Clone the MassQL repository (mwang87/MassQueryLanguage) from GitHub. 2. Install dependencies and runtime environment as specified in the repository configuration. 3. Execute the unit test suite"
- [readme] Test fixtures are not bundled and must be fetched separately: "To run tests, you'll need to first fetch some fixtures that are not bundled with the git repo:
cd tests && sh ./get_data.sh"
- [readme] Test suite requires additional dependencies specified in a separate requirements file: "You will also want to install the extra requirements for the test suite:
pip install -r requirements_test.txt"
- [readme] Python 3.9 is the tested version; other versions are uncertain: "We currently test massql in python 3.9, but are figuring out other versions if they work or not."
- [readme] Basic Python API invocation after installation: "from massql import msql_engine
results_df = msql_engine.process_query(input_query, input_filename)"
1---2name: repository-source-code-setup3description: Use when you need to validate that a published software tool (e.g., MassQL) executes correctly in your environment, reproduce published results, or contribute to development.4license: CC-BY-4.05---67# repository-source-code-setup89## Summary1011Clone a scientific software repository and install its runtime dependencies and test fixtures to prepare the codebase for execution or testing. This skill ensures a reproducible local environment matching the project's configuration before running workflows, unit tests, or analyses.1213## When to use1415You need to validate that a published software tool (e.g., MassQL) executes correctly in your environment, reproduce published results, or contribute to development. Apply this skill when you have a GitHub repository URL and want to verify the unit test suite or run the tool end-to-end on your own machine.1617## When NOT to use1819- The tool is already installed in your environment (e.g., via pip install massql) and you do not need to reproduce or develop against the source repository.20- You only need to use the tool as a published package, not inspect or modify its source code.21- The repository is private or inaccessible to you; instead, rely on pre-built Docker images or containerized distributions.2223## Inputs2425- GitHub repository URL or clone path (string)26- Repository README or configuration files (text/markdown)27- Requirements files (requirements.txt, setup.py, environment.yml, or equivalent)2829## Outputs3031- Cloned local repository directory with all source code32- Installed Python package with dependencies available in the environment33- Fetched test fixtures and data files (if required by the test suite)34- Test execution report (pass/fail status, test counts, error logs)35- Verification that the tool CLI or API is callable3637## How to apply3839First, clone the repository from GitHub (e.g., mwang87/MassQueryLanguage) to a local directory. Next, examine the repository structure and README to identify runtime and test dependencies—these may be specified in requirements files (e.g., requirements.txt, requirements_test.txt) or in documentation. Install the core package and its dependencies using the recommended package manager (pip for Python). If the project includes a test suite, fetch additional test fixtures or data (e.g., via scripts like get_data.sh) that are not bundled with the git repo. Verify installation by checking that the tool's API or CLI is available (e.g., `from massql import msql_engine` or `massql --help`). Finally, run the test suite (e.g., via a CI workflow definition like test-unit.yml) to confirm that the installation succeeded and the codebase is functional.4041## Related tools4243- **MassQL** (Reference implementation of a domain-specific query language for mass spectrometry data; the tool being installed and tested) — https://github.com/mwang87/MassQueryLanguage44- **GitHub Actions (test-unit.yml workflow)** (CI workflow definition that specifies how to execute the unit test suite; consulted to understand the test execution steps) — https://github.com/mwang87/MassQueryLanguage45- **pytest (inferred from test suite structure)** (Test runner implied by the presence of a test suite; typically specified in requirements_test.txt)4647## Examples4849```50cd /tmp && git clone https://github.com/mwang87/MassQueryLanguage.git && cd MassQueryLanguage && pip install -r requirements_test.txt && cd tests && sh ./get_data.sh && cd .. && python -m pytest tests/51```5253## Evaluation signals5455- Repository successfully clones without authentication errors and contains the expected directory structure (Language Grammar, Reference Implementation, CLI, workflows).56- All core and test dependencies install without errors or unresolved version conflicts; `pip show massql` or `from massql import msql_engine` confirms the package is available.57- Test fixtures are fetched completely (e.g., `cd tests && sh ./get_data.sh` completes without errors); data files are present in the test directory.58- Unit test suite executes and the test-unit.yml CI badge shows a passing status (green check); test output reports zero failures or expected/acceptable failure counts.59- The command-line tool is callable (e.g., `massql test.mzML "QUERY scaninfo(MS2DATA)" --output_file results.tsv` produces output without import or command-not-found errors).6061## Limitations6263- Test fixtures and large data files may not be bundled with the git repository; they must be fetched separately via scripts (e.g., get_data.sh), which may require network access or authentication.64- Python version compatibility may vary; the README states the package is tested on Python 3.9 but compatibility with other versions is uncertain.65- CI workflows (test-unit.yml, test-package.yml) are defined for GitHub Actions; execution locally requires a compatible test runner setup, not automatic replication of the CI environment.6667## Evidence6869- [other] Clone the MassQL repository, install dependencies, execute unit tests, collect results: "1. Clone the MassQL repository (mwang87/MassQueryLanguage) from GitHub. 2. Install dependencies and runtime environment as specified in the repository configuration. 3. Execute the unit test suite"70- [readme] Test fixtures are not bundled and must be fetched separately: "To run tests, you'll need to first fetch some fixtures that are not bundled with the git repo: `cd tests && sh ./get_data.sh`"71- [readme] Test suite requires additional dependencies specified in a separate requirements file: "You will also want to install the extra requirements for the test suite: `pip install -r requirements_test.txt`"72- [readme] Python 3.9 is the tested version; other versions are uncertain: "We currently test massql in python 3.9, but are figuring out other versions if they work or not."73- [readme] Basic Python API invocation after installation: "from massql import msql_engine74results_df = msql_engine.process_query(input_query, input_filename)"