Skip to content

Commit

Permalink
Rejig data file packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjackson committed Apr 18, 2018
1 parent 08349e2 commit a9f8f34
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Manifest.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include conf/orbital_colours.conf
include sumo/conf/orbital_colours.conf
include sumo/symmetry/bradcrack.json
include LICENSE
include requirements.txt
43 changes: 43 additions & 0 deletions examples/orbital_colours.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration file for orbital-projected plotting.
# To use custom colours in bandplot and dosplot, use
# the --conf argument to point to your modified copy
# of this file.
[O]
p = #0DB14B

[N]
s = #00FFFF
p = #D93B2B

[S]
s = #D93B2B
p = #0DB14B
d = #17479E

[Se]
p = #0DB14B

[C]
p = #17479E

[Cl]
p = #A154A1

[Br]
p = #A154A1

[I]
p = #A154A1

[Pb]
s = #603813
p = #FA9B04

[Sn]
s = #603813
p = #FA9B04

[Re]
s = #603813
p = #FA9B04
d = #A154A1
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ def load_test_suite():
install_requires=['spglib', 'numpy', 'scipy', 'pymatgen>=2017.12.30', 'h5py',
'phonopy', 'matplotlib', 'seekpath'],
extras_require={'docs': ['sphinx', 'sphinx-argparse']},
package_data={'sumo': ['conf/orbital_colours.conf',
'sumo/symmetry/bradcrack.json']},
package_data={'sumo': ['symmetry/bradcrack.json',
'plotting/orbital_colours.conf']},
data_files=['examples/orbital_colours.conf', 'LICENSE', 'requirements.txt'],
entry_points={'console_scripts': [
'sumo-bandplot = sumo.cli.bandplot:main',
'sumo-bandstats = sumo.cli.bandstats:main',
Expand Down
2 changes: 1 addition & 1 deletion sumo/cli/bandplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def main():

if args.config is None:
config_path = resource_filename(Requirement.parse('sumo'),
'conf/orbital_colours.conf')
'sumo.plotting/orbital_colours.conf')
else:
config_path = args.config
colours = configparser.ConfigParser()
Expand Down
2 changes: 1 addition & 1 deletion sumo/cli/dosplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def main():

if args.config is None:
config_path = resource_filename(Requirement.parse('sumo'),
'conf/orbital_colours.conf')
'sumo/plotting/orbital_colours.conf')
else:
config_path = args.config
colours = configparser.ConfigParser()
Expand Down
File renamed without changes.

0 comments on commit a9f8f34

Please sign in to comment.