Skip to content

Latest commit

 

History

History
112 lines (78 loc) · 4.53 KB

CONTRIBUTING.rst

File metadata and controls

112 lines (78 loc) · 4.53 KB

Contributing

Contributions, whether big or small, are appreciated! You can get involved by submitting an issue, making a suggestion, or adding code to the project. Any idea, suggestion, or contribution is welcome. We love to know what you miss or what doesn't work or is too slow or impractical.

Having a Problem? Submit an Issue.

  1. Check that you have the latest version of mofdscribe
  2. Check that StackOverflow hasn't already solved your problem
  3. Go here: https://github.com/kjappelbaum/mofdscribe/issues
  4. Check that this issue hasn't been solved
  5. Click "new issue"
  6. Add a short, but descriptive title
  7. Add a full description of the problem, including the code that caused it and any support files related to this code so others can reproduce your problem
  8. Copy the output and error message you're getting

Have a Question or Suggestion?

Same drill! Submit an issue and we'll have a nice conversation in the thread.

Want to Contribute?

  1. Get the code. Fork the repository from GitHub using the big green button in the top-right corner of https://github.com/kjappelbaum/mofdscribe
  2. Clone your directory with
$ git clone https://github.com/<YourUsername>/mofdscribe
  1. Install with pip. The flag, -e, makes your installation editable, so your changes will be reflected automatically in your installation.
$ cd mofdscribe
$ python3 -m pip install -e .
  1. Make a branch off of develop, then make contributions! This line makes a new branch and checks it out
$ git checkout -b feature/<YourFeatureName>
  1. This project should be well tested, so write unit tests in the tests/ directory
  2. Check that all tests are passing and code coverage is good with tox before committing.
$ tox

In particular, check the :code:`tox -e lint` and :code:`tox -e flake8` environments.
The first one runs our formatter and sorts the import, the second one performs some static
code analysis. If those tools raise any errors, you should fix them before committing.

Pull Requests

Once you've got your feature or bugfix finished (or if its in a partially complete state but you want to publish it for comment), push it to your fork of the repository and open a pull request against the develop branch on GitHub.

Make a descriptive comment about your pull request, perhaps referencing the issue it is meant to fix (something along the lines of "fixes issue #10" will cause GitHub to automatically link to that issue). The maintainers will review your pull request and perhaps make comments about it, request changes, or may pull it in to the develop branch! If you need to make changes to your pull request, simply push more commits to the feature branch in your fork to GitHub and they will automatically be added to the pull. You do not need to close and reissue your pull request to make changes!

If you spend a while working on your changes, further commits may be made to the main mofdscribe repository (called "upstream") before you can make your pull request. In keep your fork up to date with upstream by pulling the changes--if your fork has diverged too much, it becomes difficult to properly merge pull requests without conflicts.

To pull in upstream changes:

$ git remote add upstream https://github.com/kjappelbaum/mofdscribe
$ git fetch upstream develop

Check the log to make sure the upstream changes don't affect your work too much:

$ git log upstream/develop

Then merge in the new changes:

$ git merge upstream/develop

More information about this whole fork-pull-merge process can be found here on Github's website.

Implementing a new featurizer

If you want to implement a new featurizer, it is recommended that you first open an issue on GitHub such that we can discuss your idea.

For the implementation, keep in mind that the MOFBaseFeaturizer requires you to implement _featurize and not featurize. Also, if you need to implement the _fit method, make sure that the conversion to primitive is called upon a call to fit.

Please also make sure to

  1. Add your fearturizer with an appropriate card to the docs
  2. To expose the featurizers in the mofdscribe.featurizers module, and the corresponding subpackage.
  3. Add some tests for your featurizer.