Skip to content

Commit 141e9dc

Browse files
Merge pull request #83 from Quantmetry/chp_fix_doc_environment
Chp fix doc environment
2 parents 8c227dc + fe5a236 commit 141e9dc

File tree

8 files changed

+18
-6
lines changed

8 files changed

+18
-6
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ jobs:
4141
run: |
4242
mypy qolmat
4343
echo you should uncomment mypy qolmat and delete this line
44+
- name: Upload coverage reports to Codecov
45+
uses: codecov/codecov-action@v3
46+
env:
47+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. -*- mode: rst -*-
22
3-
|GitHubActions|_ |ReadTheDocs|_ |License|_ |PythonVersion|_ |PyPi|_ |Release|_ |Commits|_
3+
|GitHubActions|_ |ReadTheDocs|_ |License|_ |PythonVersion|_ |PyPi|_ |Release|_ |Commits|_ |Codecov|_
44

55
.. |GitHubActions| image:: https://github.com/Quantmetry/qolmat/actions/workflows/test.yml/badge.svg
66
.. _GitHubActions: https://github.com/Quantmetry/qolmat/actions
@@ -23,6 +23,9 @@
2323
.. |Commits| image:: https://img.shields.io/github/commits-since/Quantmetry/qolmat/latest/main
2424
.. _Commits: https://github.com/Quantmetry/qolmat/commits/main
2525

26+
.. |Codecov| image:: https://codecov.io/gh/quantmetry/qolmat/branch/master/graph/badge.svg
27+
.. _Codecov: https://codecov.io/gh/quantmetry/qolmat
28+
2629
.. image:: https://raw.githubusercontent.com/Quantmetry/qolmat/main/docs/images/logo.png
2730
:align: center
2831

environment.doc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: env_qolmat_doc
22
channels:
3-
- defaults
43
- conda-forge
4+
- defaults
55
dependencies:
66
- numpydoc=1.1.0
77
- python=3.8
88
- sphinx=4.3.2
99
- sphinx-gallery=0.10.1
1010
- sphinx_rtd_theme=1.0.0
11-
- sphinx_markdown_tables==0.0.17
1211
- typing_extensions=4.0.1
12+
- pip
13+
- pip:
14+
- sphinx-markdown-tables==0.0.17
File renamed without changes.
File renamed without changes.

qolmat/utils/data.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
from qolmat.benchmark import missing_patterns
1313

14-
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
14+
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
15+
ROOT_DIR = os.path.join(CURRENT_DIR, "..")
1516

1617

1718
def read_csv_local(data_file_name: str) -> pd.DataFrame:
@@ -27,7 +28,7 @@ def read_csv_local(data_file_name: str) -> pd.DataFrame:
2728
df : pd.DataFrame
2829
dataframe
2930
"""
30-
df = pd.read_csv(f"{SCRIPT_DIR}/../../data/{data_file_name}.csv")
31+
df = pd.read_csv(os.path.join(ROOT_DIR, "data", f"{data_file_name}.csv"))
3132
return df
3233

3334

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
"Programming Language :: Python :: 3.10",
7979
]
8080

81+
PACKAGE_DATA = {"qolmat": ["data/beijing.csv", "data/conductors.csv"]}
82+
8183
setup(
8284
name=DISTNAME,
8385
version=VERSION,
@@ -96,4 +98,5 @@
9698
extras_require=EXTRAS_REQUIRE,
9799
classifiers=CLASSIFIERS,
98100
zip_safe=False,
101+
package_data=PACKAGE_DATA,
99102
)

0 commit comments

Comments
 (0)