Skip to content

Commit 2801703

Browse files
committed
First release (v0.52)
Files reshuffled and renamed for release. Added __init__.py for release. Added missing documentation. Added license in each file.
1 parent 273b2e2 commit 2801703

File tree

8 files changed

+319
-214
lines changed

8 files changed

+319
-214
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.pyc
2+
pypirc
3+
*idea
4+
build/
5+
dist/
6+
*.egg-info/

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Due to limitations in expressing a hydrocarbon easily, we have selected this pat
1717
Single bond:- -
1818
Double bond:- =
1919
Triple bond:- ~
20-
Branches:- -([compound](more branches...))([another branch from same carbon])- and so on
20+
Branches:- -([compound] (more branches...))([another branch from same carbon])- and so on
2121
(Branches support coming soon)
2222

2323
You can also get the molecular formula of the compound:
@@ -26,12 +26,10 @@ compound = Namer('CH~C-C~C-CH=C=C=CH2')
2626
compound.molecular_formula()
2727
>>> C₈H₄
2828
```
29-
Example- 2-Methylpropane would be expressed as:
29+
Example- 2-Methylpropane would be expressed as (once branches are supported):
3030
```
3131
a = Namer('CH3-CH(CH3)-CH3').analyser()
3232
>>> 2-Methylpropane
3333
```
3434

3535
Will support naming with functional groups in the future.
36-
37-
P.S: This project is NOT dead.

carbonpy/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from .namer import Namer
2+
from .error import ValencyError
3+
from .version import __version__
4+
5+
__author__ = 'Harshil Mehta'
6+
7+
__all__ = ['Namer', 'ValencyError']

carbonpy/error.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
# Copyright © 2020 Harshil Mehta
5+
6+
# error.py - File containing all errors.
7+
8+
# Licensed under the Apache License, Version 2.0 (the "License");
9+
# you may not use this file except in compliance with the License.
10+
# You may obtain a copy of the License at
11+
#
12+
# http://www.apache.org/licenses/LICENSE-2.0
13+
#
14+
# Unless required by applicable law or agreed to in writing, software
15+
# distributed under the License is distributed on an "AS IS" BASIS,
16+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
"""This file contains all custom exceptions."""
20+
21+
22+
class ValencyError(Exception):
23+
pass

0 commit comments

Comments
 (0)