Skip to content

Commit

Permalink
Refactoring some backend files
Browse files Browse the repository at this point in the history
  • Loading branch information
eniocc committed Mar 22, 2023
1 parent 69a7cf4 commit e5aad8c
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 81 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/python-app-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------

Expand All @@ -11,5 +24,5 @@ History
0.1.0 (2022-09-19)
------------------

* First release on PyPI.
* First release on PyPI
* Base project
11 changes: 11 additions & 0 deletions bdgd_tools/sample/Sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
17 changes: 5 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#
import os
import sys

sys.path.insert(0, os.path.abspath('..'))

import bdgd_tools
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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 = {
Expand All @@ -128,35 +126,30 @@
# [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
# (source start file, target name, title, author,
# 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'),
]



2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.1
current_version = 0.5.0
commit = True
tag = True

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
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,
Expand Down
44 changes: 0 additions & 44 deletions setup.py.bak

This file was deleted.

5 changes: 1 addition & 4 deletions tests/test_bdgd_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e5aad8c

Please sign in to comment.