diff --git a/.github/workflows/enlaces.yml b/.github/workflows/enlaces.yml new file mode 100644 index 00000000..222d99c8 --- /dev/null +++ b/.github/workflows/enlaces.yml @@ -0,0 +1,27 @@ +name: Links + +on: + repository_dispatch: + workflow_dispatch: + schedule: + - cron: "00 18 * * *" + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1.5.1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Create Issue From File + if: steps.lychee.outputs.exit_code != 0 + uses: peter-evans/create-issue-from-file@v4 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: report, automated issue \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..01c09a40 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,74 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + python-version: ["3.10"] + os: [macos-latest, ubuntu-latest, windows-latest] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: Installer Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Préparation de Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + #---------------------------------------------- + # ----- install & configure poetry ----- + #---------------------------------------------- + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + #---------------------------------------------- + # load cached venv if cache exists + #---------------------------------------------- + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + #---------------------------------------------- + # install dependencies if cache does not exist + #---------------------------------------------- + - name: Install dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: poetry install --no-interaction --no-root + #---------------------------------------------- + # install your root project, if required + #---------------------------------------------- + - name: Install library + run: poetry install --no-interaction + #---------------------------------------------- + # run test suite + #---------------------------------------------- + - name: Vérifier types + run: poetry run pyright + + - name: Tests + run: poetry run pytest + + - name: Tests mypy + run: poetry run mypy -p tikon--enable-recursive-aliases + + - name: Publier + if: startsWith(github.ref, 'refs/tags/v') + uses: JRubics/poetry-publish@v1.13 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 437e2e26..00000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: python -python: - - '3.7' -os: - - linux -env: - global: - - TX_BRANCH="master" -install: - - pip install --upgrade pip setuptools wheel - - pip install transifex-client sphinx sphinx-intl - - pip install -r reqs.txt - - pip install coveralls codecov - - python setup.py sdist bdist_wheel - - pip install . -script: - - cd pruebas - - coverage run -m unittest -after_success: - - coveralls --rcfile=.coveragerc - - codecov - - cd .. - - cd docs - - if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then sh .tx/tx.sh push; sh .tx/tx.sh pull; - fi - - cd .. -deploy: - provider: pypi - user: julien.malard - distributions: sdist bdist_wheel - skip_existing: true - on: - tags: true - password: - secure: jdaCGWDGhqmLNqDiPVC1kber67m6p4ikEeHJqNIW6K4npcjFDgYOp8CDOxFzkqiOeDJSZiUvOoFCU3xOHEn3wOxI3uA9udOOpjQhDBDfarPVtw8k1c7fH7CmQJNQv4ddZ/bEYPFx/Do8g6XzBUFYiNhbtdq+722mACKC4Kc1eA0peyy6qaRXtRfn9/27kaYOK3Lxj/Bm6NefChaBqzWR5fmePC+k1eiZ8r37oK/TNaZ8PZ7reHOOBsMXNA4b26g7dtZRr665WPqu4pSOP9+gxBKdQ36fvar45x8fueZUdvE3hBVfOrUYebG8IDkT2LJBoJIyfnafN5GXgQ4dsCM2c742HNRECCc5B9wCQc65QVcJ1Fo1Tkozam61s9AW7hIHCsNfwhCH9uw3TAtvnMOqjMMxqfMQxpCYSPWtI0yaIMxt6tHjp7wagl4OzqQwNhJUQWyKwNAxoW/d0oYwoYn4C9LL1o1Qj6l7JrgmdHU1iO3TkNHBbem4Cr6+0nZw2+6d3iE6nJ/wBi3xivwF5sFiuLZY5YHEGn2Y89eh6fZEbL2xOyFibezhEavQcGIk+mACWW2EIVWtvz32ceqffW8h6TIy7GXvCCQ8u1gn21EKDqlCruuKIFk9yMx5TXxe7uSkoE42aeiTxlNASdmu+a6EWhzB8P2hkDiGaPy3buqnTlw= diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 9d95dd41..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -recursive-include tikon *.json *.txt *.csv - -graft tikon/ejemplos -graft pruebas \ No newline at end of file diff --git a/reqs.txt b/reqs.txt deleted file mode 100644 index d5af4933..00000000 --- a/reqs.txt +++ /dev/null @@ -1,20 +0,0 @@ -numpy>=1.17.3 -matplotlib -scipy>=1.3.3 -SALib -spotpy -chardet -pandas -taqdir>=2.1.3 -bibtexparser -shapely -ennikkai -xarray -seaborn -pyproj -geopy -pcse -tradssat -pyshp -pillow -babel \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index f3e12c44..00000000 --- a/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -from setuptools import setup, find_packages - - -def leer(arch): - with open(arch, 'r', encoding='utf-8') as d: - return d.read() - -setup( - name='tikon', - version=leer('tikon/versión.txt').strip(), - packages=find_packages(), - url='https://tikon.readthedocs.io', - download_url='https://github.com/julienmalard/Tikon', - license='GNU 3', - author='Julien Jean Malard', - author_email='julien.malard@mail.mcgill.ca', - description='Modelos de redes agroecológicas', - long_description=leer('README.md'), - install_requires=[ - 'numpy', 'matplotlib', 'scipy', 'SALib', 'spotpy', 'chardet', 'pandas', 'taqdir', 'bibtexparser', - 'shapely', 'ennikkai', 'xarray', 'seaborn', 'pyproj', 'geopy', 'pcse', 'tradssat', 'pyshp', 'pillow', 'babel' - ], - classifiers=[ - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Programming Language :: Python :: 3 :: Only', - 'Natural Language :: Spanish' - ], - include_package_data=True, - package_data={ - # Incluir estos documentos de los paquetes: - '': ['*.csv', 'versión.txt', '*.json', '*.txt'], - }, -)