GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing cclib.github.io — Development — cclib 1.8.1 documentation DevelopmentBasic instructionsThe default cclib files distributed with a release, as described in How to install, do not include any unit tests and logfiles necessary to run those tests. This section covers how to download the full source along with all test data and scripts, and how to use these for development and testing. Cloning cclib from GitHubcclib is hosted by the fantastic people at GitHub in a git repository. You can download a zipped archive of the current development version (called git clone https://github.com/cclib/cclib.git If you would like to contribute fixes, it is more likely that you want to fork the repository (see guidelines below) and clone that. Installation and running testsOnce you have a copy of cclib,
You may not be interested in running all tests because they take too much time (some calculation methods), require a dependency not immediately available (primarily Psi4), or simply aren’t relevant for the code you’ll touch. Call pytest with the GuidelinesWe follow a typical GitHub collaborative model, relying on forks and pull requests. In short, the development process consists of:
Here are some general guidelines for developers who are contributing code:
Releasing a new versionThe release cycle of cclib is irregular, with new versions being created as deemed necessary after significant changes or new features. We roughly follow semantic versioning with respect to the parsed attributes. When creating a new release on GitHub, start by creating a new issue based on the following template that provides a high-level overview of the steps to take. This is to track the work to be done for release v1.8.1: - [ ] Migrate non-urgent issues/PRs to the 2.0 label ([2.0 list](https://github.com/cclib/cclib/issues?q=is%3Aopen+is%3Aissue+milestone%3Av2.0)) - [ ] Close out remaining PRs and issues ([PRs](https://github.com/cclib/cclib/pulls?q=is%3Aopen+is%3Apr+milestone%3Av1.8.1), [issues](https://github.com/cclib/cclib/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.8.1)) - [ ] Create `release-1.8.1` branch ([branch](https://github.com/cclib/cclib/tree/release-1.8.1)) - [ ] Bump version, update changelog, docs and other files (TODO) - [ ] Create a v1.8.1 tag for the release - [ ] Update release tag to HEAD on release branch - [ ] Create a draft release from the v1.8.1 tag - [ ] Attach source tar and zip archives to release on GitHub - [ ] When ready, publish the draft release (https://github.com/cclib/cclib/releases/tag/v1.8.1) - [ ] Upload new version to PyPI (https://pypi.org/project/cclib/1.8.1/) - [ ] Make sure conda picks up the change (https://github.com/conda-forge/cclib-feedstock/pull/TODO) - [ ] Update Zenodo if a major or minor version (https://zenodo.org/record/TODO) - [ ] Make sure Zenodo parts of documentation get updated (https://github.com/cclib/cclib/pull/TODO) - [ ] Merge the `release-1.8.1` branch back into master (https://github.com/cclib/cclib/pull/TODO) - [ ] Send email to MLs An example of a past finished release is 1.8.
TestingThe test directory, which is not included in the default download, contains the test scripts that keep cclib reliable, and keep the developers sane. With any new commit or pull request to cclib on GitHub the tests are triggered and run with GitHub Actions. The input files for tests, which are logfiles from computational chemistry programs, are located in the data directory. These are a central part of cclib, and any progress should always be supported by corresponding tests. When a user opens an issue or reports a bug, it is prudent to write a test that reproduces the bug as well as fixing it. This ensures it will remain fixed in the future. Likewise, extending the coverage of data attributes to more programs should proceed in parallel with the growth of unit tests. Unit testsUnit tests check that the parsers work correctly for typical calculation types on small molecules, usually water or 1,4-divinylbenzene (dvb) with \(C_{\mathrm{2h}}\) symmetry. The corresponding logfiles stored in folders like The job types currently included as unit tests:
In addition to the above unit tests for data, there are also unit tests for each bridge, calculation method, IO format, and helper utilities, all located inside the tests directory, with each category receiving its own subdirectory. Adding a new attributeDefinitions of attributes (
Without these modifications, saving the parsed attribute will appear to work inside the parser, but will be filtered out by Once the above is complete, and the new attribute is parsed and saved inside at least one parser, a new unit test should be added. Adding a new unit testNavigate to the relevant subdirectory of the Examples of how unit tests are written are those for population methods or the MOLDEN writer.
Adding a unit test for a new attribute or new methods on an existing data unit test class requires all of the above with the addition of:
Adding a new program versionThere are a few conventions when adding a new supported program version to the unit tests:
Regression testsRegression tests ensure that bugs, once fixed, stay fixed. These are real-life files that at some point broke a cclib parser and are stored in folders like For every bug found in the parsers, there should be a corresponding regression test that tests if this bug stays fixed. The process is automated by regression.py, which runs through all of our test data, both the basic data and regression files, opens them, tries to parse, and runs any relevant regression tests defined for that file. Using both the unit and regression tests, the line-by-line test coverage shows which parts of cclib are touched by at least one test. When adding new features and tests, the GitHub Actions testing script can be run locally to generate the HTML coverage pages and ensure that the tests exercise the feature code. Adding a new regression testA regression test consists of one or more output files and optionally a test function and/or multiple test classes. New regression tests are added by creating entries in regressionfiles.yaml. There are three kinds of tests:
More details, such as where to place regression data, how to control parsing, and what to name the optional tests are available in the pytest config and at the top of regressionfiles.yaml. Code conventions
DocumentationAll new functions should contain a docstring in NumPy style. A docstring should focus on the user-facing interaction and purpose of a function rather than any implementation details. Additional code comments may also be necessary; here are some general guidelines for writing code comments. Larger features, such as adding a new parser, method, or bridge, may also warrant additional high-level documentation in these pages. Please reach out to us about this if you have questions, or we may ask for some as part of discussion on an issue or PR. Websites related to cclib
DevelopersBesides input from a number of people listed in the repository, the following are core developers (in alphabetical order): |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |