-
Notifications
You must be signed in to change notification settings - Fork 1
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
7ac6c3c
commit d31f213
Showing
18 changed files
with
167 additions
and
510 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
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,3 @@ | ||
[submodule "submodules"] | ||
path = submodules | ||
url = https://github.com/shinokumura/exparser-submodule.git |
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 @@ | ||
1.0.0beta |
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 |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
# Contact: [email protected] | ||
# | ||
#################################################################### | ||
import sys | ||
import os | ||
import sqlalchemy as db | ||
from sqlalchemy.orm import sessionmaker | ||
|
||
DEVENV = True | ||
|
||
|
@@ -25,47 +25,20 @@ | |
|
||
|
||
|
||
EXFOR_DB = DATA_DIR + "exfor_tmp.sqlite" | ||
ENDFTAB_DB = DATA_DIR + "endftables.sqlite" | ||
|
||
|
||
## Package locations | ||
EXFOR_PARSER = "exforparser/" | ||
EXFOR_DICTIONARY = "exfor_dictionary/" | ||
RIPL3 = "ripl3_json/" | ||
|
||
|
||
sys.path.append(os.path.join(MODULES_DIR, EXFOR_DICTIONARY)) | ||
sys.path.append(os.path.join(MODULES_DIR, RIPL3)) | ||
|
||
|
||
|
||
""" pickel file path """ | ||
PICKLE_PATH = os.path.join(MODULES_DIR, EXFOR_DICTIONARY, "pickles/") | ||
|
||
EXFOR_DB = DATA_DIR + "exfor.sqlite" | ||
|
||
|
||
""" Pickle path of list of EXFOR master files made by parser.list_x4files.py""" | ||
ENTRY_INDEX_PICKLE = "pickles/entry.pickle" | ||
|
||
|
||
|
||
""" EXFOR master file path """ | ||
EXFOR_MASTER_REPO_PATH = os.path.join(DATA_DIR, "exfor_master/") | ||
EXFOR_ALL_PATH = os.path.join(EXFOR_MASTER_REPO_PATH, "exforall/") | ||
|
||
|
||
TO_JSON = True | ||
POST_DB = False | ||
|
||
|
||
OUT_PATH = DATA_DIR + "../../../Desktop/" | ||
|
||
|
||
import sqlalchemy as db | ||
from sqlalchemy.orm import sessionmaker | ||
|
||
|
||
""" SQL database """ | ||
engine = db.create_engine("sqlite:///" + EXFOR_DB) | ||
session = sessionmaker(autocommit=False, autoflush=True, bind=engine) |
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 |
---|---|---|
|
@@ -9,17 +9,24 @@ | |
# Contact: [email protected] | ||
# | ||
#################################################################### | ||
import sys | ||
from pyparsing import * | ||
|
||
from .exfor_field import data_header | ||
from utilities.utilities import corr, flatten_list | ||
from utilities.elem import ztoelem, numtoisomer | ||
from submodules.utilities.util import flatten_list | ||
from submodules.utilities.elem import ztoelem | ||
|
||
# from dictionary.exfor_dictionary import Diction | ||
# sys.path.append("../exfor_dictionary/") | ||
from exfor_dictionary import Diction | ||
|
||
def corr(invalue): | ||
if re.search(r"\d|\.[+]\d", invalue): | ||
# invalue = invalue.replace("+", "E+") | ||
invalue = re.sub(r"(\d|\.)([+])(\d)", r"\1E+\3", invalue) | ||
if re.search(r"\d|\.[-]\d", invalue): | ||
# invalue = invalue.replace("-", "E-") | ||
invalue = re.sub(r"(\d|\.)([-])(\d)", r"\1E-\3", invalue) | ||
return invalue | ||
|
||
def data_column_read(line): | ||
column = [0, 11, 22, 33, 44, 55] | ||
|
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,11 +1,8 @@ | ||
requests | ||
dnspython | ||
matplotlib | ||
numpy | ||
pandas | ||
plotly | ||
pymongo==4.1.1 | ||
pymongo[srv] | ||
ripl3_json @ https://github.com/shinokumura/ripl3_json.git | ||
exfor_master @ https://github.com/IAEA-NDS/exfor_master.git | ||
exfor_dictionary @ https://github.com/IAEA-NDS/exfor_dictionary.git | ||
common==0.1.2 | ||
numpy==1.23.0 | ||
pandas==2.0.3 | ||
pyparsing==3.1.1 | ||
setuptools==57.5.0 | ||
SQLAlchemy==2.0.18 | ||
exfor_dictionary @ git+https://github.com/IAEA-NDS/exfor_dictionary@main | ||
ripl3_json @ git+https://github.com/shinokumura/ripl3_json@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,33 @@ | ||
from setuptools import setup, find_packages | ||
|
||
|
||
def read_requirements(file): | ||
with open(file) as f: | ||
return f.read().splitlines() | ||
|
||
def read_file(file): | ||
with open(file) as f: | ||
return f.read() | ||
|
||
version = read_file("VERSION") | ||
requirements = read_requirements("requirements.txt") | ||
|
||
setup( | ||
name="exforparser", | ||
description="EXFOR Parser", | ||
packages=find_packages(exclude=["test"]), | ||
version=version, | ||
author="Shin Okumura/IAEA-NDS", | ||
author_email="[email protected]", | ||
maintainer="IAEA-NDS", | ||
maintainer_email="[email protected]", | ||
license="GPL-2.0 license", | ||
url="https://github.com/[email protected]/exforparser", | ||
python_requires=">=3.8", | ||
install_requires=requirements, | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"Operating System :: OS Independent", | ||
"License :: OSI Approved :: GPL-2.0 license", | ||
], | ||
) |
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
Submodule submodules
added at
640118
Oops, something went wrong.