Skip to content

Commit

Permalink
Merge pull request #41 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Added handler for XYZ files and added properties
  • Loading branch information
seamm authored Jan 24, 2023
2 parents ca2eba8 + c5b63f0 commit 68c17e5
Show file tree
Hide file tree
Showing 39 changed files with 1,377 additions and 161 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/CodeQL.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]

jobs:
codeql:
name: CodeQL
uses: molssi-seamm/devops/.github/workflows/CodeQL.yaml@main
40 changes: 0 additions & 40 deletions .github/workflows/Docs.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ tramp
.org-id-locations
*_archive

# VStudio
.vscode

# MOPAC
*.arc
*.out

# flymake-mode
*_flymake.*

Expand Down
23 changes: 22 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,26 @@
History
=======

2023.1.24 -- Added handler for XYZ files and added properties

* Added a custom handler for XYZ files to cope with some of the variant formats.

* Supports files with no atom count on the first line

* Supports the variant used in the Minnesota Solubility database, which has 3 header
lines.

* Add capability to store properties into the database for formats such as MOPAC and
SDF that can handle properties. Also can output the properties when writing the
files.

* Fixed bugs if the system name or configuration name is not a string, but rather a number.

2022.10.28 -- Fixed bug reading cif and mmcif files

* There was a bug that caused a crash when reading cif and mmcif files, and potentially
some other formats. It has been fixed throughout.

* The standard error for properties were missing a commma in the property name. The
comma is standard elsewhere in SEAMM so add it here: '<prop>, stderr'

Expand All @@ -13,8 +30,11 @@ History
issue, and printing any other messages as warnings.

2021.2.12 (12 February 2021)

* Updated the README file to give a better description.

* Updated the short description in setup.py to work with the new installer.

* Added keywords for better searchability.

2021.2.4 (4 February 2021)
Expand All @@ -30,9 +50,10 @@ History
Removed leftover debug print statements.

0.9 (15 April 2020)

* General bug fixing and code cleanup.
* Part of release of all modules.

* Part of release of all modules.

0.7.1 (23 November 2019)
First release on PyPI.
43 changes: 23 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
MODULE := read_structure_step
.PHONY: clean clean-test clean-pyc clean-build docs help
.PHONY: help clean clean-build clean-docs clean-pyc clean-test lint format typing test
.PHONY: dependencies test-all coverage html docs servedocs release check-release
.PHONY: dist install uninstall
.DEFAULT_GOAL := help

define BROWSER_PYSCRIPT
import os, webbrowser, sys
try:
Expand All @@ -10,6 +13,7 @@ except:

webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef

export BROWSER_PYSCRIPT

define PRINT_HELP_PYSCRIPT
Expand All @@ -21,7 +25,9 @@ for line in sys.stdin:
target, help = match.groups()
print("%-20s %s" % (target, help))
endef

export PRINT_HELP_PYSCRIPT

BROWSER := python -c "$$BROWSER_PYSCRIPT"

help:
Expand Down Expand Up @@ -53,34 +59,31 @@ lint: ## check style with black and flake8
black --extend-exclude '_version.py' --check --diff $(MODULE) tests
flake8 --color never $(MODULE) tests

format: ## reformat with with black
format: ## reformat with with yapf and isort
black --extend-exclude '_version.py' $(MODULE) tests

typing: ## check typing
pytype $(MODULE)

test: ## run tests quickly with the default Python
py.test -rP

dependencies:
pur -r requirements_dev.txt
pip install -r requirements_dev.txt

test-all: ## run tests on every Python version with tox
tox
pytest tests/

coverage: ## check code coverage quickly with the default Python
coverage run --source $(MODULE) -m pytest
coverage report -m
coverage html
pytest -v --cov=$(MODULE) --cov-report term --color=yes tests/

coverage-html: ## check code coverage quickly with the default Python, showing as html
pytest -v --cov=$(MODULE) --cov-report=html:htmlcov --cov-report term --color=yes tests/
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/developer/$(MODULE).rst
rm -f docs/developer/modules.rst
sphinx-apidoc -o docs/developer $(MODULE)
clean-docs: ## remove files associated with building the docs
rm -f docs/api/$(MODULE).rst
rm -f docs/api/modules.rst
$(MAKE) -C docs clean

