-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45ccd0e
commit 5f4b5a0
Showing
97 changed files
with
1,821 additions
and
1,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
[submodule "lightnumpy/_cpp_core/NumCpp"] | ||
path = lightnumpy/_cpp_core/NumCpp | ||
[submodule "third_party/NumCpp"] | ||
path = third_party/NumCpp | ||
url = https://github.com/scikit-plots/NumCpp.git | ||
branch = gh_numcpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!--placeholder page so Github knows we have a CoC--> | ||
|
||
Our Code of Conduct is at | ||
https://scikit-plots.github.io/stable/project/code_of_conduct.html | ||
|
||
It is rendered from `doc/source/project/code_of_conduct.rst` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Platform independent file copier script | ||
""" | ||
#!/usr/bin/env python | ||
import shutil | ||
import argparse | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("infiles", nargs='+', | ||
help="Paths to the input files") | ||
parser.add_argument("outdir", | ||
help="Path to the output directory") | ||
args = parser.parse_args() | ||
for infile in args.infiles: | ||
shutil.copy2(infile, args.outdir) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
def combine_dict(*dicts, **kw): | ||
""" | ||
Combine Numpy distutils style library configuration dictionaries. | ||
Parameters | ||
---------- | ||
*dicts | ||
Dictionaries of keys. List-valued keys will be concatenated. | ||
Otherwise, duplicate keys with different values result to | ||
an error. The input arguments are not modified. | ||
**kw | ||
Keyword arguments are treated as an additional dictionary | ||
(the first one, i.e., prepended). | ||
Returns | ||
------- | ||
combined | ||
Dictionary with combined values. | ||
""" | ||
new_dict = {} | ||
|
||
for d in (kw,) + dicts: | ||
for key, value in d.items(): | ||
if new_dict.get(key, None) is not None: | ||
old_value = new_dict[key] | ||
if isinstance(value, (list, tuple)): | ||
if isinstance(old_value, (list, tuple)): | ||
new_dict[key] = list(old_value) + list(value) | ||
continue | ||
elif value == old_value: | ||
continue | ||
|
||
raise ValueError(f"Conflicting configuration dicts: {new_dict!r} {d!r}") | ||
else: | ||
new_dict[key] = value | ||
|
||
return new_dict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import sys | ||
import argparse | ||
|
||
# XXX: If this import ever fails (does it really?), vendor either | ||
# cython.tempita or numpy/npy_tempita. | ||
from Cython import Tempita as tempita | ||
|
||
|
||
def process_tempita(fromfile, outfile=None): | ||
"""Process tempita templated file and write out the result. | ||
The template file is expected to end in `.c.in` or `.pyx.in`: | ||
E.g. processing `template.c.in` generates `template.c`. | ||
""" | ||
# template = tempita.Template.from_filename( | ||
# fromfile, | ||
# encoding=sys.getdefaultencoding() | ||
# ) | ||
with open(fromfile, "r", encoding="utf-8") as f: | ||
template_content = f.read() | ||
template = tempita.Template(template_content) | ||
content = template.substitute() | ||
|
||
with open(outfile, "w", encoding="utf-8") as f: | ||
f.write(content) | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"infile", | ||
type=str, | ||
help="Path to the input file" | ||
) | ||
parser.add_argument( | ||
"-o", | ||
"--outfile", | ||
type=str, | ||
help="Path to the output file" | ||
) | ||
parser.add_argument( | ||
"-i", | ||
"--ignore", | ||
type=str, | ||
help="An ignored input - may be useful to add a " | ||
"dependency between custom targets", | ||
) | ||
args = parser.parse_args() | ||
|
||
if not args.infile.endswith('.in'): | ||
raise ValueError(f"Unexpected extension: {args.infile}") | ||
|
||
if not args.outfile: | ||
raise ValueError("Missing `--outfile` argument to tempita.py") | ||
|
||
if os.path.isabs(args.outfile): | ||
raise ValueError("`--outfile` must relative to the current directory") | ||
|
||
outdir_abs = os.path.join(os.getcwd(), args.outfile) | ||
outfile = os.path.join( | ||
outdir_abs, os.path.splitext(os.path.split(args.infile)[1])[0] | ||
) | ||
|
||
process_tempita(args.infile, outfile) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.