diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml deleted file mode 100644 index 384f9b727c3c818b8d4cdbca477f159a2f0f42f9..0000000000000000000000000000000000000000 --- a/.github/workflows/python-package-conda.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Python Package using Conda - -on: [push] - -jobs: - build-linux: - runs-on: ubuntu-latest - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies - run: | - conda env update --file environment.yml --name base - - name: Lint with flake8 - run: | - conda install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - conda install pytest - pytest diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000000000000000000000000000000000000..1c3cdb11bf9f2d3f845db3764bde238ffa2e72e9 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + cd test; pytest diff --git a/README.md b/README.md index ebdcde306e4d4aeb5895643e2f5c2a6cabcf530d..4f96eb0241c50eef0dd6e222b01cc412746ae155 100644 --- a/README.md +++ b/README.md @@ -72,5 +72,13 @@ Each model has advantages and disadvantages. python -m build + To upload to pypi: + + python3 -m twine upload --repository testpypi dist/* + + To install: + + pip install -i https://test.pypi.org/simple/ orekit-jpype==12.0.2.dev1 + # usage See the example notebooks and the package test folder for examples. diff --git a/pyproject.toml b/pyproject.toml index 1d4259512915cf97b16fe83e02ada03a23e618f9..f76cf97869dcd521440c96ffa5b9ebba21620d48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,9 @@ dependencies = [ ] [project.urls] -homepage = "https://gitlab.orekit.org/Petrush/orekit_jpype/-/tree/master" +source = "https://gitlab.orekit.org/Petrush/orekit_jpype/-/tree/master" +homepage = "https://www.orekit.org/" +forum = "https://forum.orekit.org/" [project.optional-dependencies] tests = [