WIP: Update contributing and acknowledgement sections.

This commit is contained in:
2025-03-11 14:03:22 +01:00
parent 32abd4cd56
commit 9276f060b0

View File

@ -120,46 +120,59 @@ We now make the previously installed Python environment `multiphase_chemistry_en
<img src="docs/software_arquitecture_diagram.svg" alt="Alt Text">
</p>
## File standardization module (`instruments/`)
## Contributing
### Extend DIMAs file reading capabilities for new instruments
We welcome contributions to DIMA! The easiest way to contribute is by expanding our file reader registry. This allows DIMA to support new instrument file formats.
We now explain how to extend DIMA's file-reading capabilities by adding support for a new instrument. The process involves adding instrument-specific files and registering the new instrument's file reader.
### Adding a New Instrument Reader
1. Create Instrument Files
You need to add two files for the new instrument:
To integrate a new instrument, add the following files:
- A **YAML file** that contains the instrument-specific description terms.
- **Location**: `instruments/dictionaries/`
- **YAML File** (Instrument-specific metadata terms)
- **Location**: `instruments/dictionaries/`
- **Example**: `ACSM_TOFWARE_flags.yaml`
- A **Python file** that reads the instrument's data files (e.g., JSON files).
- **Location**: `instruments/readers/`
- **Python File** (File reader for the instruments data files)
- **Location**: `instruments/readers/`
- **Example**: `flag_reader.py` (reads `flag.json` files)
**Example:**
- **YAML file**: `ACSM_TOFWARE_flags.yaml`
- **Python file**: `flag_reader.py` (reads `flag.json` files from the new instrument).
### Registering the New Instrument Reader
2. Register the New Instrument Reader
To enable DIMA to recognize the new instrument's file reader, update the **filereader registry**:
Once the files are added, register the new reader in **one of the following ways**:
1. Open the file: `instruments/readers/filereader_registry.py`.
2. Add an entry to register the new instrument's reader.
1. **Modify the Python registry**
- Open: `instruments/readers/filereader_registry.py`
- Add an entry for the new instrument reader
**Example:**
```python
# Import the new reader
from instruments.readers.flag_reader import read_jsonflag_as_dict
# Register the new instrument in the registry
file_extensions.append('.json')
file_readers.update({'ACSM_TOFWARE_flags_json' : lambda x: read_jsonflag_as_dict(x)})
```
***
**Example:**
```python
# Import the new reader
from instruments.readers.flag_reader import read_jsonflag_as_dict
# Register the new instrument in the registry
file_extensions.append('.ext')
file_readers.update({'<newInstrument>_ext' : lambda x: read_<newInstFile>_as_dict(x)})
```
2. **Modify the YAML registry**
- Open: `instruments/readers/registry.yaml`
- Add an entry for the new instrument reader
### Notes
We are in the process of implementing validation mechanisms and clear guidelines for file readers. More detailed contribution instructions will be provided soon.
If you would like to contribute, please follow best practices, ensure code quality, and run tests before submitting changes. Additional documentation on setting up the development environment and running tests will be added soon.
Thank you for your contributions! 🚀
## Acknowledgment
We gratefully acknowledge the support of the **Laboratory of Atmospheric Chemistry** and funding from the [ETH-Domain ORD Program Measure 1](https://ethrat.ch/en/measure-1-calls-for-field-specific-actions/) through the **IVDAV** project. Special thanks to all contributors and the open-source community for their valuable insights.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
This section is work in progress!
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@ -257,11 +270,6 @@ Tell people where they can go to for help. It can be any combination of an issue
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.