html: clean-docs ## generate Sphinx HTML documentation, including API docs
sphinx-apidoc -o docs/api $(MODULE)
$(MAKE) -C docs html
rm -f docs/api/$(MODULE).rst
rm -f docs/api/modules.rst

docs: html ## Make the html docs and show in the browser
$(BROWSER) docs/_build/html/index.html

servedocs: docs ## compile the docs watching for changes
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ SEAMM Read Structure Plug-in
:target: https://codecov.io/gh/molssi-seamm/read_structure_step
:alt: Code Coverage

.. image:: https://img.shields.io/lgtm/grade/python/g/molssi-seamm/read_structure_step.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/molssi-seamm/read_structure_step/context:python
.. image:: https://github.com/molssi-seamm/quickmin_step/workflows/CodeQL/badge.svg
:target: https://github.com/molssi-seamm/quickmin_step/security/code-scanning
:alt: Code Quality

.. image:: https://github.com/molssi-seamm/read_structure_step/workflows/Documentation/badge.svg
.. image:: https://github.com/molssi-seamm/read_structure_step/workflows/Release/badge.svg
:target: https://molssi-seamm.github.io/read_structure_step/index.html
:alt: Documentation Status

Expand Down
9 changes: 4 additions & 5 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ dependencies:
- pytest-cov

# Documentation
- pygments

- pydata-sphinx-theme
- sphinx-design

# Pip-only installs
- pip:
# Documentation
- rinohtype
- sphinx-rtd-theme
- pystemmer
- sphinx-copybutton
85 changes: 67 additions & 18 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,73 @@
/* Make the page wider so e.g. the status table can be seen fully */
.wy-nav-content {
max-width: 1200px !important;
@import "../basic.css";

html[data-theme="light"] {
--pst-color-primary: #ed1c24;
--pst-color-warning: #ed1c24;
--pst-color-primary-highlight: #bc151b;
--pst-color-secondary: #1d35e7;
--pst-color-secondary-highlight: #3e51e3;

}

html[data-theme="dark"] {
--pst-color-primary: #ed1c24;
--pst-color-warning: #ed1c24;
--pst-color-primary-highlight: #bc151b;
--pst-color-background: #1A1A1A;
--pst-color-secondary: #1d35e7;
--pst-color-secondary-highlight: #3e51e3;


}

html[data-theme="light"] a:hover {
color: #1A1A1A;
}

html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
color: #ffffff;
}


html[data-theme="dark"] a {
color: #ffffff;
}

html[data-theme="dark"] .reference.external {
text-decoration: underline;

}

html[data-theme="dark"] p .reference.internal {
text-decoration: underline;

}

html[data-theme="dark"] a:hover {
color: #ed1c24;
}

html[data-theme="dark"] .prev-next-area a p.prev-next-title {
color: white;
}
.column_left {
display: table-cell;
width: 60px;
vertical-align: middle;

html[data-theme="dark"] .prev-next-area:hover a:hover p.prev-next-title:hover {
color: #ed1c24;
}
.column {
display: table-cell;

html[data-theme="dark"] dt:target {
background-color: #000000;
}
.column_right {
display: table-cell;
width: 60px;
vertical-align: middle;

html .toctree-wrapper li[class^=toctree-l] {
list-style: circle;
}

/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
img:not(.logo__image, .footer_logo) {
padding: 20px;
}


.footer_logo {
max-height: 60px;
}
23 changes: 0 additions & 23 deletions docs/_templates/footer.html

This file was deleted.

8 changes: 5 additions & 3 deletions docs/user/index.rst → docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
User Documentation
==================
API Documentation
=================

Contents:

.. toctree::
:maxdepth: 2

overview
modules


Indices and tables
------------------

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
29 changes: 29 additions & 0 deletions docs/api/read_structure_step.formats.cif.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
read\_structure\_step.formats.cif package
=========================================

Submodules
----------

read\_structure\_step.formats.cif.cif module
--------------------------------------------

.. automodule:: read_structure_step.formats.cif.cif
:members:
:undoc-members:
:show-inheritance:

read\_structure\_step.formats.cif.mmcif module
----------------------------------------------

.. automodule:: read_structure_step.formats.cif.mmcif
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: read_structure_step.formats.cif
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 68c17e5

Please sign in to comment.