Skip to content

Commit

Permalink
Updated README.md and release.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonbh committed Jul 19, 2024
1 parent ca56504 commit 8ab8b11
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 7 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

## The QC Suite of Programs

- [qcio](https://github.com/coltonbh/qcio) - Beautiful and user friendly data structures for quantum chemistry.
- [qcio](https://github.com/coltonbh/qcio) - Elegant and intuitive data structures for quantum chemistry, featuring seamless Jupyter Notebook visualizations.
- [qcparse](https://github.com/coltonbh/qcparse) - A library for efficient parsing of quantum chemistry data into structured `qcio` objects.
- [qcop](https://github.com/coltonbh/qcop) - A package for operating quantum chemistry programs using `qcio` standardized data structures. Compatible with `TeraChem`, `psi4`, `QChem`, `NWChem`, `ORCA`, `Molpro`, `geomeTRIC` and many more.
- [BigChem](https://github.com/mtzgroup/bigchem) - A distributed application for running quantum chemistry calculations at scale across clusters of computers or the cloud. Bring multi-node scaling to your favorite quantum chemistry program.
- `ChemCloud` - A [web application](https://github.com/mtzgroup/chemcloud-server) and associated [Python client](https://github.com/mtzgroup/chemcloud-client) for exposing a BigChem cluster securely over the internet.
- [qcop](https://github.com/coltonbh/qcop) - A package for operating quantum chemistry programs using `qcio` standardized data structures. Compatible with `TeraChem`, `psi4`, `QChem`, `NWChem`, `ORCA`, `Molpro`, `geomeTRIC`, and many more, featuring seamless Jupyter Notebook visualizations.
- [BigChem](https://github.com/mtzgroup/bigchem) - A distributed application for running quantum chemistry calculations at scale across clusters of computers or the cloud. Bring multi-node scaling to your favorite quantum chemistry program, featuring seamless Jupyter Notebook visualizations.
- `ChemCloud` - A [web application](https://github.com/mtzgroup/chemcloud-server) and associated [Python client](https://github.com/mtzgroup/chemcloud-client) for exposing a BigChem cluster securely over the internet, featuring seamless Jupyter Notebook visualizations.

## Installation

Expand Down Expand Up @@ -89,6 +89,36 @@ output.ptraceback # Shortcut to print out the traceback in human readable format

Examples of various computations can be found in the [examples directory](https://github.com/mtzgroup/chemcloud-client/tree/main/examples).

## ✨ Visualization ✨

Visualize all your results with a single line of code!

First install the visualization module:

```sh
pip install qcio[view]
```

or if your shell requires `''` around arguments with brackets:

```sh
pip install 'qcio[view]'
```

Then in a Jupyter notebook import the `qcio` view module and call `view.view(...)` passing it one or any number of `qcio` objects you want to visualizing including `Structure` objects or any `ProgramOutput` object. You may also pass an array of `titles` and/or `subtitles` to add additional information to the molecular structure display. If no titles are passed `qcio` with look for `Structure` identifiers such as a name or SMILES to label the `Structure`.

![Structure Viewer](https://public.coltonhicks.com/assets/qcio/structure_viewer.png)

Seamless visualizations for `ProgramOutput` objects make results analysis easy!

![Optimization Viewer](https://public.coltonhicks.com/assets/qcio/optimization_viewer.png)

Single point calculations display their results in a table.

![Single Point Viewer](https://public.coltonhicks.com/assets/qcio/single_point_viewer.png)

If you want to use the HTML generated by the viewer to build your own dashboards use the functions inside of `qcio.view.py` that begin with the word `generate_` to create HTML you can insert into any dashboard.

## Support

If you have any issues with `chemcloud` or would like to request a feature, please open an [issue](https://github.com/mtzgroup/chemcloud-client/issues).
31 changes: 28 additions & 3 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def update_version_with_poetry(version):
def update_changelog(version, repo_url):
"""Update the CHANGELOG.md file with the new version and today's date."""
print("Updating CHANGELOG.md...")
CHANGELOG_PATH = "docs/CHANGELOG.md"
with open(CHANGELOG_PATH, "r") as file:
with open("CHANGELOG.md", "r") as file:
lines = file.readlines()

today = datetime.today().strftime("%Y-%m-%d")
Expand All @@ -49,7 +48,7 @@ def update_changelog(version, repo_url):
lines.insert(i + 1, new_version_link)
break

with open(CHANGELOG_PATH, "w") as file:
with open("CHANGELOG.md", "w") as file:
file.writelines(lines)


Expand All @@ -66,17 +65,43 @@ def run_git_commands(version):
subprocess.run(["git", "push"], check=True)


def confirm_version(version: str):
"""Ask the user to confirm the version number before proceeding."""
while True:
response = (
input(f"Are you sure you want to release {version}? (Y/N): ")
.strip()
.lower()
)
if response in ["y", "n"]:
return response == "y"
else:
print("Invalid input. Please enter 'Y' or 'N'.")


def main():
"""Main entry point for the script."""
from pathlib import Path

if len(sys.argv) != 2:
print("Usage: release.py <version>")
sys.exit(1)

version = sys.argv[1]

original_pyproject = Path("pyproject.toml").read_text()
original_changelog = Path("CHANGELOG.md").read_text()

repo_url = get_repo_url()
update_version_with_poetry(version)
update_changelog(version, repo_url)
if confirm_version(version):
print("Proceeding with the release...")
else:
print("Reverting changes...")
Path("pyproject.toml").write_text(original_pyproject)
Path("CHANGELOG.md").write_text(original_changelog)
sys.exit(1)
run_git_commands(version)


Expand Down

0 comments on commit 8ab8b11

Please sign in to comment.