Skip to content

Commit

Permalink
chore: github publication
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed May 11, 2023
1 parent 03ca7ea commit 6126f5c
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 41 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

35 changes: 16 additions & 19 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@ name: Documentation

on:
push:
branches: [master]
branches: [main]

jobs:
Documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2

- name: Set PY variable
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV

- name: Install dependencies
run: poetry install

- name: Set up Git
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Build documentation
run: |
git fetch origin gh-pages
poetry run mike delete master
poetry run mike deploy --push master
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[dev]'
- name: Set up Git
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Build documentation
run: |
git fetch origin gh-pages
mike delete main
mike deploy --push main
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ on:
types: [published]

jobs:

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

PyPI:
name: Upload to PyPI

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests and Linting
on:
pull_request:
push:
branches: [master]
branches: [main]

jobs:
Linting:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ coverage.xml
*.xlsx
*.pkl
*.jpg
*.png
*.html
*.pickle
*.joblib
Expand Down
3 changes: 0 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,3 @@ repos:
- id: interrogate
args: ["--config=pyproject.toml"]
pass_filenames: false
ignore-nested-functions: true
ignore-private: true
ignore-semiprivate: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021 Assistance Publique - Hôpitaux de Paris
Copyright 2023 Assistance Publique - Hôpitaux de Paris

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
![Tests](https://img.shields.io/github/actions/workflow/status/aphp/confit/tests.yml?branch=main&label=tests&style=flat-square)
[![Documentation](https://img.shields.io/github/actions/workflow/status/aphp/confit/documentation.yml?branch=main&label=docs&style=flat-square)](https://aphp.github.io/confit/latest/)
[![PyPI](https://img.shields.io/pypi/v/confit?color=blue&style=flat-square)](https://pypi.org/project/confit/)
[![Codecov](https://img.shields.io/codecov/c/github/aphp/confit?logo=codecov&style=flat-square)](https://codecov.io/gh/aphp/confit)


# Confit

Confit is a complete and easy-to-use configuration framework aimed at improving the reproducibility
Expand All @@ -10,8 +16,8 @@ Install the library with pip:

<div class="termy">

```console
$ pip install confit
```bash
pip install confit
```

</div>
Expand Down Expand Up @@ -84,8 +90,8 @@ and run the following command from the terminal

<div class="termy">

```console
$ python script.py --config config.cfg --seed 42
```bash
python script.py --config config.cfg --seed 42
```

</div>
Expand Down Expand Up @@ -114,7 +120,7 @@ func(
```


Visit the [documentation](https://datasciencetools-pages.eds.aphp.fr/confit) for more information!
Visit the [documentation](https://aphp.github.io/confit/) for more information!

## Acknowledgement

Expand Down
Binary file modified docs/assets/logo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Combined with our configuration system, dictionaries passed as arguments to a de

### CLI

Documentation en cours
TBD

## The Config object

Expand Down Expand Up @@ -131,7 +131,7 @@ class MyClass:
+ self.hidden_value = 99
```

To access those values directly in the configuration file, use the ${<obj:attribute>} syntax (notice the **colon** instead of the **point**)
To access those values directly in the configuration file, use the `${<obj:attribute>}` syntax (notice the **colon** instead of the **point**)


```ini title="config.cfg"
Expand Down
2 changes: 1 addition & 1 deletion docs/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class MyClass:
+ self.hidden_value = 99
```

Pour accéder à ces valeurs directement dans le fichier de configuration, utilisez la syntaxe ${<obj:attribut>} (remarquez les **deux points** au lieu du **point**)
Pour accéder à ces valeurs directement dans le fichier de configuration, utilisez la syntaxe `${<obj:attribut>}` (remarquez les **deux points** au lieu du **point**)


```ini title="config.cfg"
Expand Down
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: Confit

repo_url: https://gitlab.eds.aphp.fr/datasciencetools/confit
repo_url: https://github.com/aphp/confit
# repo_name: algorithms/pseudonymisation

theme:
Expand Down Expand Up @@ -51,10 +51,10 @@ watch:
extra:
alternate:
- name: English
link: /en/
link: /confit/en/
lang: en
- name: Français
link: /fr/
link: /confit/fr/
lang: fr
version:
provider: mike
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dev = [
"mkdocs-bibtex>=2.0.3,<3.0",
"mkdocs-glightbox>=0.1.6,<1.0.0",
"mkdocs-material>=8.2,<9.0",
"mkdocs-material-extensions>=1.1.1,<2.0.0",
"mkdocs-static-i18n>=0.53,<1.0.0",
"mkdocstrings>=0.18.1,<1.0.0",
"mkdocstrings-python>=0.6,<1.0.0",
Expand Down

0 comments on commit 6126f5c

Please sign in to comment.