diff --git a/.github/workflows/python-app-on-windows.yml b/.github/workflows/python-app-on-windows.yml index ac74d6c..9a517b3 100644 --- a/.github/workflows/python-app-on-windows.yml +++ b/.github/workflows/python-app-on-windows.yml @@ -17,29 +17,25 @@ jobs: runs-on: windows-latest - steps: + steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@master - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip pip install -r requirements-dev.txt - + pip install wheel pip install pipwin pipwin install numpy pipwin install pandas pipwin install shapely - pipwin install gdal - pipwin install fiona pipwin install pyproj pipwin install six pipwin install rtree - pipwin install geopandas - pip install geopandas - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/HISTORY.rst b/HISTORY.rst index 9e02842..8f385a9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,19 @@ History ======= +1.0.0(2023-03-22) +------------------ + +* Tested and running on python 3.9 +* Clean architecture. Old models, classes and tests were removed +* Major conversion using json file based was inserted +* Now we can read different bdgd versions +* In this version we can create the DSS elements: + - Circuit + - Line + - Linecode + + 0.1.1(2022-09-19) ------------------ @@ -11,5 +24,5 @@ History 0.1.0 (2022-09-19) ------------------ -* First release on PyPI. +* First release on PyPI * Base project diff --git a/bdgd_tools/sample/Sample.py b/bdgd_tools/sample/Sample.py index edc1e91..e9205cb 100644 --- a/bdgd_tools/sample/Sample.py +++ b/bdgd_tools/sample/Sample.py @@ -9,3 +9,14 @@ * Date: 22/03/2023 * Time: 10:39 """ +import os + +DIR_ANEEL = r"raw\aneel" + + +def mux_energia(): + return os.path.join(os.getcwd(), DIR_ANEEL, "muxenergia.gdb") + + +if __name__ == '__main__': + print(mux_energia()) diff --git a/docs/conf.py b/docs/conf.py index 3a127c0..5f0773d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,6 +19,7 @@ # import os import sys + sys.path.insert(0, os.path.abspath('..')) import bdgd_tools @@ -49,7 +50,7 @@ project = 'bdgd-tools' copyright = "2022, Ênio Rodrigues" author = "Ênio Rodrigues" - +bdgd_tools_doc = 'bdgd-tools Documentation' # The version info for the project you're documenting, acts as replacement # for |version| and |release|, also used in various other places throughout # the built documents. @@ -77,7 +78,6 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False - # -- Options for HTML output ------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -96,13 +96,11 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] - # -- Options for HTMLHelp output --------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'bdgd_toolsdoc' - # -- Options for LaTeX output ------------------------------------------ latex_elements = { @@ -128,22 +126,20 @@ # [howto, manual, or own class]). latex_documents = [ (master_doc, 'bdgd_tools.tex', - 'bdgd-tools Documentation', + bdgd_tools_doc, 'Ênio Rodrigues', 'manual'), ] - # -- Options for manual page output ------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'bdgd_tools', - 'bdgd-tools Documentation', + bdgd_tools_doc, [author], 1) ] - # -- Options for Texinfo output ---------------------------------------- # Grouping the document tree into Texinfo files. List of tuples @@ -151,12 +147,9 @@ # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'bdgd_tools', - 'bdgd-tools Documentation', + bdgd_tools_doc, author, 'bdgd_tools', 'One line description of project.', 'Miscellaneous'), ] - - - diff --git a/setup.cfg b/setup.cfg index fddc241..40fb19d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.2.1 +current_version = 0.5.0 commit = True tag = True diff --git a/setup.py b/setup.py index 467a953..665d541 100644 --- a/setup.py +++ b/setup.py @@ -10,21 +10,21 @@ with open('HISTORY.rst') as history_file: history = history_file.read() -requirements = [ ] +requirements = [] test_requirements = ['pytest>=3', ] setup( author="Ênio Rodrigues", author_email='eniocc@gmail.com', - python_requires='>=3.8', + python_requires='>=3.9', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], description="Short description", install_requires=requirements, diff --git a/setup.py.bak b/setup.py.bak deleted file mode 100644 index 49ab327..0000000 --- a/setup.py.bak +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python - -"""The setup script.""" - -from setuptools import setup, find_packages - -with open('README.rst') as readme_file: - readme = readme_file.read() - -with open('HISTORY.rst') as history_file: - history = history_file.read() - -requirements = [ ] - -test_requirements = ['pytest>=3', ] - -setup( - author="Ênio Rodrigues", - author_email='eniocc@gmail.com', - python_requires='>=3.6', - classifiers=[ - 'Development Status :: 2 - Pre-Alpha', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Natural Language :: English', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - ], - description="Short description", - install_requires=requirements, - license="MIT license", - long_description=readme + '\n\n' + history, - include_package_data=True, - keywords='bdgd_tools', - name='bdgd_tools', - packages=find_packages(include=['bdgd_tools', 'bdgd_tools.*']), - test_suite='tests', - tests_require=test_requirements, - url='https://github.com/eniocc/bdgd_tools', - version='0.1.0', - zip_safe=False, -) diff --git a/tests/test_bdgd_tools.py b/tests/test_bdgd_tools.py index 9175c14..a9f95ca 100644 --- a/tests/test_bdgd_tools.py +++ b/tests/test_bdgd_tools.py @@ -14,11 +14,8 @@ def response(): See more at: http://doc.pytest.org/en/latest/fixture.html """ - # import requests - # return requests.get('https://github.com/audreyr/cookiecutter-pypackage') def test_content(response): """Sample pytest test function with the pytest fixture as an argument.""" - # from bs4 import BeautifulSoup - # assert 'GitHub' in BeautifulSoup(response.content).title.string + diff --git a/tox.ini b/tox.ini index a4e0663..869de5f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,9 @@ [tox] -envlist = py36, py37, py38, flake8 +envlist = py39, flake8 [travis] python = - 3.8: py38 - 3.7: py37 - 3.6: py36 + 3.9: py39 [testenv:flake8] basepython = python