<commit_before>Contributing
============

Pymatgen is a community project. We welcome any contributions to either improve or expand its functionality. There are
two main ways of contributing to pymatgen::

1. **Direct contributions to pymatgen main distribution.** For improvements to existing pymatgen code or new
   functionality that is expected to be of broad interest and usage to the materials science community, you may make
   direct contributions to the pymatgen main distribution.
2. **Add-ons to pymatgen**. With effect from v2022.0.3, pymatgen now supports the development of add-on packages under
   the pymatgen, pymatgen.analysis, pymatgen.ext and and pymatgen.io
   `namespaces <http://packaging.python.org/guides/packaging-namespace-packages/>`_. If you are developing new
   functionality that is likely to be used by a sub-community of materials scientists, this is probably the best route
   going forward. Examples include functionality related to a specific technological application or io for a new
   quantum chemistry software, etc.

We understand that it is not always clear-cut what contributions should be in the main pymatgen distribution and what
should be as an add-on. It is helpful to always submit a `GitHub Issue
<http://github.com/materialsproject/pymatgen/issues>`_ with your proposed feature to get feedback from the pymatgen
maintainers as well as the broader community. It is also possible that a package that initially was developed as an
add-on subsequently gain enough broad interest and traction such that it is incorporated into the main pymatgen
distribution.

Direct contributions to pymatgen main distribution
--------------------------------------------------

1. Create a free GitHub account (if you don't already have one) and perform the necessary setup (e.g., install SSH
   keys etc.).
2. Fork the pymatgen GitHub repo, i.e., go to the main `pymatgen GitHub repo`_ and click fork to create a copy of the
   pymatgen code base on your own Github account.
3. Install git on your local machine (if you don't already have it).
4. Clone *your forked repo* to your local machine. You will work mostly with your local repo and only publish changes
   when they are ready to be merged::

       git clone git@github.com:YOURNAME/pymatgen.git

   Note that the entire Github repo is fairly large because of the presence of test files, but these are absolutely
   necessary for rigorous testing of the code.
5. It is highly recommended you install all the optional dependencies as well.
6. Code (see `Coding Guidelines`_). Commit early and commit often. Keep your code up to date. You need to add the main<commit_msg>Add instructions for setting up optional dependencies<commit_after>Contributing
============

Pymatgen is a community project. We welcome any contributions to either improve or expand its functionality. There are
two main ways of contributing to pymatgen::

1. **Direct contributions to pymatgen main distribution.** For improvements to existing pymatgen code or new
   functionality that is expected to be of broad interest and usage to the materials science community, you may make
   direct contributions to the pymatgen main distribution.
2. **Add-ons to pymatgen**. With effect from v2022.0.3, pymatgen now supports the development of add-on packages under
   the pymatgen, pymatgen.analysis, pymatgen.ext and and pymatgen.io
   `namespaces <http://packaging.python.org/guides/packaging-namespace-packages/>`_. If you are developing new
   functionality that is likely to be used by a sub-community of materials scientists, this is probably the best route
   going forward. Examples include functionality related to a specific technological application or io for a new
   quantum chemistry software, etc.

We understand that it is not always clear-cut what contributions should be in the main pymatgen distribution and what
should be as an add-on. It is helpful to always submit a `GitHub Issue
<http://github.com/materialsproject/pymatgen/issues>`_ with your proposed feature to get feedback from the pymatgen
maintainers as well as the broader community. It is also possible that a package that initially was developed as an
add-on subsequently gain enough broad interest and traction such that it is incorporated into the main pymatgen
distribution.

Direct contributions to pymatgen main distribution
--------------------------------------------------

1. Create a free GitHub account (if you don't already have one) and perform the necessary setup (e.g., install SSH
   keys etc.).
2. Fork the pymatgen GitHub repo, i.e., go to the main `pymatgen GitHub repo`_ and click fork to create a copy of the
   pymatgen code base on your own Github account.
3. Install git on your local machine (if you don't already have it).
4. Clone *your forked repo* to your local machine. You will work mostly with your local repo and only publish changes
   when they are ready to be merged::

       git clone git@github.com:YOURNAME/pymatgen.git

   Note that the entire Github repo is fairly large because of the presence of test files, but these are absolutely
   necessary for rigorous testing of the code.
5. It is highly recommended you install all the optional dependencies as well::

      pip install -r requirements.txt
      pip install -r requirements-optional.txt
      pip install -r requirements-dev.txt

6. Code (see `Coding Guidelines`_). Commit early and commit often. Keep your code up to date. You need to add the main
{'fraction_non_alphanumeric': 0.06609613983976693, 'fraction_numerical': 0.005098324836125273, 'mean_word_length': 3.818421052631579, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2727534', 'n_tokens_mistral': 1376, 'n_tokens_neox': 1338, 'n_words': 785}