{"id":30722638,"url":"https://github.com/kit-data-manager/ape_he_mapper","last_synced_at":"2025-10-07T10:15:02.208Z","repository":{"id":291782806,"uuid":"961827231","full_name":"kit-data-manager/ape_he_mapper","owner":"kit-data-manager","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-12T07:33:24.000Z","size":3303,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-03T11:13:15.074Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kit-data-manager.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":"codemeta.json","zenodo":null}},"created_at":"2025-04-07T08:21:40.000Z","updated_at":"2025-05-09T11:30:47.000Z","dependencies_parsed_at":"2025-05-06T14:44:22.381Z","dependency_job_id":"f12c93fb-bee1-455a-97e2-1068ddb4a694","html_url":"https://github.com/kit-data-manager/ape_he_mapper","commit_stats":null,"previous_names":["kit-data-manager/ape_he_mapper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kit-data-manager/ape_he_mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kit-data-manager%2Fape_he_mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kit-data-manager%2Fape_he_mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kit-data-manager%2Fape_he_mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kit-data-manager%2Fape_he_mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kit-data-manager","download_url":"https://codeload.github.com/kit-data-manager/ape_he_mapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kit-data-manager%2Fape_he_mapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278756832,"owners_count":26040392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-03T11:09:54.247Z","updated_at":"2025-10-07T10:15:01.664Z","avatar_url":"https://github.com/kit-data-manager.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--![Tests](https://github.com/kit-data-manager/ape_he_mapper/actions/workflows/python-app.yml/badge.svg)--\u003e\n\u003c!--![Tests](https://img.shields.io/github/actions/workflow/status/kit-data-manager/ape_he_mapper/python-app.yml?label=Tests)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)--\u003e\n\n# APE-HE Mapper\n\n## Overview\nAPE-HE Mapper is a tool designed for mapping APE-HE (Advanced Photoelectric Effect - High Energy) metadata to a uniform, schema-compliant json format. This project includes the extraction of metadata from NeXus (.nxs) files and can be extended for other existing formats.\n\nThe target format of the mapper follows pre-defined schemas developed for metadata description of APE-HE experiments.\n\n## About APE-HE\nAPE-HE is a beamline at the Elettra-Sincrotrone Trieste synchrotron, where a range of scientific techniques are performed. The current implementation supports techniques listed in the ape-he schema: `XAS`, `XMCD`, `IV CURVE`, `2D MAP`, which represent the subset of experiments that have been made FAIR-compliant so far.\n\n## Usage\n\n### 1. Python Command Line Interface\n\n#### Prerequisites\n\nMinimal supported python version: 3.10\n\n#### Cloning the Repository\nTo get started, clone the repository and navigate to the project directory:\n```\ngit clone https://github.com/kit-data-manager/ape_he_mapper.git\ncd ape_he_mapper\n```\n\n#### Setting Up the Environment\nYou can optionally set up a virtual environment. Depending on your environment, you may have to use the `python3` alias instead of `python` for the following commands.\n\nInstall the required dependencies:\n```\npip install -r requirements.txt\n```\n\n#### Running the Mapper\nTo run the mapper, use the `mapping_cli` module:\n```\npython -m mapping_cli\n```\n\n**1. For single file**\n\nThe mapper expects a map file, a metadata file, and a JSON output path:\n```\npython -m mapping_cli \u003cpath_to_schema.json\u003e \u003cpath_to_NeXus_file.nxs\u003e \u003coutput_document.json\u003e\n```\n\nFor further information about the necessary map file, see [Mapping README](./src/resources/maps/mapping)\n\n**2. For zipped file**\n\nThe mapper expects a map file, a zip file, and a zip output path:\n```\npython -m mapping_cli \u003cpath_to_schema.json\u003e \u003cpath_to_zipped_NeXus_files.zip\u003e \u003coutput_document.zip\u003e\n```\n\nFor further information about necessary map file, it will be the same as previously - see [Mapping README](./src/resources/maps/mapping)\n\nNote that only valid files within the zipped input archive will be processed and included in the output zip. Invalid files will be skipped.\n\n### 2. Usage as plugin for the [Mapping-Service](https://github.com/kit-data-manager/mapping-service)\n\nThe mapper can be used as a plugin for the [kit-data-manager/Mapping-Service](https://github.com/kit-data-manager/mapping-service). The necessary gradle project to build the plugin is included in the [plugin subfolder](./mappingservice-plugin).\n\nPlugin and Python code base share the same semantic versioning, so the plugin version always indicates the specific script version used for mapping. This behaviour can be explicitly overriding \n(for example for testing or for working with older versions of the mapping service). To do this, on gradle build time provide the environment variable `VERSION_OVERRIDE_BY_BRANCH`.\nThe variable needs to contain a branch name of this repo and branch deletion may break a plugin in use. Only use this option very carefully. Do not use this option for production.\n\nAn environment that allows the unrestricted installation of Python packages is also recommended for using the plugin.\n\n## Testing\nRun tests using `pytest`:\n```\npytest tests\n```\n\n## Supported instruments and formats\n\nThe following list provides the range of formats, that have been tested via sample data:\n\n### Metadata File Format\n- neXus\n\n### Instrument\n- Elettra-Sincrotrone Trieste synchrotron\n\n## Acknowlegdements\nThis work was carried out with the support of the EU’s H2020 framework program for research and innovation under grant\nagreement n. 101007417, NFFA-Europe Pilot.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkit-data-manager%2Fape_he_mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkit-data-manager%2Fape_he_mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkit-data-manager%2Fape_he_mapper/lists"}