semvec/pypi-packages huggingface dataset:
auto-example-env 0.1.0
Generate example.env from .env file for documentation purposes
Requires Python: >=3.8

# auto-example-env

A Python utility to generate `example.env` from your `.env` file for documentation purposes.

## Installation

```bash
pip install .
```

## Usage

```bash
# Generate example.env from .env in current directory
auto-example-env

# Specify custom input/output files
auto-example-env --input .env --output example.env
```

## Features

- Converts `export KEY=VALUE` to `export KEY=`
- Handles multiline quoted values (e.g., PEM certificates) by adding a comment above
- Skips keys marked with `# ignore` (case insensitive)
- Preserves comments and empty lines
- Always overwrites `example.env`

## Example

Given `.env`:

```
export API_KEY=secret
# ignore export SECRET=hidden
export CERT="-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----"
```

Generates `example.env`:

```
export API_KEY=
# Multiline value
export CERT=
```
OgreWulff 0.1.0
A Python package for plotting Wulff shapes from surface energy data
Requires Python: >=3.9

# OgreWulff

A Python package for generating and plotting Wulff shapes from surface energy data, based on WulffPack.

## Installation

### From source

```bash
pip install -e .
```

### From PyPI

```bash
pip install OgreWulff
```

## Usage

### Static plotting with Matplotlib

```python
from OgreWulff import plot_wulff
from ase.build import bulk

# Define surface energies (in mJ/m^2)
surface_energies = {
    (1, 0, 0): 100.0,
    (1, 1, 0): 85.0,
    (1, 1, 1): 75.0
}

# Create conventional fcc structure
conv = bulk('Cu', 'fcc', a=3.6, cubic=True)

# Plot Wulff shape
particle = plot_wulff(
    surface_energies=surface_energies,
    structure=conv,
    output_file='cu_wulff.png',
    interactive=False,
    legend=True
)
```

### Interactive plotting with Plotly

```python
# Create an interactive HTML plot
particle = plot_wulff(
    surface_energies=surface_energies,
    structure=conv,
    output_file='cu_wulff.html',
    interactive=True,
    legend=True
)
```

## Features

- **Wulff shape construction**: Create equilibrium crystal shapes from surface energies
- **Static plotting**: Generate high-quality PNG figures using matplotlib
- **Interactive plotting**: Create rotatable 3D visualizations with Plotly (optional)
- **Facet filtering**: Control which facets to include using `max_index` parameter
- **Customizable appearance**: Control viewing angles, colors, legends, and more

## API Reference

### plot_wulff

Main function for plotting Wulff shapes.

**Parameters:**
- `surface_energies` (dict): Dictionary mapping Miller index tuples to surface energies (in mJ/m^2)
- `structure`: ASE Atoms or pymatgen Structure for the conventional cell
- `output_file` (str): Path to save the plot (optional, defaults to 'wulff_shape.png' or 'wulff_shape.html')
- `legend` (bool): Whether to show legend (default: False)
- `elevation` (int): Viewing elevation angle in degrees (default: 30)
- `azimuth` (int): Viewing azimuth angle in degrees (default: -60)
- `use_common_viewing_angle` (bool): Use elevation=30 and azimuth=30 (default: False)
- `no_title` (bool): Hide the title (default: False)
- `title` (str): Custom plot title (optional)
- `max_index` (int or dict): Filter facets by Miller index magnitude (optional)
- `interactive` (bool): Use Plotly for interactive visualization (default: False)
- `natoms` (int): Number of atoms for Wulff construction (default: 1000)
- `symprec` (float): Symmetry precision for spglib (default: 0.01)
- `tol` (float): Numerical tolerance (default: 1e-5)

**Returns:**
- `OgreSingleCrystal`: The Wulff shape particle object

## Dependencies

- numpy
- matplotlib
- plotly
- ase
- pymatgen
- wulffpack
- tqdm

## License

MIT License