Comments (9)
Thanks for detailed review @bakakaldsas. It looks like in non-main case we are using the PathHelper only in runner.py, which is good as for entry point. I'm thinking about to inject PathHelper.locate_csv() and get_processed() folder into default parametrrs of Vintage init to make dependency more explict
from parser-rosstat-kep.
What is missing from the review however is extensive use of helpers in other subpackages of src, like download and word2csv, lets do that later.
from parser-rosstat-kep.
Finally, some code from test_various_bugs.py that is not related to csv2df may go to src/tests
from parser-rosstat-kep.
Also - helper is used in src/*.py files a lot
from parser-rosstat-kep.
Info updated.
from parser-rosstat-kep.
In a wierd word of Win-linux combination I run this to find 'PathHelper'
for /f %G in ('dir *.py /s/b') do (grep -nH 'PathHelper' %G) 1>> 1.txt
from parser-rosstat-kep.
or rather this, in linux:
$ find . -type f -name "*.py" ! -name "__init__.py" ! -name "test*" | xargs grep -nH 'PathHelper'
After review this gives us:
m ./csv2df/reader.py:315: from config import PathHelper, DateHelper
m ./csv2df/reader.py:320: csv_path = PathHelper.locate_csv(year, month)
m ./csv2df/parser.py:159: from config import PathHelper, DateHelper
m ./csv2df/parser.py:167: csv_path = PathHelper.locate_csv(year, month)
+./config.py:9: - :func:`PathHelper.locate_csv` retrieves interim CSV file for parsing
+./config.py:133:class PathHelper:
+./csv2df/runner.py:20:from config import PathHelper
+./csv2df/runner.py:54: def __init__(self, year, month, path_helper=PathHelper):
+./download/download.py:11:from config import PathHelper
+./download/download.py:13:UNPACK_RAR_EXE = PathHelper.get_unrar_binary()
+./download/download.py:44: folder = PathHelper.get_raw_folder(year, month)
+./finaliser.py:10:from config import PathHelper, DateHelper
+./finaliser.py:24: src_folder = PathHelper.get_processed_folder(year, month)
+./finaliser.py:25: dst_folder = PathHelper.get_latest_folder()
+./finaliser.py:50: filepath = PathHelper.get_xl_path()
-./example.py:126:from csv2df.helpers import PathHelper
-./example.py:128:csv_path = PathHelper.locate_csv(year, month)
+./getter.py:7:from config import PathHelper
+./getter.py:21: path = PathHelper.get_latest_csv(freq)
from parser-rosstat-kep.
- Yes. Simple searching finds the usage in no time. However I added a bit more expanded usage.
E.g. in stead of just: "./download/download.py:13:UNPACK_RAR_EXE = PathHelper.get_unrar_binary()"
I located where isUNPACK_RAR_EXE
used later:
def unrar(path, folder, unrar=UNPACK_RAR_EXE):
-
And I missed example.py as it still has import with old file name:
from csv2df.helpers import PathHelper
And that needs to be fixed. -
Either way combination of both approaches would probably yield most detailed results, but is probably too time consuming.
from parser-rosstat-kep.
Sure, from grep you see not usage, but it is good as to keep a list. Your listing and grep compliment each other.
from parser-rosstat-kep.
Related Issues (20)
- add Vintage.upload() method HOT 1
- processed/latest folder needs better handling
- certain variables not found in Vinatage.validate() HOT 2
- review check procedure HOT 7
- Missing values should not be False at dataframe construction HOT 5
- shorter decimal representation in CSV file HOT 2
- replace Table class with Table2
- add coverable badge
- adapt code to create html with headers and charts HOT 8
- code review for `dev-sceleton` branch
- speed up manage.parse() HOT 3
- create parsing definition for 'profit' variable
- start of minimal example in julia HOT 1
- start of minimal example in go
- clean notebooks folder and dev_scrap branch
- duplicate code: get_year() vs clean year()
- why smaller code has longer running time?
- trace where duplicate values are created
- how to control warnings issue?
- industial goods production
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parser-rosstat-kep.