semvec/pypi-packages huggingface dataset:
property 2.6.2
A python module to load property files. Recursively define properties, load from env.
License: MIT
Keywords: property,read-property-file,property-interpolation

# pythonpropertyfileloader


[![Downloads](https://static.pepy.tech/badge/property)](https://pepy.tech/project/property)
![Build](https://github.com/anandjoshi91/pythonpropertyfileloader/actions/workflows/python-package.yml/badge.svg)
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/anandjoshi91/a10c3bfcf9d174b0b0119bfd3d8d1c82/raw/pythonpropertyfileloader__main.json)

## A python module to load property files

- Load multiple property files
- Recursively define properties (Similar to [PropertyPlaceholderConfigurer](https://docs.spring.io/spring-framework/docs/2.5.x/javadoc-api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html)) in spring which lets you use `${variable-reference}` to refer to already defined property)
- Placeholders are also resolved using env variables, like the spring property loader does, if the class is instantiated with the `use_env` argument (defaults to false for backward compatibility)

## Install

Available on [PyPI](https://pypi.org/project/property/)

```bash
pip install property
```

## Example

### my_file.properties

```bash
foo = I am awesome
bar = ${chocolate}-bar
chocolate = fudge
long = a very long property that is described in the property file which takes up \
multiple lines can be defined by the escape character as it is done here
url=example.com/api?auth_token=xyz
user_dir=${HOME}/test
unresolved = ${HOME}/files/${id}/${bar}/
fname_template = /opt/myapp/{arch}/ext/{objid}.dat
```

### Code

```python
from properties.p import Property


## set use_env to evaluate properties from shell / os environment
prop = Property(use_env = True)
dic_prop = prop.load_property_files('my_file.properties')

## Read multiple files
## dic_prop = prop.load_property_files('file1', 'file2')


print(dic_prop)

# Output

# {'foo': 'I am awesome', 'bar': 'fudge-bar', 'chocolate': 'fudge',
#  'long': 'a very long property that is described in the property file which takes up multiple lines
#  can be defined by the escape character as it is done here', 'url': 'example.com/api?auth_token=xyz',
#  'user_dir': '/home/user/test',
#  'unresolved': '/home/user/files/${id}/fudge-bar/',
#  'fname_template': '/opt/myapp/{arch}/ext/{objid}.dat'}
```

## Develop

```bash
git clone https://github.com/anandjoshi91/pythonpropertyfileloader.git
cd pythonpropertyfileloader

## make your changes and open a PR - https://github.com/anandjoshi91/pythonpropertyfileloader/pulls
## Ensure all tests pass

## Check Dependencies
pip install pipreqs
pipreqs .

## Test
pip install pytest
pytest

## Publish to PyPi
pip install twine

update setup.py
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*
```
berry-suite 1.0.2
The berry suite of programs extracts the Bloch wavefunctions from DFT calculations in an ordered way so they can be directly used to make calculations.
License: MIT

# berry
<h2 align="center">
<img src="/docs/figures/BerryLogoBig.svg" width="300">
</h2><br>

**Berry** extracts the Bloch wavefunctions from DFT calculations in an ordered way so they can be directly used to make calculations.

It retrieves the wavefunctions and their gradients in reciprocal space totally ordered by unentangled bands, where continuity applies.

In particular, it calculates the Berry connections and curvatures from DFT calculations.

Then the Berry connections can be used to calculate the first order optical conductivity and the second order optical conductivity for second harmonic generation (SHG).

Therefore, this suite of programs can be used in calculations other than Berry connections and related topics, with small adaptations.

It still can only be used with 2D materials and with DFT suite Quantum Espresso.

It is expected that this software will evolve with many more possibilities in the near future.
The list of TODOs is already large.

- **Source code:** https://github.com/ricardoribeiro-2020/berry

- **Aknowledgement:** We aknowledge the Fundação para a Ciência e a Tecnologia (FCT)
under project  **QUEST2D - Excitations in quantum 2D materials**
PTDC/FIS-MAC/2045/2021 and in the framework of the Strategic Funding UIDB/04650/2020.

- **Requirements** To install requirements, run:
```pip install -r requirements.txt```

Copyright (c) 2022, 2023

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.